Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fe55358cd | ||
|
|
46071b5c7a | ||
|
|
05f0551dbd | ||
|
|
23bdee16bc | ||
|
|
4257181919 | ||
|
|
7f4d5225d8 | ||
|
|
68fafecfa4 | ||
|
|
c46424eee2 | ||
|
|
1d846de8c0 | ||
|
|
d06286dee6 | ||
|
|
d8c1b596a6 | ||
|
|
2bfa943ffb | ||
|
|
6c8a6e529a | ||
|
|
7d147e85af | ||
|
|
66dfac5328 | ||
|
|
312bbeecfd | ||
|
|
26a6dcb73b | ||
|
|
f4215cc0e0 | ||
|
|
14e150d2b1 | ||
|
|
5da2d61209 | ||
|
|
a600caf7cc | ||
|
|
8dde5bc004 |
+6
-5
@@ -4,12 +4,13 @@
|
|||||||
"owner": "tsc",
|
"owner": "tsc",
|
||||||
"pattern": [
|
"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,
|
"file": 1,
|
||||||
"location": 2,
|
"line": 2,
|
||||||
"severity": 3,
|
"column": 3,
|
||||||
"code": 4,
|
"severity": 4,
|
||||||
"message": 5
|
"code": 5,
|
||||||
|
"message": 6
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Setup node 12
|
- name: Setup node 12
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12.x
|
node-version: 12.x
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
local-cache:
|
local-cache:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
node-version: [10, 12, 14]
|
node-version: [10, 12, 14]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@@ -30,11 +30,11 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
manifest:
|
manifest:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
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]
|
node-version: [10.15, 12.16.0, 14.2.0]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@@ -47,11 +47,11 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
check-latest:
|
check-latest:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
node-version: [10, 11, 12, 14]
|
node-version: [10, 11, 12, 14]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@@ -65,11 +65,11 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
node-dist:
|
node-dist:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
node-version: [11, 13]
|
node-version: [11, 13]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@@ -82,11 +82,11 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
old-versions:
|
old-versions:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
# test old versions which didn't have npm and layout different
|
# test old versions which didn't have npm and layout different
|
||||||
|
|||||||
@@ -123,4 +123,13 @@ describe('authutil tests', () => {
|
|||||||
expect(rc['registry']).toBe('https://registry.npmjs.org/');
|
expect(rc['registry']).toBe('https://registry.npmjs.org/');
|
||||||
expect(rc['always-auth']).toBe('true');
|
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 main from '../src/main';
|
||||||
import * as im from '../src/installer';
|
import * as im from '../src/installer';
|
||||||
import * as auth from '../src/authutil';
|
import * as auth from '../src/authutil';
|
||||||
import {context} from '@actions/github';
|
|
||||||
|
|
||||||
let nodeTestManifest = require('./data/versions-manifest.json');
|
let nodeTestManifest = require('./data/versions-manifest.json');
|
||||||
let nodeTestDist = require('./data/node-dist-index.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', () => {
|
describe('setup-node', () => {
|
||||||
let inputs = {} as any;
|
let inputs = {} as any;
|
||||||
let os = {} as any;
|
let os = {} as any;
|
||||||
|
|||||||
@@ -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'."
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
Vendored
+8995
-14699
File diff suppressed because one or more lines are too long
Generated
+654
-295
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -25,21 +25,21 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.2.6",
|
||||||
"@actions/exec": "^1.0.3",
|
"@actions/exec": "^1.0.3",
|
||||||
"@actions/github": "^1.1.0",
|
"@actions/github": "^4.0.0",
|
||||||
"@actions/http-client": "^1.0.6",
|
"@actions/http-client": "^1.0.6",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
"@actions/tool-cache": "^1.5.4",
|
"@actions/tool-cache": "^1.5.4",
|
||||||
"semver": "^6.1.1"
|
"semver": "^6.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^24.0.13",
|
"@types/jest": "^24.9.1",
|
||||||
"@types/node": "^12.0.4",
|
"@types/node": "^12.0.4",
|
||||||
"@types/semver": "^6.0.0",
|
"@types/semver": "^6.0.0",
|
||||||
"@zeit/ncc": "^0.21.0",
|
"@vercel/ncc": "^0.27.0",
|
||||||
"jest": "^24.9.0",
|
"jest": "^24.9.0",
|
||||||
"jest-circus": "^24.7.1",
|
"jest-circus": "^24.7.1",
|
||||||
"prettier": "^1.19.1",
|
"prettier": "^1.19.1",
|
||||||
"ts-jest": "^24.3.0",
|
"ts-jest": "^24.3.0",
|
||||||
"typescript": "^3.8.3"
|
"typescript": "^3.9.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-2
@@ -53,6 +53,9 @@ function writeRegistryToFile(
|
|||||||
newContents += `${authString}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}`;
|
newContents += `${authString}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}`;
|
||||||
fs.writeFileSync(fileLocation, newContents);
|
fs.writeFileSync(fileLocation, newContents);
|
||||||
core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
|
core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
|
||||||
// Export empty node_auth_token so npm doesn't complain about not being able to find it
|
// 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', 'XXXXX-XXXXX-XXXXX-XXXXX');
|
core.exportVariable(
|
||||||
|
'NODE_AUTH_TOKEN',
|
||||||
|
process.env.NODE_AUTH_TOKEN || 'XXXXX-XXXXX-XXXXX-XXXXX'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -46,11 +46,11 @@ export async function run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const matchersPath = path.join(__dirname, '..', '.github');
|
const matchersPath = path.join(__dirname, '..', '.github');
|
||||||
console.log(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
|
core.info(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
|
||||||
console.log(
|
core.info(
|
||||||
`##[add-matcher]${path.join(matchersPath, 'eslint-stylish.json')}`
|
`##[add-matcher]${path.join(matchersPath, 'eslint-stylish.json')}`
|
||||||
);
|
);
|
||||||
console.log(
|
core.info(
|
||||||
`##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`
|
`##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user