Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db85182887 | ||
|
|
2c234bce3a | ||
|
|
144d8382dc | ||
|
|
312efa3fe7 | ||
|
|
80a36d9d60 | ||
|
|
65016ec9b7 | ||
|
|
3d1e3ce8df | ||
|
|
73a0f27e98 | ||
|
|
77ed158ade | ||
|
|
93da09c311 | ||
|
|
99c24207f2 |
+3
-4
@@ -14,12 +14,11 @@ module.exports = {
|
||||
'^@actions/http-client/lib/auth$': '<rootDir>/packages/http-client/lib/auth.js',
|
||||
'^@actions/http-client/lib/interfaces$': '<rootDir>/packages/http-client/lib/interfaces.js',
|
||||
'^@actions/github$': '<rootDir>/packages/github/lib/github.js',
|
||||
'^@actions/github/lib/utils$': '<rootDir>/packages/github/lib/utils.js',
|
||||
'^@actions/glob$': '<rootDir>/packages/glob/lib/glob.js',
|
||||
'^@actions/tool-cache$': '<rootDir>/packages/tool-cache/lib/tool-cache.js'
|
||||
'^@actions/github/lib/utils$': '<rootDir>/packages/github/lib/utils.js'
|
||||
},
|
||||
transform: {
|
||||
'^.+\\.(ts|js)$': ['ts-jest', {
|
||||
isolatedModules: true,
|
||||
diagnostics: {warnOnly: true},
|
||||
tsconfig: {
|
||||
allowJs: true,
|
||||
@@ -30,7 +29,7 @@ module.exports = {
|
||||
}]
|
||||
},
|
||||
transformIgnorePatterns: [
|
||||
'/node_modules/(?!(@octokit|@actions/github|@actions/http-client|@actions/io|@actions/exec|@actions/core|@actions/glob|@actions/tool-cache|universal-user-agent|before-after-hook)/)'
|
||||
'/node_modules/(?!(@octokit|@actions/github|@actions/http-client|@actions/io|@actions/exec|@actions/core|universal-user-agent|before-after-hook)/)'
|
||||
],
|
||||
verbose: true
|
||||
}
|
||||
|
||||
+11
-21
@@ -1,43 +1,33 @@
|
||||
# @actions/glob Releases
|
||||
|
||||
## 0.6.0
|
||||
|
||||
- **Breaking change**: Package is now ESM-only
|
||||
- CommonJS consumers must use dynamic `import()` instead of `require()`
|
||||
|
||||
## 0.5.1
|
||||
### 0.5.1
|
||||
|
||||
- Bump `@actions/core` to `2.0.3`
|
||||
|
||||
## 0.5.0
|
||||
|
||||
### 0.5.0
|
||||
- Added `excludeHiddenFiles` option, which is disabled by default to preserve existing behavior [#1791: Add glob option to ignore hidden files](https://github.com/actions/toolkit/pull/1791)
|
||||
|
||||
## 0.4.0
|
||||
|
||||
### 0.4.0
|
||||
- Pass in the current workspace as a parameter to HashFiles [#1318](https://github.com/actions/toolkit/pull/1318)
|
||||
|
||||
## 0.3.0
|
||||
|
||||
### 0.3.0
|
||||
- Added a `verbose` option to HashFiles [#1052](https://github.com/actions/toolkit/pull/1052/files)
|
||||
|
||||
## 0.2.1
|
||||
|
||||
- Update `lockfileVersion` to `v2` in `package-lock.json` [#1023](https://github.com/actions/toolkit/pull/1023)
|
||||
|
||||
## 0.2.0
|
||||
### 0.2.1
|
||||
- Update `lockfileVersion` to `v2` in `package-lock.json [#1023](https://github.com/actions/toolkit/pull/1023)
|
||||
|
||||
### 0.2.0
|
||||
- [Added the hashFiles function to Glob](https://github.com/actions/toolkit/pull/830)
|
||||
- [Added an option to filter out directories](https://github.com/actions/toolkit/pull/728)
|
||||
|
||||
## 0.1.2
|
||||
### 0.1.2
|
||||
|
||||
- [Fix bug where files were matched incorrectly](https://github.com/actions/toolkit/pull/805)
|
||||
|
||||
## 0.1.1
|
||||
### 0.1.1
|
||||
|
||||
- Update @actions/core version
|
||||
|
||||
## 0.1.0
|
||||
### 0.1.0
|
||||
|
||||
- Initial release
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as io from '../../io/src/io.js'
|
||||
import * as io from '../../io/src/io'
|
||||
import * as path from 'path'
|
||||
import {hashFiles} from '../src/glob.js'
|
||||
import {hashFiles} from '../src/glob'
|
||||
import {promises as fs} from 'fs'
|
||||
|
||||
const IS_WINDOWS = process.platform === 'win32'
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as child from 'child_process'
|
||||
import * as io from '../../io/src/io.js'
|
||||
import * as io from '../../io/src/io'
|
||||
import * as os from 'os'
|
||||
import * as path from 'path'
|
||||
import {Globber, DefaultGlobber} from '../src/internal-globber.js'
|
||||
import {GlobOptions} from '../src/internal-glob-options.js'
|
||||
import {Globber, DefaultGlobber} from '../src/internal-globber'
|
||||
import {GlobOptions} from '../src/internal-glob-options'
|
||||
import {promises as fs} from 'fs'
|
||||
|
||||
const IS_WINDOWS = process.platform === 'win32'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as pathHelper from '../src/internal-path-helper.js'
|
||||
import * as pathHelper from '../src/internal-path-helper'
|
||||
|
||||
const IS_WINDOWS = process.platform === 'win32'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as path from 'path'
|
||||
import {Path} from '../src/internal-path.js'
|
||||
import {Path} from '../src/internal-path'
|
||||
|
||||
const IS_WINDOWS = process.platform === 'win32'
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as path from 'path'
|
||||
import * as patternHelper from '../src/internal-pattern-helper.js'
|
||||
import {MatchKind} from '../src/internal-match-kind.js'
|
||||
import {IS_WINDOWS} from '../../io/src/io-util.js'
|
||||
import {Pattern} from '../src/internal-pattern.js'
|
||||
import * as patternHelper from '../src/internal-pattern-helper'
|
||||
import {MatchKind} from '../src/internal-match-kind'
|
||||
import {IS_WINDOWS} from '../../io/src/io-util'
|
||||
import {Pattern} from '../src/internal-pattern'
|
||||
|
||||
describe('pattern-helper', () => {
|
||||
it('getSearchPaths omits negate search paths', () => {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as io from '../../io/src/io.js'
|
||||
import * as io from '../../io/src/io'
|
||||
import * as os from 'os'
|
||||
import * as path from 'path'
|
||||
import {MatchKind} from '../src/internal-match-kind.js'
|
||||
import {MatchKind} from '../src/internal-match-kind'
|
||||
import {promises as fs} from 'fs'
|
||||
import {Pattern} from '../src/internal-pattern.js'
|
||||
import {Pattern} from '../src/internal-pattern'
|
||||
|
||||
const IS_WINDOWS = process.platform === 'win32'
|
||||
|
||||
|
||||
Generated
+18
-18
@@ -1,41 +1,41 @@
|
||||
{
|
||||
"name": "@actions/glob",
|
||||
"version": "0.6.0",
|
||||
"version": "0.5.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@actions/glob",
|
||||
"version": "0.6.0",
|
||||
"version": "0.5.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^3.0.0",
|
||||
"@actions/core": "^2.0.3",
|
||||
"minimatch": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/core": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.0.tgz",
|
||||
"integrity": "sha512-zYt6cz+ivnTmiT/ksRVriMBOiuoUpDCJJlZ5KPl2/FRdvwU3f7MPh9qftvbkXJThragzUZieit2nyHUyw53Seg==",
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-2.0.3.tgz",
|
||||
"integrity": "sha512-Od9Thc3T1mQJYddvVPM4QGiLUewdh+3txmDYHHxoNdkqysR1MbCT+rFOtNUxYAz+7+6RIsqipVahY2GJqGPyxA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/exec": "^3.0.0",
|
||||
"@actions/http-client": "^4.0.0"
|
||||
"@actions/exec": "^2.0.0",
|
||||
"@actions/http-client": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/exec": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-3.0.0.tgz",
|
||||
"integrity": "sha512-6xH/puSoNBXb72VPlZVm7vQ+svQpFyA96qdDBvhB8eNZOE8LtPf9L4oAsfzK/crCL8YZ+19fKYVnM63Sl+Xzlw==",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-2.0.0.tgz",
|
||||
"integrity": "sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/io": "^3.0.2"
|
||||
"@actions/io": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/http-client": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-4.0.0.tgz",
|
||||
"integrity": "sha512-QuwPsgVMsD6qaPD57GLZi9sqzAZCtiJT8kVBCDpLtxhL5MydQ4gS+DrejtZZPdIYyB1e95uCK9Luyds7ybHI3g==",
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz",
|
||||
"integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tunnel": "^0.0.6",
|
||||
@@ -43,9 +43,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/io": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-3.0.2.tgz",
|
||||
"integrity": "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-2.0.0.tgz",
|
||||
"integrity": "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@actions/glob",
|
||||
"version": "0.6.0",
|
||||
"version": "0.5.1",
|
||||
"preview": true,
|
||||
"description": "Actions glob lib",
|
||||
"keywords": [
|
||||
@@ -10,15 +10,8 @@
|
||||
],
|
||||
"homepage": "https://github.com/actions/toolkit/tree/main/packages/glob",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"main": "lib/glob.js",
|
||||
"types": "lib/glob.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./lib/glob.d.ts",
|
||||
"import": "./lib/glob.js"
|
||||
}
|
||||
},
|
||||
"directories": {
|
||||
"lib": "lib",
|
||||
"test": "__tests__"
|
||||
@@ -44,7 +37,7 @@
|
||||
"url": "https://github.com/actions/toolkit/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/core": "^3.0.0",
|
||||
"@actions/core": "^2.0.3",
|
||||
"minimatch": "^3.0.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {Globber, DefaultGlobber} from './internal-globber.js'
|
||||
import {GlobOptions} from './internal-glob-options.js'
|
||||
import {HashFileOptions} from './internal-hash-file-options.js'
|
||||
import {hashFiles as _hashFiles} from './internal-hash-files.js'
|
||||
import {Globber, DefaultGlobber} from './internal-globber'
|
||||
import {GlobOptions} from './internal-glob-options'
|
||||
import {HashFileOptions} from './internal-hash-file-options'
|
||||
import {hashFiles as _hashFiles} from './internal-hash-files'
|
||||
|
||||
export {Globber, GlobOptions}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as core from '@actions/core'
|
||||
import {GlobOptions} from './internal-glob-options.js'
|
||||
import {GlobOptions} from './internal-glob-options'
|
||||
|
||||
/**
|
||||
* Returns a copy with defaults filled in.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as fs from 'fs'
|
||||
import * as globOptionsHelper from './internal-glob-options-helper.js'
|
||||
import * as globOptionsHelper from './internal-glob-options-helper'
|
||||
import * as path from 'path'
|
||||
import * as patternHelper from './internal-pattern-helper.js'
|
||||
import {GlobOptions} from './internal-glob-options.js'
|
||||
import {MatchKind} from './internal-match-kind.js'
|
||||
import {Pattern} from './internal-pattern.js'
|
||||
import {SearchState} from './internal-search-state.js'
|
||||
import * as patternHelper from './internal-pattern-helper'
|
||||
import {GlobOptions} from './internal-glob-options'
|
||||
import {MatchKind} from './internal-match-kind'
|
||||
import {Pattern} from './internal-pattern'
|
||||
import {SearchState} from './internal-search-state'
|
||||
|
||||
const IS_WINDOWS = process.platform === 'win32'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import * as fs from 'fs'
|
||||
import * as stream from 'stream'
|
||||
import * as util from 'util'
|
||||
import * as path from 'path'
|
||||
import {Globber} from './glob.js'
|
||||
import {Globber} from './glob'
|
||||
|
||||
export async function hashFiles(
|
||||
globber: Globber,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as path from 'path'
|
||||
import * as pathHelper from './internal-path-helper.js'
|
||||
import * as pathHelper from './internal-path-helper'
|
||||
import assert from 'assert'
|
||||
|
||||
const IS_WINDOWS = process.platform === 'win32'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as pathHelper from './internal-path-helper.js'
|
||||
import {MatchKind} from './internal-match-kind.js'
|
||||
import {Pattern} from './internal-pattern.js'
|
||||
import * as pathHelper from './internal-path-helper'
|
||||
import {MatchKind} from './internal-match-kind'
|
||||
import {Pattern} from './internal-pattern'
|
||||
|
||||
const IS_WINDOWS = process.platform === 'win32'
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import * as os from 'os'
|
||||
import * as path from 'path'
|
||||
import * as pathHelper from './internal-path-helper.js'
|
||||
import * as pathHelper from './internal-path-helper'
|
||||
import assert from 'assert'
|
||||
import {Minimatch, IMinimatch, IOptions as IMinimatchOptions} from 'minimatch'
|
||||
import {MatchKind} from './internal-match-kind.js'
|
||||
import {Path} from './internal-path.js'
|
||||
import {MatchKind} from './internal-match-kind'
|
||||
import {Path} from './internal-path'
|
||||
|
||||
const IS_WINDOWS = process.platform === 'win32'
|
||||
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "./lib",
|
||||
"rootDir": "./src",
|
||||
"module": "node16",
|
||||
"moduleResolution": "node16"
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"include": [
|
||||
"./src"
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
# @actions/tool-cache Releases
|
||||
|
||||
## 4.0.0
|
||||
|
||||
- **Breaking change**: Package is now ESM-only
|
||||
- CommonJS consumers must use dynamic `import()` instead of `require()`
|
||||
|
||||
### 3.0.1
|
||||
|
||||
- Bump `@actions/http-client` to `3.0.2`
|
||||
@@ -22,36 +17,29 @@
|
||||
- Remove dependency on `uuid` package [#1824](https://github.com/actions/toolkit/pull/1824), [#1842](https://github.com/actions/toolkit/pull/1842)
|
||||
|
||||
### 2.0.1
|
||||
|
||||
- Update to v2.0.1 of `@actions/http-client` [#1087](https://github.com/actions/toolkit/pull/1087)
|
||||
|
||||
### 2.0.0
|
||||
|
||||
- Update to v2.0.0 of `@actions/http-client`
|
||||
- The type of the `headers` parameter in the exported function `downloadTool` has been narrowed from `{ [header: string]: any }` to `{ [header: string]: number | string | string[] | undefined; }` (that is, `http.OutgoingHttpHeaders`).
|
||||
This is strictly a compile-time change for TypeScript consumers. Previous attempts to use a header value of a type other than those now accepted would have resulted in an error at run time.
|
||||
|
||||
### 1.7.2
|
||||
|
||||
- Update `lockfileVersion` to `v2` in `package-lock.json` [#1025](https://github.com/actions/toolkit/pull/1025)
|
||||
- Update `lockfileVersion` to `v2` in `package-lock.json [#1025](https://github.com/actions/toolkit/pull/1025)
|
||||
|
||||
### 1.7.1
|
||||
|
||||
- [Fallback to os-releases file to get linux version](https://github.com/actions/toolkit/pull/594)
|
||||
- [Update to latest @actions/io verison](https://github.com/actions/toolkit/pull/838)
|
||||
|
||||
### 1.7.0
|
||||
|
||||
- [Allow arbirtary headers when downloading tools to the tc](https://github.com/actions/toolkit/pull/530)
|
||||
- [Export `isExplicitVersion` and `evaluateVersions` functions](https://github.com/actions/toolkit/pull/796)
|
||||
- [Export `isExplicitVersion` and `evaluateVersions` functions](https://github.com/actions/toolkit/pull/796)
|
||||
- [Force overwrite on default when extracted compressed files](https://github.com/actions/toolkit/pull/807)
|
||||
|
||||
### 1.6.1
|
||||
|
||||
- [Update @actions/core version](https://github.com/actions/toolkit/pull/636)
|
||||
|
||||
### 1.6.0
|
||||
|
||||
- [Add extractXar function to extract XAR files](https://github.com/actions/toolkit/pull/207)
|
||||
|
||||
### 1.3.5
|
||||
@@ -94,4 +82,4 @@ Here is [the security issue](https://github.com/actions/http-client/pull/27) tha
|
||||
|
||||
### 1.0.0
|
||||
|
||||
- Initial release
|
||||
- Initial release
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as tc from '../src/tool-cache.js'
|
||||
import * as mm from '../src/manifest.js'
|
||||
import * as tc from '../src/tool-cache'
|
||||
import * as mm from '../src/manifest' // --> OFF
|
||||
|
||||
// needs to be require for core node modules to be mocked
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
@@ -36,7 +36,7 @@ describe('@actions/tool-cache-manifest', () => {
|
||||
archSpy.mockImplementation(() => os.arch)
|
||||
|
||||
execSpy = jest.spyOn(cp, 'execSync')
|
||||
readLsbSpy = jest.spyOn(mm._internal, 'readLinuxVersionFile')
|
||||
readLsbSpy = jest.spyOn(mm, '_readLinuxVersionFile')
|
||||
|
||||
getSpy = jest.spyOn(tc, 'getManifestFromRepo')
|
||||
getSpy.mockImplementation(() => <mm.IToolRelease[]>manifestData)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as core from '@actions/core'
|
||||
import {RetryHelper} from '../src/retry-helper.js'
|
||||
import {RetryHelper} from '../src/retry-helper'
|
||||
|
||||
let info: string[]
|
||||
let retryHelper: RetryHelper
|
||||
|
||||
@@ -12,7 +12,7 @@ process.env['RUNNER_TEMP'] = tempPath
|
||||
process.env['RUNNER_TOOL_CACHE'] = cachePath
|
||||
|
||||
// eslint-disable-next-line import/first
|
||||
import * as tc from '../src/tool-cache.js'
|
||||
import * as tc from '../src/tool-cache'
|
||||
|
||||
const IS_WINDOWS = process.platform === 'win32'
|
||||
const IS_MAC = process.platform === 'darwin'
|
||||
|
||||
Generated
+42
-33
@@ -1,48 +1,49 @@
|
||||
{
|
||||
"name": "@actions/tool-cache",
|
||||
"version": "4.0.0",
|
||||
"version": "3.0.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@actions/tool-cache",
|
||||
"version": "4.0.0",
|
||||
"version": "3.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^3.0.0",
|
||||
"@actions/exec": "^3.0.0",
|
||||
"@actions/http-client": "^4.0.0",
|
||||
"@actions/io": "^3.0.0",
|
||||
"semver": "^7.7.3"
|
||||
"@actions/core": "^2.0.1",
|
||||
"@actions/exec": "^2.0.0",
|
||||
"@actions/http-client": "^3.0.2",
|
||||
"@actions/io": "^2.0.0",
|
||||
"semver": "^6.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/semver": "^7.7.1",
|
||||
"nock": "^13.5.1"
|
||||
"@types/nock": "^11.1.0",
|
||||
"@types/semver": "^6.0.0",
|
||||
"nock": "^13.2.9"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/core": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.0.tgz",
|
||||
"integrity": "sha512-zYt6cz+ivnTmiT/ksRVriMBOiuoUpDCJJlZ5KPl2/FRdvwU3f7MPh9qftvbkXJThragzUZieit2nyHUyw53Seg==",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-2.0.1.tgz",
|
||||
"integrity": "sha512-oBfqT3GwkvLlo1fjvhQLQxuwZCGTarTE5OuZ2Wg10hvhBj7LRIlF611WT4aZS6fDhO5ZKlY7lCAZTlpmyaHaeg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/exec": "^3.0.0",
|
||||
"@actions/http-client": "^4.0.0"
|
||||
"@actions/exec": "^2.0.0",
|
||||
"@actions/http-client": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/exec": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-3.0.0.tgz",
|
||||
"integrity": "sha512-6xH/puSoNBXb72VPlZVm7vQ+svQpFyA96qdDBvhB8eNZOE8LtPf9L4oAsfzK/crCL8YZ+19fKYVnM63Sl+Xzlw==",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-2.0.0.tgz",
|
||||
"integrity": "sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/io": "^3.0.2"
|
||||
"@actions/io": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/http-client": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-4.0.0.tgz",
|
||||
"integrity": "sha512-QuwPsgVMsD6qaPD57GLZi9sqzAZCtiJT8kVBCDpLtxhL5MydQ4gS+DrejtZZPdIYyB1e95uCK9Luyds7ybHI3g==",
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz",
|
||||
"integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tunnel": "^0.0.6",
|
||||
@@ -50,15 +51,26 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/io": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-3.0.2.tgz",
|
||||
"integrity": "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-2.0.0.tgz",
|
||||
"integrity": "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/nock": {
|
||||
"version": "11.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/nock/-/nock-11.1.0.tgz",
|
||||
"integrity": "sha512-jI/ewavBQ7X5178262JQR0ewicPAcJhXS/iFaNJl0VHLfyosZ/kwSrsa6VNQNSO8i9d8SqdRgOtZSOKJ/+iNMw==",
|
||||
"deprecated": "This is a stub types definition. nock provides its own type definitions, so you do not need this installed.",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"nock": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/semver": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz",
|
||||
"integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==",
|
||||
"version": "6.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.2.7.tgz",
|
||||
"integrity": "sha512-blctEWbzUFzQx799RZjzzIdBJOXmE37YYEyDtKkx5Dg+V7o/zyyAxLPiI98A2jdTtDgxZleMdfV+7p8WbRJ1OQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -120,15 +132,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.7.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
|
||||
"integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/tunnel": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@actions/tool-cache",
|
||||
"version": "4.0.0",
|
||||
"version": "3.0.1",
|
||||
"description": "Actions tool-cache lib",
|
||||
"keywords": [
|
||||
"github",
|
||||
@@ -9,15 +9,8 @@
|
||||
],
|
||||
"homepage": "https://github.com/actions/toolkit/tree/main/packages/tool-cache",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"main": "lib/tool-cache.js",
|
||||
"types": "lib/tool-cache.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./lib/tool-cache.d.ts",
|
||||
"import": "./lib/tool-cache.js"
|
||||
}
|
||||
},
|
||||
"directories": {
|
||||
"lib": "lib",
|
||||
"test": "__tests__"
|
||||
@@ -43,14 +36,15 @@
|
||||
"url": "https://github.com/actions/toolkit/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/core": "^3.0.0",
|
||||
"@actions/exec": "^3.0.0",
|
||||
"@actions/http-client": "^4.0.0",
|
||||
"@actions/io": "^3.0.0",
|
||||
"semver": "^7.7.3"
|
||||
"@actions/core": "^2.0.1",
|
||||
"@actions/exec": "^2.0.0",
|
||||
"@actions/http-client": "^3.0.2",
|
||||
"@actions/io": "^2.0.0",
|
||||
"semver": "^6.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/semver": "^7.7.1",
|
||||
"nock": "^13.5.1"
|
||||
"@types/nock": "^11.1.0",
|
||||
"@types/semver": "^6.0.0",
|
||||
"nock": "^13.2.9"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,12 @@
|
||||
import * as semver from 'semver'
|
||||
import {debug} from '@actions/core'
|
||||
import * as os from 'os'
|
||||
import * as cp from 'child_process'
|
||||
import * as fs from 'fs'
|
||||
|
||||
// Internal object for testability (allows mocking in ESM)
|
||||
export const _internal = {
|
||||
readLinuxVersionFile(): string {
|
||||
const lsbReleaseFile = '/etc/lsb-release'
|
||||
const osReleaseFile = '/etc/os-release'
|
||||
let contents = ''
|
||||
// needs to be require for core node modules to be mocked
|
||||
/* eslint @typescript-eslint/no-require-imports: 0 */
|
||||
|
||||
if (fs.existsSync(lsbReleaseFile)) {
|
||||
contents = fs.readFileSync(lsbReleaseFile).toString()
|
||||
} else if (fs.existsSync(osReleaseFile)) {
|
||||
contents = fs.readFileSync(osReleaseFile).toString()
|
||||
}
|
||||
|
||||
return contents
|
||||
}
|
||||
}
|
||||
import os = require('os')
|
||||
import cp = require('child_process')
|
||||
import fs = require('fs')
|
||||
|
||||
/*
|
||||
NOTE: versions must be sorted descending by version in the manifest
|
||||
@@ -99,7 +86,7 @@ export async function _findMatch(
|
||||
|
||||
let chk = item.arch === archFilter && item.platform === platFilter
|
||||
if (chk && item.platform_version) {
|
||||
const osVersion = _getOsVersion()
|
||||
const osVersion = module.exports._getOsVersion()
|
||||
|
||||
if (osVersion === item.platform_version) {
|
||||
chk = true
|
||||
@@ -143,7 +130,7 @@ export function _getOsVersion(): string {
|
||||
// DISTRIB_RELEASE=18.04
|
||||
// DISTRIB_CODENAME=bionic
|
||||
// DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"
|
||||
const lsbContents = _internal.readLinuxVersionFile()
|
||||
const lsbContents = module.exports._readLinuxVersionFile()
|
||||
if (lsbContents) {
|
||||
const lines = lsbContents.split('\n')
|
||||
for (const line of lines) {
|
||||
@@ -163,7 +150,16 @@ export function _getOsVersion(): string {
|
||||
return version
|
||||
}
|
||||
|
||||
// Alias for backwards compatibility
|
||||
export function _readLinuxVersionFile(): string {
|
||||
return _internal.readLinuxVersionFile()
|
||||
const lsbReleaseFile = '/etc/lsb-release'
|
||||
const osReleaseFile = '/etc/os-release'
|
||||
let contents = ''
|
||||
|
||||
if (fs.existsSync(lsbReleaseFile)) {
|
||||
contents = fs.readFileSync(lsbReleaseFile).toString()
|
||||
} else if (fs.existsSync(osReleaseFile)) {
|
||||
contents = fs.readFileSync(osReleaseFile).toString()
|
||||
}
|
||||
|
||||
return contents
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as core from '@actions/core'
|
||||
import * as io from '@actions/io'
|
||||
import * as crypto from 'crypto'
|
||||
import * as fs from 'fs'
|
||||
import * as mm from './manifest.js'
|
||||
import * as mm from './manifest'
|
||||
import * as os from 'os'
|
||||
import * as path from 'path'
|
||||
import * as httpm from '@actions/http-client'
|
||||
@@ -11,8 +11,9 @@ import * as stream from 'stream'
|
||||
import * as util from 'util'
|
||||
import {ok} from 'assert'
|
||||
import {OutgoingHttpHeaders} from 'http'
|
||||
import {exec, ExecOptions} from '@actions/exec'
|
||||
import {RetryHelper} from './retry-helper.js'
|
||||
import {exec} from '@actions/exec/lib/exec'
|
||||
import {ExecOptions} from '@actions/exec/lib/interfaces'
|
||||
import {RetryHelper} from './retry-helper'
|
||||
|
||||
export class HTTPError extends Error {
|
||||
constructor(readonly httpStatusCode: number | undefined) {
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "./lib",
|
||||
"rootDir": "./src",
|
||||
"module": "node16",
|
||||
"moduleResolution": "node16"
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"include": [
|
||||
"./src"
|
||||
|
||||
Reference in New Issue
Block a user