You've already forked setup-node
mirror of
https://github.com/actions/setup-node.git
synced 2025-07-01 04:33:13 +07:00
Compare commits
30 Commits
v2-beta
...
v-mazhuk/a
Author | SHA1 | Date | |
---|---|---|---|
87a21fa69e | |||
e79375d669 | |||
5929471019 | |||
1bf30534fd | |||
ae26aaf1b5 | |||
5fddb2d510 | |||
8c35c6c880 | |||
24265e14d4 | |||
5c355be170 | |||
46071b5c7a | |||
05f0551dbd | |||
23bdee16bc | |||
4257181919 | |||
7f4d5225d8 | |||
68fafecfa4 | |||
c46424eee2 | |||
1d846de8c0 | |||
d06286dee6 | |||
d8c1b596a6 | |||
2bfa943ffb | |||
6c8a6e529a | |||
7d147e85af | |||
66dfac5328 | |||
312bbeecfd | |||
26a6dcb73b | |||
f4215cc0e0 | |||
14e150d2b1 | |||
5da2d61209 | |||
a600caf7cc | |||
8dde5bc004 |
13
.github/tsc.json
vendored
13
.github/tsc.json
vendored
@ -4,14 +4,15 @@
|
||||
"owner": "tsc",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
|
||||
"regexp": "^([^\\s].*)[\\(:](\\d+)[,:](\\d+)(?:\\):\\s+|\\s+-\\s+)(error|warning|info)\\s+TS(\\d+)\\s*:\\s*(.*)$",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"severity": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"code": 5,
|
||||
"message": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
6
.github/workflows/build-test.yml
vendored
6
.github/workflows/build-test.yml
vendored
@ -13,14 +13,14 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup node 12
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 12.x
|
||||
- run: npm ci
|
||||
|
27
.github/workflows/release-new-action-version.yml
vendored
Normal file
27
.github/workflows/release-new-action-version.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
name: Release new action version
|
||||
on:
|
||||
release:
|
||||
types: [released]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
TAG_NAME:
|
||||
description: 'Tag name that the major tag will point to'
|
||||
required: true
|
||||
|
||||
env:
|
||||
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
update_tag:
|
||||
name: Update the major tag to include the ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} changes
|
||||
environment:
|
||||
name: releaseNewActionVersion
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update the ${{ env.TAG_NAME }} tag
|
||||
uses: actions/publish-action@v0.1.0
|
||||
with:
|
||||
source-tag: ${{ env.TAG_NAME }}
|
||||
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
20
.github/workflows/versions.yml
vendored
20
.github/workflows/versions.yml
vendored
@ -13,11 +13,11 @@ on:
|
||||
|
||||
jobs:
|
||||
local-cache:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
node-version: [10, 12, 14]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -30,11 +30,11 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
manifest:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
node-version: [10.15, 12.16.0, 14.2.0]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -47,11 +47,11 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
check-latest:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
node-version: [10, 11, 12, 14]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -65,11 +65,11 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
node-dist:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
node-version: [11, 13]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -82,11 +82,11 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
old-versions:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
# test old versions which didn't have npm and layout different
|
||||
|
51
README.md
51
README.md
@ -10,21 +10,21 @@ This action sets by node environment for use in actions by:
|
||||
- registering problem matchers for error output
|
||||
- configuring authentication for GPR or npm
|
||||
|
||||
# v2-beta
|
||||
# v2
|
||||
|
||||
A beta release which adds reliability for pulling node distributions from a cache of node releases is available by referencing the `v2-beta` tag.
|
||||
This release adds reliability for pulling node distributions from a cache of node releases.
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2-beta
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '12'
|
||||
node-version: '14'
|
||||
```
|
||||
|
||||
It will first check the local cache for a semver match. The hosted images have been updated with the latest of each LTS from v8, v10, v12, and v14. `self-hosted` machines will benefit from the cache as well only downloading once. It will pull LTS versions from `main` branch of [node-versions](https://github.com/actions/node-versions/blob/main/versions-manifest.json) repository and on miss or failure, it will fall back to the previous behavior of download directly from [node dist](https://nodejs.org/dist/).
|
||||
The action will first check the local cache for a semver match. The hosted images have been updated with the latest of each LTS from v8, v10, v12, and v14. `self-hosted` machines will benefit from the cache as well only downloading once. The action will pull LTS versions from [node-versions releases](https://github.com/actions/node-versions/releases) and on miss or failure will fall back to the previous behavior of downloading directly from [node dist](https://nodejs.org/dist/).
|
||||
|
||||
The `node-version` input is optional. If not supplied, node which is in your PATH will be used. However, this action will still register problem matchers and support auth features. So setting up the node environment is still a valid scenario without downloading and caching versions.
|
||||
The `node-version` input is optional. If not supplied, the node version that is PATH will be used. However, this action will still register problem matchers and support auth features. So setting up the node environment is still a valid scenario without downloading and caching versions.
|
||||
|
||||
# Usage
|
||||
|
||||
@ -34,22 +34,27 @@ Basic:
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '12'
|
||||
node-version: '14'
|
||||
- run: npm install
|
||||
- run: npm test
|
||||
```
|
||||
|
||||
Check latest version:
|
||||
> In basic example, without `check-latest` flag, the action tries to resolve version from local cache firstly and download only if it is not found. Local cache on image is updated with a couple of weeks latency.
|
||||
`check-latest` flag forces the action to check if the cached version is the latest one. It reduces latency significantly but it is much more likely to incur version downloading.
|
||||
Check latest version:
|
||||
|
||||
In the basic example above, the `check-latest` flag defaults to `false`. When set to `false`, the action tries to first resolve a version of node from the local cache. For information regarding locally cached versions of Node on GitHub hosted runners, check out [GitHub Actions Virtual Environments](https://github.com/actions/virtual-environments). The local version of Node in cache gets updated every couple of weeks. If unable to find a specific version in the cache, the action will then attempt to download a version of Node. Use the default or set `check-latest` to `false` if you prefer stability and if you want to ensure a specific version of Node is always used.
|
||||
|
||||
If `check-latest` is set to `true`, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, a version of Node will then be downloaded. Set `check-latest` to `true` it you want the most up-to-date version of Node to always be used.
|
||||
|
||||
> Setting `check-latest` to `true` has performance implications as downloading versions of Node is slower than using cached versions
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2-beta
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '12'
|
||||
node-version: '14'
|
||||
check-latest: true
|
||||
- run: npm install
|
||||
- run: npm test
|
||||
@ -62,12 +67,12 @@ jobs:
|
||||
runs-on: ubuntu-16.04
|
||||
strategy:
|
||||
matrix:
|
||||
node: [ '10', '12' ]
|
||||
node: [ '12', '14' ]
|
||||
name: Node ${{ matrix.node }} sample
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- run: npm install
|
||||
@ -86,9 +91,9 @@ jobs:
|
||||
name: Node sample
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '12'
|
||||
node-version: '14'
|
||||
architecture: 'x64' # optional, x64 or x86. If not specified, x64 will be used by default
|
||||
- run: npm install
|
||||
- run: npm test
|
||||
@ -121,7 +126,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
architecture: ${{ matrix.architecture }}
|
||||
@ -133,7 +138,7 @@ Publish to npmjs and GPR with npm:
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '10.x'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
@ -141,7 +146,7 @@ steps:
|
||||
- run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
- uses: actions/setup-node@v1
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
registry-url: 'https://npm.pkg.github.com'
|
||||
- run: npm publish
|
||||
@ -153,7 +158,7 @@ Publish to npmjs and GPR with yarn:
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '10.x'
|
||||
registry-url: <registry url>
|
||||
@ -161,7 +166,7 @@ steps:
|
||||
- run: yarn publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.YARN_TOKEN }}
|
||||
- uses: actions/setup-node@v1
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
registry-url: 'https://npm.pkg.github.com'
|
||||
- run: yarn publish
|
||||
@ -173,7 +178,7 @@ Use private packages:
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '10.x'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
@ -123,4 +123,13 @@ describe('authutil tests', () => {
|
||||
expect(rc['registry']).toBe('https://registry.npmjs.org/');
|
||||
expect(rc['always-auth']).toBe('true');
|
||||
});
|
||||
it('It is already set the NODE_AUTH_TOKEN export it ', async () => {
|
||||
process.env.NODE_AUTH_TOKEN = 'foobar';
|
||||
await auth.configAuthentication('npm.pkg.github.com', 'false');
|
||||
expect(fs.statSync(rcFile)).toBeDefined();
|
||||
let rc = readRcFile(rcFile);
|
||||
expect(rc['@ownername:registry']).toBe('npm.pkg.github.com/');
|
||||
expect(rc['always-auth']).toBe('false');
|
||||
expect(process.env.NODE_AUTH_TOKEN).toEqual('foobar');
|
||||
});
|
||||
});
|
||||
|
@ -8,15 +8,10 @@ import path from 'path';
|
||||
import * as main from '../src/main';
|
||||
import * as im from '../src/installer';
|
||||
import * as auth from '../src/authutil';
|
||||
import {context} from '@actions/github';
|
||||
|
||||
let nodeTestManifest = require('./data/versions-manifest.json');
|
||||
let nodeTestDist = require('./data/node-dist-index.json');
|
||||
|
||||
// let matchers = require('../matchers.json');
|
||||
// let matcherPattern = matchers.problemMatcher[0].pattern[0];
|
||||
// let matcherRegExp = new RegExp(matcherPattern.regexp);
|
||||
|
||||
describe('setup-node', () => {
|
||||
let inputs = {} as any;
|
||||
let os = {} as any;
|
||||
|
43
__tests__/problem-matcher.test.ts
Normal file
43
__tests__/problem-matcher.test.ts
Normal file
@ -0,0 +1,43 @@
|
||||
describe('problem matcher tests', () => {
|
||||
it('tsc: matches TypeScript "pretty" error message', () => {
|
||||
const [
|
||||
{
|
||||
pattern: [{regexp}]
|
||||
}
|
||||
] = require('../.github/tsc.json').problemMatcher;
|
||||
const exampleErrorMessage =
|
||||
"lib/index.js:23:42 - error TS2345: Argument of type 'A' is not assignable to parameter of type 'B'.";
|
||||
|
||||
const match = exampleErrorMessage.match(new RegExp(regexp));
|
||||
expect(match).not.toBeNull();
|
||||
expect(match![1]).toEqual('lib/index.js');
|
||||
expect(match![2]).toEqual('23');
|
||||
expect(match![3]).toEqual('42');
|
||||
expect(match![4]).toEqual('error');
|
||||
expect(match![5]).toEqual('2345');
|
||||
expect(match![6]).toEqual(
|
||||
"Argument of type 'A' is not assignable to parameter of type 'B'."
|
||||
);
|
||||
});
|
||||
|
||||
it('tsc: matches TypeScript error message from log file', () => {
|
||||
const [
|
||||
{
|
||||
pattern: [{regexp}]
|
||||
}
|
||||
] = require('../.github/tsc.json').problemMatcher;
|
||||
const exampleErrorMessage =
|
||||
"lib/index.js(23,42): error TS2345: Argument of type 'A' is not assignable to parameter of type 'B'.";
|
||||
|
||||
const match = exampleErrorMessage.match(new RegExp(regexp));
|
||||
expect(match).not.toBeNull();
|
||||
expect(match![1]).toEqual('lib/index.js');
|
||||
expect(match![2]).toEqual('23');
|
||||
expect(match![3]).toEqual('42');
|
||||
expect(match![4]).toEqual('error');
|
||||
expect(match![5]).toEqual('2345');
|
||||
expect(match![6]).toEqual(
|
||||
"Argument of type 'A' is not assignable to parameter of type 'B'."
|
||||
);
|
||||
});
|
||||
});
|
10
dist/index.js
vendored
10
dist/index.js
vendored
@ -4728,9 +4728,9 @@ function run() {
|
||||
auth.configAuthentication(registryUrl, alwaysAuth);
|
||||
}
|
||||
const matchersPath = path.join(__dirname, '..', '.github');
|
||||
console.log(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
|
||||
console.log(`##[add-matcher]${path.join(matchersPath, 'eslint-stylish.json')}`);
|
||||
console.log(`##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`);
|
||||
core.info(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
|
||||
core.info(`##[add-matcher]${path.join(matchersPath, 'eslint-stylish.json')}`);
|
||||
core.info(`##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`);
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(error.message);
|
||||
@ -4803,8 +4803,8 @@ function writeRegistryToFile(registryUrl, fileLocation, alwaysAuth) {
|
||||
newContents += `${authString}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}`;
|
||||
fs.writeFileSync(fileLocation, newContents);
|
||||
core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
|
||||
// Export empty node_auth_token so npm doesn't complain about not being able to find it
|
||||
core.exportVariable('NODE_AUTH_TOKEN', 'XXXXX-XXXXX-XXXXX-XXXXX');
|
||||
// Export empty node_auth_token if didn't exist so npm doesn't complain about not being able to find it
|
||||
core.exportVariable('NODE_AUTH_TOKEN', process.env.NODE_AUTH_TOKEN || 'XXXXX-XXXXX-XXXXX-XXXXX');
|
||||
}
|
||||
//# sourceMappingURL=authutil.js.map
|
||||
|
||||
|
59
docs/adrs/0000-caching-dependencies.md
Normal file
59
docs/adrs/0000-caching-dependencies.md
Normal file
@ -0,0 +1,59 @@
|
||||
# 0. Caching dependencies
|
||||
Date: 2021-05-21
|
||||
|
||||
Status: Proposed
|
||||
|
||||
# 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
|
||||
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
|
||||
- More users will use cache for Node.js so more customers will have fast builds!
|
||||
|
||||
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.
|
||||
|
||||
# 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)
|
||||
- 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
|
||||
Npm package manager:
|
||||
```yml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
cache: npm
|
||||
```
|
||||
|
||||
Yarn package manager:
|
||||
```yml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
cache: yarn
|
||||
```
|
||||
|
||||
# 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).
|
6
package-lock.json
generated
6
package-lock.json
generated
@ -6336,9 +6336,9 @@
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
|
||||
"version": "4.17.19",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
||||
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.get": {
|
||||
|
@ -53,6 +53,9 @@ function writeRegistryToFile(
|
||||
newContents += `${authString}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}`;
|
||||
fs.writeFileSync(fileLocation, newContents);
|
||||
core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
|
||||
// Export empty node_auth_token so npm doesn't complain about not being able to find it
|
||||
core.exportVariable('NODE_AUTH_TOKEN', 'XXXXX-XXXXX-XXXXX-XXXXX');
|
||||
// Export empty node_auth_token if didn't exist so npm doesn't complain about not being able to find it
|
||||
core.exportVariable(
|
||||
'NODE_AUTH_TOKEN',
|
||||
process.env.NODE_AUTH_TOKEN || 'XXXXX-XXXXX-XXXXX-XXXXX'
|
||||
);
|
||||
}
|
||||
|
@ -46,11 +46,11 @@ export async function run() {
|
||||
}
|
||||
|
||||
const matchersPath = path.join(__dirname, '..', '.github');
|
||||
console.log(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
|
||||
console.log(
|
||||
core.info(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
|
||||
core.info(
|
||||
`##[add-matcher]${path.join(matchersPath, 'eslint-stylish.json')}`
|
||||
);
|
||||
console.log(
|
||||
core.info(
|
||||
`##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`
|
||||
);
|
||||
} catch (error) {
|
||||
|
Reference in New Issue
Block a user