Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved nanoid use from next-server to next/build #5441

Merged
merged 1 commit into from
Nov 2, 2018

Conversation

slaskis
Copy link
Contributor

@slaskis slaskis commented Oct 12, 2018

Another (more proper?) solution to #5427

Is this what you had in mind @timneutkens ?

const distDir = join(dir, config.distDir)

let buildId = await config.generateBuildId() // defaults to a uuid
if (buildId == null) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

== is intentional here to catch null or undefined (either would mess up any potential string methods)

or would you prefer to make this more explicit like typeof buildId == "string"?

Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could just be me, but shouldn't there be a package.json update too?

@slaskis
Copy link
Contributor Author

slaskis commented Nov 2, 2018

I don't think so. The reason for #5427 was to move nanoid to server but this PR just leaves it where it was.

@timneutkens
Copy link
Member

Ah I see 👍

@timneutkens timneutkens merged commit 123b466 into vercel:canary Nov 2, 2018
@timneutkens
Copy link
Member

Thanks!

@slaskis slaskis deleted the gen-build-id branch November 2, 2018 22:34
@lock lock bot locked as resolved and limited conversation to collaborators Nov 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants