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

Fix version, update deps, switch to ncc, release 1.3.1 #18

Merged
merged 2 commits into from
Feb 26, 2024

Conversation

kolyshkin
Copy link
Contributor

Having node_modules in the repo is problematic. For one thing,
dependabot updates dependencies in package.json, but the old versions of
modules are still there in node_modules.

To fix this, let's switch away from having node_modules in the repo to
using ncc, as they recommend in [1] and [2].

Fix package version in package.json while we're at it.

This commit is mostly auto-generated, the only manual edited files are
package.json and .gitignore. Here is the workflow (using npm 8.9.12):

        $EDITOR package.json
        $EDITOR .gitignore
        git add .gitignore
        git rm -rf node_modules
        rm package-lock.json
        npm i
        npm i @actions/core # bump actions/core version
        git add dist
        git commit

NOTE that this also upgrades @actions/core to the latest 1.x release
(which is 1.10.x at the moment), which probably fixes the issue of GHA
warning about the use of deprecated set-output command. This happens
because ^1.0.9 means "latest 1.x" in npm.

These changes are tested here: https://github.com/opencontainers/runc/actions/runs/6017455860/job/16367756745

[1] https://github.com/actions/javascript-action/tree/main
[2] https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action

PS I know very little about js, npm, ncc, github actions etc. I was just tired that every time I am getting this warning:

The set-output command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

and decided to do something about it.

While at it, I would like to point out that @actions/github dependency used by this repo is obsoleted (also, the code in this repo does not work with its newer versions).

Having node_modules in the repo is problematic. For one thing,
dependabot updates dependencies in package.json, but the old versions of
modules are still there in node_modules.

To fix this, let's switch away from having node_modules in the repo to
using ncc, as they recommend in [1] and [2].

Fix package version in package.json while we're at it.

This commit is mostly auto-generated, the only manual edited files are
package.json and .gitignore. Here is the workflow (using npm 8.9.12):

        $EDITOR package.json
        $EDITOR .gitignore
        git add .gitignore
        git rm -rf node_modules
        rm package-lock.json
        npm i
	npm i @actions/core # bump actions/core version
        git add dist
        git commit

NOTE that this also upgrades @actions/core to the latest 1.x release
(which is 1.10.x at the moment), which probably fixes the issue of GHA
warning about the use of deprecated set-output command. This happens
because ^1.0.9 means "latest 1.x" in npm.

[1] https://github.com/actions/javascript-action/tree/main
[2] https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Changes from 1.3.0:

- switch from bare node_modules to ncc to compile the code;
- fix package version in `package.json`;
- bump actions/core 1.9.1 -> 1.10.0 (fixes GHA set-output warning);
- bump actions/github 2.1.1 - > 5.1.1.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
Copy link
Contributor Author

@Tim-Zhang PTAL 🙏🏻

Once this is merged, dependabot can be set up to automatically update dependencies -- meaning all you need to do is merge dependabot PRs and cut new releases from time to time.

@kolyshkin
Copy link
Contributor Author

In fact, dependabot is already enabled for this repo, but due to the fact we currently have node_modules directory, dependabot is not really updating anything. This PR fixes it.

@Tim-Zhang
Copy link
Collaborator

@kolyshkin Thanks and LGTM

@Tim-Zhang Tim-Zhang merged commit 198af03 into tim-actions:master Feb 26, 2024
@Tim-Zhang
Copy link
Collaborator

@kolyshkin I have invited you as the maintainer of the org, if you would like to help with maintaining this project, I would be very appreciate.

@kolyshkin
Copy link
Contributor Author

@kolyshkin I have invited you as the maintainer of the org, if you would like to help with maintaining this project, I would be very appreciate.

Sorry I missed it, can you please re-send?

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.

2 participants