docs: fix language, casing, and formatting across markdown files

This commit is contained in:
Kranthi Poturaju 2026-05-06 17:49:09 +05:30
parent 670825a89d
commit 05e89da72d
8 changed files with 56 additions and 56 deletions

View file

@ -3,11 +3,11 @@ Date: 2021-05-21
Status: Accepted
# Context
## Context
`actions/setup-node` is the 2nd most popular action in GitHub Actions. A lot of customers use it in conjunction with [actions/cache](https://github.com/actions/cache) to speed up dependencies installation.
See more examples on proper usage in [actions/cache documentation](https://github.com/actions/cache/blob/main/examples.md#node---npm).
# Goals & Anti-Goals
## Goals & Anti-Goals
Integration of caching functionality into `actions/setup-node` action will bring the following benefits for action users:
- Decrease the entry threshold for using the cache for Node.js dependencies and simplify initial configuration
- Simplify YAML pipelines because no need additional steps to enable caching
@ -16,23 +16,23 @@ Integration of caching functionality into `actions/setup-node` action will bring
We will add support for NPM and Yarn dependencies caching.
As the first stage, we won't support custom locations for `package-lock.json`, `yarn.lock` files and action will work only when files are located in repository root.
We don't pursue the goal to provide wide customization of caching in scope of `actions/setup-node` action. The purpose of this integration is covering ~90% of basic use-cases. If user needs flexible customization, we should advice them to use `actions/cache` directly.
We don't pursue the goal to provide wide customization of caching in scope of `actions/setup-node` action. The purpose of this integration is covering ~90% of basic use cases. If a user needs flexible customization, we should advise them to use `actions/cache` directly.
# Decision
## Decision
- Add `cache` input parameter to `actions/setup-node`. For now, input will accept the following values:
- `npm` - enable caching for npm dependencies
- `yarn` - enable caching for yarn dependencies
- `''` - disable caching (default value)
- Cache feature will be disabled by default to make sure that we don't break existing customers. We will consider enabling cache by default in next major release (`v3`)
- Action will try to search `package-lock.json` or `yarn.lock` (npm 7.x supports `yarn.lock` files) files in the repository root and throw error if no one is found
- The hash of found file will be used as cache key (the same approach like [actions/cache](https://github.com/actions/cache/blob/main/examples.md#node---npm) recommends)
- Action will try to search `package-lock.json` or `yarn.lock` (npm 7.x supports `yarn.lock` files) files in the repository root and throw an error if none is found
- The hash of the found file will be used as cache key (the same approach as [actions/cache](https://github.com/actions/cache/blob/main/examples.md#node---npm) recommends)
- The following key cache will be used `${{ runner.os }}-npm-${{ hashFiles('<package-lock-path>') }}`
- Action will cache global cache:
- Npm (retrieved via `npm config get cache`)
- Yarn 1 (retrieved via `yarn cache dir`)
- Yarn 2 (retrieved via `yarn config get cacheFolder`)
# Example of real use-cases
## Example of real use cases
Npm package manager:
```yml
steps:
@ -53,7 +53,7 @@ steps:
cache: yarn
```
# Release process
## Release process
As soon as functionality is implemented, we will release minor update of action. No need to bump major version since there are no breaking changes for existing users.
After that, we will update [starter-workflows](https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml) and [GitHub Action documentation](https://docs.github.com/en/actions/guides/building-and-testing-nodejs#example-caching-dependencies).

View file

@ -1,10 +1,10 @@
# 0. Support caching dependencies for mono repos
# 1. Support caching dependencies for mono repos
Date: 2021-07-13
Status: Proposed
## Context
Currently, `actions/setup-node` supports caching dependencies for Npm and Yarn package managers.
Currently, `actions/setup-node` supports caching dependencies for npm and Yarn package managers.
For the first iteration, we have decided to not support cases where `package-lock.json` / `yarn.lock` are located outside of repository root.
Current implementation searches the following file patterns in the repository root: `package-lock.json`, `yarn.lock` (in order of resolving priorities)
@ -13,10 +13,10 @@ We would like to revisit this decision and add customization for dependencies lo
## Proposal
We have the following options:
1. Allow to specify directory where `package-lock.json` or `yarn.lock` are located
2. Allow to specify path to the dependencies lock file (including directory path and filename)
1. Allow specifying a directory where `package-lock.json` or `yarn.lock` are located
2. Allow specifying a path to the dependency lock file (including directory path and filename)
The second option looks more generic because it allows to:
The second option looks more generic because it allows you to:
- specify multiple dependencies files using file patterns like `**/package-lock.json` ([one of recommended approaches in actions/cache](https://github.com/actions/cache/blob/main/examples.md#macos-and-ubuntu))
- specify custom dependencies files like `src/npm-shrinkwrap.json`
- change default resolving priority if both `yarn.lock` and `package-lock.json` exist in repository
@ -27,7 +27,7 @@ Add `cache-dependency-path` input that will accept path (relative to repository
If provided path contains wildcards, the action will search all matching files and calculate common hash like `${{ hashFiles('**/package-lock.json') }}` YAML construction does.
The hash of provided matched files will be used as a part of cache key.
Yaml examples:
YAML examples:
```yml
steps:
- uses: actions/checkout@v2