-
Notifications
You must be signed in to change notification settings - Fork 74
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
Upgrade action to Node v16 and actions/core to v1.10 #68
Conversation
@JamesMessinger Just wondering if you are still actively maintaining this, it's really nice work and very well tested! If you need some more help let me know. |
1e230fb
to
7415f4b
Compare
6b200d7
to
df18bcb
Compare
Fails with Path contains invalid characters: D:\a\npm-publish\npm-publish\coverage\lcov-report\webpack:\@jsdevtools\npm-publish\src
Nice work @razor-x 👍 Hope this will be merged. |
@rkrauskopf @JamesMessinger could you please let us know if there will be any further development of this action? It would be great to get some of the PRs merged to remove the warnings. I fully understand that commitments and priorities change, if you need help then I'm sure some of us that make use of the action would be willing to help out. If not then thanks for starting the project, but we need to know so that we should be moving to other options going forward e.g. @razor-x's fork. |
It has been month and a half without a comment from @rkrauskopf or @JamesMessinger and 10 months since there have been any commits to the project. I think we have to assume this project is abandoned now. @razor-x would you be willing to tag a version on your fork that matches your latest set of PRs that we can reference in Actions (rather than a moving target of |
@hardillb Actually I had already tagged v1 for this: https://github.com/rxfork/npm-publish/releases/tag/v1. This should be a stable tag to use as I don't have plans to make changes to this fork unless we run into more issues or warnings. I'd be happy to take over as maintainer here and open things up to more maintainers if @rkrauskopf or @JamesMessinger would take notice of this thread. We can try their email and link back here. I'd much prefer to a keep this repo or transfer it rather than move to a fork. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Howdy! Thanks for your work getting the various issues with this repo sorted out. I'm a new maintainer here, and I'd love to get this work in and released ASAP. I've got a few minor notes and questions; please let me know if I can be of any help!
@@ -39,14 +39,13 @@ | |||
"test": "mocha && npm run lint", | |||
"coverage": "nyc -x test -x dist/sourcemap-register.js node_modules/mocha/bin/mocha", | |||
"upgrade": "npm-check -u && npm audit fix", | |||
"bump": "bump --tag --push --all && git tag -afm v1 v1 && git push --tags --force", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this script removed? It looks like the "release"
script below relies on it. Should both bump
and release
be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been so long since I looked at this I can't remember. Maybe an issue I hit when trying to develop on a fork if I had to guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these scripts were calling out to https://github.com/JS-DevTools/version-bump-prompt. I think it's fine to remove the scripts (and the dev dep below on @jsdevtools/version-bump-prompt
) because:
- It's redundant with the vanilla
npm version
command - CI will run tests before allowing a release to happen
- Any package under @jsdevtools is relatively unlikely to see any maintenance
}, | ||
"devDependencies": { | ||
"@actions/core": "^1.2.6", | ||
"@actions/core": "^1.10.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
@mcous So glad to see this project has an active maintainer again! I was about to close this PR now, as I cannot commit the time to resolve the new conflicts resulting from your recent changes. Personally, I would have preferred if you have giving me the opportunity to respond to your comments first to merge this contribution, however if you would like to take over the branch and resolve the conflicts we can see what changes are left that may still be valuable to integrate. In the meantime, I will shift focus to the feature in my other PR: #69 |
My apologies for steamroller! I'll push the conflict resolution up and get this PR in. My company relies on this action to publish about a half-dozen npm packages, and the deprecations will cause those workflows to fail in less than two months, so I was feeling a little stressed and wanted to move as quickly as possible 😅 I'll make sure to request your review(s) moving forward |
Merge changes from main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcous I marked some changes with ⭐ that look valuable. Let me know what you think. For the test changes, up to you if think they are still relevant. Let me know and I can clean up the PR to only include the things we want to keep.
@@ -21,7 +21,7 @@ jobs: | |||
runs-on: ${{ matrix.os }} | |||
timeout-minutes: 10 | |||
strategy: | |||
fail-fast: true | |||
fail-fast: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐
@@ -61,5 +61,5 @@ outputs: | |||
description: The version number that was previously published to NPM | |||
|
|||
runs: | |||
using: node12 | |||
using: node16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐
"_eslint": "eslint \"**/*.@(js|ts)\"", | ||
"_prettier": "prettier \"**/*.@(js|ts|json|md|yml)\"" | ||
}, | ||
"engines": { | ||
"node": ">=16" | ||
}, | ||
"devDependencies": { | ||
"@actions/core": "^1.2.6", | ||
"@actions/core": "^1.10.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐
@@ -35,6 +35,7 @@ export async function npmPublish(opts: Options = {}): Promise<Results> { | |||
|
|||
let results: Results = { | |||
package: manifest.name, | |||
registry: options.registry, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐ But could be moved to other PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a consistent change, given that we may use a default value for registry
. Does it also need to be added to the action output?
@@ -9,6 +9,8 @@ const { EOL } = require("os"); | |||
|
|||
describe("GitHub Action - failure tests", () => { | |||
it("should fail if the NPM token isn't set", () => { | |||
files.create([{ path: "workspace/not-package.json", contents: {} }]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐ I think this is important, but can't remember why anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this line has no effect on the tests for me. Maybe it isn't needed anymore?
/** | ||
* Set output with logging to stdout for test support | ||
*/ | ||
function setOutput(...args: Parameters<typeof setOutputActionsCore>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I needed this to make the tests backwards compatible with how the new setOutput works. If things are working without it now maybe we don't need it anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my testing it seems like we don't need it locally, but we almost certainly need it in CI. Let's keep it! Otherwise we'd have to fiddle with the GITHUB_OUTPUT
env var or something.
Later, I'd like to refactor the tests to avoid calling @actions/core
directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! @razor-x I just realized I have permission to add maintainers so I'm going to add you, too, based on your maintenance of the working fork while this repo was unmaintained. Plus that way with two of us we're a little more protected from maintenance gaps
/** | ||
* Set output with logging to stdout for test support | ||
*/ | ||
function setOutput(...args: Parameters<typeof setOutputActionsCore>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my testing it seems like we don't need it locally, but we almost certainly need it in CI. Let's keep it! Otherwise we'd have to fiddle with the GITHUB_OUTPUT
env var or something.
Later, I'd like to refactor the tests to avoid calling @actions/core
directly
@@ -35,6 +35,7 @@ export async function npmPublish(opts: Options = {}): Promise<Results> { | |||
|
|||
let results: Results = { | |||
package: manifest.name, | |||
registry: options.registry, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a consistent change, given that we may use a default value for registry
. Does it also need to be added to the action output?
@@ -9,6 +9,8 @@ const { EOL } = require("os"); | |||
|
|||
describe("GitHub Action - failure tests", () => { | |||
it("should fail if the NPM token isn't set", () => { | |||
files.create([{ path: "workspace/not-package.json", contents: {} }]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this line has no effect on the tests for me. Maybe it isn't needed anymore?
@@ -39,14 +39,13 @@ | |||
"test": "mocha && npm run lint", | |||
"coverage": "nyc -x test -x dist/sourcemap-register.js node_modules/mocha/bin/mocha", | |||
"upgrade": "npm-check -u && npm audit fix", | |||
"bump": "bump --tag --push --all && git tag -afm v1 v1 && git push --tags --force", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these scripts were calling out to https://github.com/JS-DevTools/version-bump-prompt. I think it's fine to remove the scripts (and the dev dep below on @jsdevtools/version-bump-prompt
) because:
- It's redundant with the vanilla
npm version
command - CI will run tests before allowing a release to happen
- Any package under @jsdevtools is relatively unlikely to see any maintenance
Passing on my fork: https://github.com/rxfork/npm-publish/actions/runs/3820793379
To use this version while waiting for this PR to merge, you can put
Closes #61, closes #67