Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1cd929181f | |||
| f4d818c7a2 | |||
| 9de8f6f5c3 | |||
| a60e6db920 | |||
| c050f7bc2e | |||
| 0483fce47e | |||
| 92cb8ef23c | |||
| 5d702dc7bd | |||
| e1191599bb | |||
| c043714a35 | |||
| 3ac6e0fdf2 | |||
| d9f9074fee | |||
| 2c52220624 | |||
| b2e6a5a284 | |||
| bdddd872e3 |
@@ -69,16 +69,16 @@ jobs:
|
||||
id-token: write
|
||||
steps:
|
||||
|
||||
- name: Set Node.js 24.x
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: 24.x
|
||||
|
||||
- name: download artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ github.event.inputs.package }}
|
||||
|
||||
- name: setup authentication
|
||||
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.TOKEN }}
|
||||
|
||||
- name: publish
|
||||
run: npm publish --provenance *.tgz
|
||||
|
||||
|
||||
@@ -5,3 +5,4 @@ packages/*/__tests__/_temp/
|
||||
.DS_Store
|
||||
*.xar
|
||||
packages/*/audit.json
|
||||
.nx/
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
# @actions/core Releases
|
||||
|
||||
## 2.0.1
|
||||
- Bump @actions/exec from 1.1.1 to 2.0.0 [#2199](https://github.com/actions/toolkit/pull/2199)
|
||||
|
||||
## 2.0.0
|
||||
- Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110)
|
||||
- Bump @actions/http-client from 2.0.1 to 3.0.0
|
||||
|
||||
Generated
+19
-63
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "@actions/core",
|
||||
"version": "2.0.0",
|
||||
"lockfileVersion": 2,
|
||||
"version": "2.0.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@actions/core",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/exec": "^2.0.0",
|
||||
"@actions/http-client": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -17,11 +17,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/exec": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
|
||||
"integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
|
||||
"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": "^1.0.1"
|
||||
"@actions/io": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/http-client": {
|
||||
@@ -35,9 +36,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/io": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz",
|
||||
"integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q=="
|
||||
"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/@fastify/busboy": {
|
||||
"version": "2.1.1",
|
||||
@@ -49,15 +51,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "16.18.112",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.112.tgz",
|
||||
"integrity": "sha512-EKrbKUGJROm17+dY/gMi31aJlGLJ75e1IkTojt9n6u+hnaTBDs+M1bIdOawpk2m6YUAXq/R2W0SxCng1tndHCg==",
|
||||
"dev": true
|
||||
"version": "16.18.126",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.126.tgz",
|
||||
"integrity": "sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/tunnel": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
|
||||
}
|
||||
@@ -74,53 +78,5 @@
|
||||
"node": ">=14.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/exec": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
|
||||
"integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
|
||||
"requires": {
|
||||
"@actions/io": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"@actions/http-client": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.0.tgz",
|
||||
"integrity": "sha512-1s3tXAfVMSz9a4ZEBkXXRQD4QhY3+GAsWSbaYpeknPOKEeyRiU3lH+bHiLMZdo2x/fIeQ/hscL1wCkDLVM2DZQ==",
|
||||
"requires": {
|
||||
"tunnel": "^0.0.6",
|
||||
"undici": "^5.28.5"
|
||||
}
|
||||
},
|
||||
"@actions/io": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz",
|
||||
"integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q=="
|
||||
},
|
||||
"@fastify/busboy": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
|
||||
"integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA=="
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "16.18.112",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.112.tgz",
|
||||
"integrity": "sha512-EKrbKUGJROm17+dY/gMi31aJlGLJ75e1IkTojt9n6u+hnaTBDs+M1bIdOawpk2m6YUAXq/R2W0SxCng1tndHCg==",
|
||||
"dev": true
|
||||
},
|
||||
"tunnel": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
|
||||
},
|
||||
"undici": {
|
||||
"version": "5.29.0",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
|
||||
"integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
|
||||
"requires": {
|
||||
"@fastify/busboy": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@actions/core",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"description": "Actions core lib",
|
||||
"keywords": [
|
||||
"github",
|
||||
@@ -36,7 +36,7 @@
|
||||
"url": "https://github.com/actions/toolkit/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/exec": "^2.0.0",
|
||||
"@actions/http-client": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* Test to validate that glob works correctly on Windows with backslash paths
|
||||
* This test validates the fix for glob not working on GitHub's Windows runners
|
||||
*/
|
||||
|
||||
import {MatchKind} from '../src/internal-match-kind'
|
||||
import {Pattern} from '../src/internal-pattern'
|
||||
|
||||
const IS_WINDOWS = process.platform === 'win32'
|
||||
|
||||
describe('Windows path matching', () => {
|
||||
it('matches paths with backslashes on Windows', () => {
|
||||
if (!IS_WINDOWS) {
|
||||
// This test is only relevant on Windows
|
||||
return
|
||||
}
|
||||
|
||||
// Test basic pattern matching with Windows paths
|
||||
const pattern = new Pattern('C:\\Users\\test\\*')
|
||||
|
||||
// The itemPath would come from fs.readdir with backslashes on Windows
|
||||
const itemPath = 'C:\\Users\\test\\file.txt'
|
||||
|
||||
// This should match because the pattern and path both refer to the same file
|
||||
expect(pattern.match(itemPath)).toBe(MatchKind.All)
|
||||
})
|
||||
|
||||
it('partial matches work with backslashes on Windows', () => {
|
||||
if (!IS_WINDOWS) {
|
||||
return
|
||||
}
|
||||
|
||||
// Test partial matching with Windows paths
|
||||
const pattern = new Pattern('C:\\Users\\test\\**')
|
||||
|
||||
// Should partially match parent directory
|
||||
expect(pattern.partialMatch('C:\\Users')).toBe(true)
|
||||
expect(pattern.partialMatch('C:\\Users\\test')).toBe(true)
|
||||
})
|
||||
|
||||
it('matches globstar patterns with backslashes on Windows', () => {
|
||||
if (!IS_WINDOWS) {
|
||||
return
|
||||
}
|
||||
|
||||
const pattern = new Pattern('C:\\foo\\**')
|
||||
|
||||
// Should match the directory itself and descendants
|
||||
expect(pattern.match('C:\\foo')).toBe(MatchKind.All)
|
||||
expect(pattern.match('C:\\foo\\bar')).toBe(MatchKind.All)
|
||||
expect(pattern.match('C:\\foo\\bar\\baz.txt')).toBe(MatchKind.All)
|
||||
})
|
||||
|
||||
it('matches wildcard patterns with mixed separators on Windows', () => {
|
||||
if (!IS_WINDOWS) {
|
||||
return
|
||||
}
|
||||
|
||||
// Pattern might be specified with forward slashes by user
|
||||
const pattern = new Pattern('C:/Users/*/file.txt')
|
||||
|
||||
// But the actual path from filesystem will have backslashes
|
||||
expect(pattern.match('C:\\Users\\test\\file.txt')).toBe(MatchKind.All)
|
||||
})
|
||||
|
||||
it('handles complex patterns with backslashes on Windows', () => {
|
||||
if (!IS_WINDOWS) {
|
||||
return
|
||||
}
|
||||
|
||||
const currentDrive = process.cwd().substring(0, 2)
|
||||
const pattern = new Pattern(`${currentDrive}\\**\\*.txt`)
|
||||
|
||||
// Should match .txt files at any depth
|
||||
expect(pattern.match(`${currentDrive}\\file.txt`)).toBe(MatchKind.All)
|
||||
expect(pattern.match(`${currentDrive}\\foo\\bar\\test.txt`)).toBe(
|
||||
MatchKind.All
|
||||
)
|
||||
expect(pattern.match(`${currentDrive}\\foo\\bar\\test.js`)).toBe(
|
||||
MatchKind.None
|
||||
)
|
||||
})
|
||||
})
|
||||
@@ -156,6 +156,10 @@ export class Pattern {
|
||||
itemPath = pathHelper.safeTrimTrailingSeparator(itemPath)
|
||||
}
|
||||
|
||||
// Convert to forward slashes on Windows before matching with minimatch
|
||||
// since the pattern was converted to forward slashes in the constructor
|
||||
itemPath = Pattern.convertToMinimatchPath(itemPath)
|
||||
|
||||
// Match
|
||||
if (this.minimatch.match(itemPath)) {
|
||||
return this.trailingSeparator ? MatchKind.Directory : MatchKind.All
|
||||
@@ -176,8 +180,11 @@ export class Pattern {
|
||||
return this.rootRegExp.test(itemPath)
|
||||
}
|
||||
|
||||
// Convert to forward slashes on Windows to match the pattern format used by minimatch
|
||||
itemPath = Pattern.convertToMinimatchPath(itemPath)
|
||||
|
||||
return this.minimatch.matchOne(
|
||||
itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/),
|
||||
itemPath.split(/\/+/),
|
||||
this.minimatch.set[0],
|
||||
true
|
||||
)
|
||||
@@ -193,6 +200,18 @@ export class Pattern {
|
||||
.replace(/\*/g, '[*]') // escape '*'
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts path to forward slashes on Windows for compatibility with minimatch.
|
||||
* On Windows, minimatch patterns use forward slashes, so paths must be converted
|
||||
* to match the same format.
|
||||
*/
|
||||
private static convertToMinimatchPath(itemPath: string): string {
|
||||
if (IS_WINDOWS) {
|
||||
return itemPath.replace(/\\/g, '/')
|
||||
}
|
||||
return itemPath
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes slashes and ensures absolute root
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user