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

Support .nvmrc #338

Merged
merged 67 commits into from Nov 29, 2021
Merged

Support .nvmrc #338

merged 67 commits into from Nov 29, 2021

Conversation

hkaur008
Copy link
Contributor

@hkaur008 hkaur008 commented Sep 30, 2021

Description

In scope of this pull request we add Node.js version file support. This pull request introduces new optional input: node-version-file, that accepts path (relative to repository root) to file containing Node.js version (for example .nvmrc).

The action will search for the Node.js version file and read the Node.js version if the file exists. If both inputs node-version and node-version-file are specified, the action will throw a warning and the node-version input will be used.

Example of yml

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
  with:
    node-version-file: '.nvmrc'
- run: npm install
- run: npm test

Related issue: #32

What's done:

  • - Adding Node.js version file support
  • - Adding tests
  • - Updating documentation

@hkaur008 hkaur008 marked this pull request as draft September 30, 2021 19:41
@hkaur008 hkaur008 changed the title Pull 209 Support .nvmrc Sep 30, 2021
@hkaur008
Copy link
Contributor Author

hkaur008 commented Oct 4, 2021

Is this reviewable now @Xlient I think we did all the tasks !

src/installer.ts Outdated Show resolved Hide resolved
__tests__/installer.test.ts Outdated Show resolved Hide resolved
added link to README
* migrated contents of version-file-workflow.yml to versions.yml
* further refactored parseNodeVersionFile() & tests
* removed type annotations in catch ()
docs/advanced-usage.md Outdated Show resolved Hide resolved
docs/advanced-usage.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/main.ts Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
* fix grammar in README & Advance usage docs
* update example in action.yml
src/main.ts Outdated Show resolved Hide resolved
@MaksimZhukov MaksimZhukov merged commit d08cf22 into actions:main Nov 29, 2021
@jameswald jameswald mentioned this pull request Nov 30, 2021
akash1810 added a commit to guardian/cdk that referenced this pull request Jan 27, 2022
Since actions/setup-node#338, GH's setup-node Action understands `.nvmrc` files.

This makes our `guardian/actions-setup-node` fork somewhat redundant now.

Move to GH's Action so we can deprecate our fork.
@jablko jablko mentioned this pull request May 2, 2022
2 tasks
deining pushed a commit to deining/setup-node that referenced this pull request Nov 9, 2023
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.5.2 to 4.5.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](microsoft/TypeScript@v4.5.2...v4.5.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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