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

Prepare for canary release #352

Merged
merged 8 commits into from Jan 21, 2020
Merged

Prepare for canary release #352

merged 8 commits into from Jan 21, 2020

Conversation

ctavan
Copy link
Member

@ctavan ctavan commented Jan 16, 2020

This is a collection of a few more cleanup and tooling commits in preparation of a first 4.0.0-canary release.

@ctavan ctavan force-pushed the prepare-for-alpha-release branch 2 times, most recently from b542770 to c0e16d0 Compare January 16, 2020 22:11
Copy link
Member

@broofa broofa left a comment

Choose a reason for hiding this comment

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

Why the switch to yarn?

@ctavan
Copy link
Member Author

ctavan commented Jan 17, 2020

As stated in the commit message this is really mostly personal preference.

I find yarn upgrade --interactive a really helpful tool and I still couldn't find a true alternative with npm (i.e. upgrade dependencies in the lockfile while ALSO upgrading the package.json to reflect the latest version choices AND not having to manually specify the desired versions), the only thing I'm aware of is https://www.npmjs.com/package/npm-check-updates

Do you have strong feelings against yarn?

@broofa
Copy link
Member

broofa commented Jan 17, 2020

My main concern with yarn is that it's yet another dependency in the toolchain that consumers / contributors need to be familiar with if they want to dive into the project. It's not that big a deal since it's only surfacing in the README as part of the build instructions for the examples and testing.

I guess my preference would be to avoid it unless it's adding real, tangible value, but I'll leave that up to you. I recognize that this is something I'm probably more sensitive to than most folks. :-)

Apparently the changelog for v3.3.3 was edited manually and had a bad
heading level
@ctavan ctavan force-pushed the prepare-for-alpha-release branch 3 times, most recently from 5eef34c to 3660de9 Compare January 20, 2020 13:30
"build" seems to be the more appropriate term for what we're doing here.

Part of #343.
@ctavan ctavan force-pushed the prepare-for-alpha-release branch 4 times, most recently from 3005b50 to db9aa7a Compare January 20, 2020 20:53
@ctavan
Copy link
Member Author

ctavan commented Jan 20, 2020

@broofa after getting more familiar with npm and ncu I think I can also live with it. So I reverted the introduction of yarn!

Moreover I have changed and documented the npm run release toolchain slightly to respect the fact that we now have a build step and that the resulting files will be located in ./dist and not in the top level of the module. I also make sure to only publish the dist files (+README/CHANGELOG/LICENSE) now using the files whitelist in package.json instead of the .npmignore blacklist.

I would now go ahead and introduce the breaking change of removing insecure RNGs (#173) and then put out a first 4.0.0-canary.0 under a different dist tag release. Fine for you?

Would like to put the functional changes into yet another PR though.

@ctavan ctavan requested a review from broofa January 20, 2020 20:57
@ctavan ctavan mentioned this pull request Jan 20, 2020
@ctavan ctavan changed the title Prepare for alpha release Prepare for canary release Jan 20, 2020
README_js.md Outdated
@@ -297,3 +297,13 @@ Type `uuid --help` for usage details
```shell
npm test
```

## Releasing
Copy link
Member

Choose a reason for hiding this comment

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

Is this relevant to users of this module? Only a very small handful of people will care about how the release process works. Consider moving to a wiki page for project maintainers?

Copy link
Member Author

Choose a reason for hiding this comment

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

Following this logic, the documentation on how to run the unit tests also wouldn't belong into the readme.

I moved both into the new CONTRIBUTING.md file. I personally find it hard to impossible to keep the wiki in sync with the code and would therefore prefer to keep such documentation within the repo.

package.json Outdated
"runmd": "1.2.1",
"selenium-webdriver": "~3.6.0",
"standard-version": "7.0.0"
"@babel/cli": "^7.8.3",
Copy link
Member

Choose a reason for hiding this comment

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

Change .npmrc to have save-prefix="^"

(For the record, I'd be okay removing version prefixes altogether so we have explicit versions throughout.)

Copy link
Member Author

Choose a reason for hiding this comment

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

I switched to explicit versions.

Since the devDependencies are pinned in the package-lock.json anyways
there's no real use in leaving a version range open for the
devDependencies in package.json.

Instead, we simply keep our toolchain up-to-date with tools like ncu.

With this commit I also re-generate package-lock.json from scratch.
@ctavan ctavan force-pushed the prepare-for-alpha-release branch 2 times, most recently from 8bcf458 to fd69d1b Compare January 21, 2020 12:27
Since we have a build step now we must point the package.json file
reference to the dist folder and must explicitly list all files that we
want to be included in the npm tarball.

The initial idea was to prepare the contents of the final npm tarball
all in the dist directory (including a copy of the package.json) but
that turns out not to work particularly well with standard-version which
is used to manage the version numbers and changelog.

Unfortunately this change also required a small workaround to allow
local installation of the uuid module in the examples (see .local/).

Also instructions for relasing a new version have not yet been
documented which is finally done here.

Since we now explicitly list all files to be included in the tarball
through the files property of package.json we no longer need the
.npmignore file.
@ctavan ctavan merged commit 380fe28 into next Jan 21, 2020
@ctavan ctavan deleted the prepare-for-alpha-release branch January 21, 2020 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants