Compare commits

..
Author SHA1 Message Date
Daniel Kennedy 5ebf128f14 @actions/core: convert to ESM module 2026-01-28 16:17:54 -05:00
18 changed files with 67 additions and 87 deletions
+2 -3
View File
@@ -14,8 +14,7 @@ module.exports = {
'^@actions/http-client/lib/auth$': '<rootDir>/packages/http-client/lib/auth.js', '^@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/http-client/lib/interfaces$': '<rootDir>/packages/http-client/lib/interfaces.js',
'^@actions/github$': '<rootDir>/packages/github/lib/github.js', '^@actions/github$': '<rootDir>/packages/github/lib/github.js',
'^@actions/github/lib/utils$': '<rootDir>/packages/github/lib/utils.js', '^@actions/github/lib/utils$': '<rootDir>/packages/github/lib/utils.js'
'^@actions/glob$': '<rootDir>/packages/glob/lib/glob.js'
}, },
transform: { transform: {
'^.+\\.(ts|js)$': ['ts-jest', { '^.+\\.(ts|js)$': ['ts-jest', {
@@ -30,7 +29,7 @@ module.exports = {
}] }]
}, },
transformIgnorePatterns: [ transformIgnorePatterns: [
'/node_modules/(?!(@octokit|@actions/github|@actions/http-client|@actions/io|@actions/exec|@actions/core|@actions/glob|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 verbose: true
} }
+11 -21
View File
@@ -1,43 +1,33 @@
# @actions/glob Releases # @actions/glob Releases
## 0.6.0 ### 0.5.1
- **Breaking change**: Package is now ESM-only
- CommonJS consumers must use dynamic `import()` instead of `require()`
## 0.5.1
- Bump `@actions/core` to `2.0.3` - 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) - 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) - 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) - Added a `verbose` option to HashFiles [#1052](https://github.com/actions/toolkit/pull/1052/files)
## 0.2.1 ### 0.2.1
- Update `lockfileVersion` to `v2` in `package-lock.json [#1023](https://github.com/actions/toolkit/pull/1023)
- Update `lockfileVersion` to `v2` in `package-lock.json` [#1023](https://github.com/actions/toolkit/pull/1023)
## 0.2.0
### 0.2.0
- [Added the hashFiles function to Glob](https://github.com/actions/toolkit/pull/830) - [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) - [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) - [Fix bug where files were matched incorrectly](https://github.com/actions/toolkit/pull/805)
## 0.1.1 ### 0.1.1
- Update @actions/core version - Update @actions/core version
### 0.1.0
## 0.1.0
- Initial release - Initial release
+2 -2
View File
@@ -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 * as path from 'path'
import {hashFiles} from '../src/glob.js' import {hashFiles} from '../src/glob'
import {promises as fs} from 'fs' import {promises as fs} from 'fs'
const IS_WINDOWS = process.platform === 'win32' const IS_WINDOWS = process.platform === 'win32'
@@ -1,9 +1,9 @@
import * as child from 'child_process' 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 os from 'os'
import * as path from 'path' import * as path from 'path'
import {Globber, DefaultGlobber} from '../src/internal-globber.js' import {Globber, DefaultGlobber} from '../src/internal-globber'
import {GlobOptions} from '../src/internal-glob-options.js' import {GlobOptions} from '../src/internal-glob-options'
import {promises as fs} from 'fs' import {promises as fs} from 'fs'
const IS_WINDOWS = process.platform === 'win32' 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' const IS_WINDOWS = process.platform === 'win32'
@@ -1,5 +1,5 @@
import * as path from 'path' import * as path from 'path'
import {Path} from '../src/internal-path.js' import {Path} from '../src/internal-path'
const IS_WINDOWS = process.platform === 'win32' const IS_WINDOWS = process.platform === 'win32'
@@ -1,8 +1,8 @@
import * as path from 'path' import * as path from 'path'
import * as patternHelper from '../src/internal-pattern-helper.js' import * as patternHelper from '../src/internal-pattern-helper'
import {MatchKind} from '../src/internal-match-kind.js' import {MatchKind} from '../src/internal-match-kind'
import {IS_WINDOWS} from '../../io/src/io-util.js' import {IS_WINDOWS} from '../../io/src/io-util'
import {Pattern} from '../src/internal-pattern.js' import {Pattern} from '../src/internal-pattern'
describe('pattern-helper', () => { describe('pattern-helper', () => {
it('getSearchPaths omits negate search paths', () => { 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 os from 'os'
import * as path from 'path' 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 {promises as fs} from 'fs'
import {Pattern} from '../src/internal-pattern.js' import {Pattern} from '../src/internal-pattern'
const IS_WINDOWS = process.platform === 'win32' const IS_WINDOWS = process.platform === 'win32'
+18 -18
View File
@@ -1,41 +1,41 @@
{ {
"name": "@actions/glob", "name": "@actions/glob",
"version": "0.6.0", "version": "0.5.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@actions/glob", "name": "@actions/glob",
"version": "0.6.0", "version": "0.5.1",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^3.0.0", "@actions/core": "^2.0.3",
"minimatch": "^3.0.4" "minimatch": "^3.0.4"
} }
}, },
"node_modules/@actions/core": { "node_modules/@actions/core": {
"version": "3.0.0", "version": "2.0.3",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.0.tgz", "resolved": "https://registry.npmjs.org/@actions/core/-/core-2.0.3.tgz",
"integrity": "sha512-zYt6cz+ivnTmiT/ksRVriMBOiuoUpDCJJlZ5KPl2/FRdvwU3f7MPh9qftvbkXJThragzUZieit2nyHUyw53Seg==", "integrity": "sha512-Od9Thc3T1mQJYddvVPM4QGiLUewdh+3txmDYHHxoNdkqysR1MbCT+rFOtNUxYAz+7+6RIsqipVahY2GJqGPyxA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/exec": "^3.0.0", "@actions/exec": "^2.0.0",
"@actions/http-client": "^4.0.0" "@actions/http-client": "^3.0.2"
} }
}, },
"node_modules/@actions/exec": { "node_modules/@actions/exec": {
"version": "3.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-3.0.0.tgz", "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-2.0.0.tgz",
"integrity": "sha512-6xH/puSoNBXb72VPlZVm7vQ+svQpFyA96qdDBvhB8eNZOE8LtPf9L4oAsfzK/crCL8YZ+19fKYVnM63Sl+Xzlw==", "integrity": "sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/io": "^3.0.2" "@actions/io": "^2.0.0"
} }
}, },
"node_modules/@actions/http-client": { "node_modules/@actions/http-client": {
"version": "4.0.0", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-4.0.0.tgz", "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz",
"integrity": "sha512-QuwPsgVMsD6qaPD57GLZi9sqzAZCtiJT8kVBCDpLtxhL5MydQ4gS+DrejtZZPdIYyB1e95uCK9Luyds7ybHI3g==", "integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"tunnel": "^0.0.6", "tunnel": "^0.0.6",
@@ -43,9 +43,9 @@
} }
}, },
"node_modules/@actions/io": { "node_modules/@actions/io": {
"version": "3.0.2", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/@actions/io/-/io-3.0.2.tgz", "resolved": "https://registry.npmjs.org/@actions/io/-/io-2.0.0.tgz",
"integrity": "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==", "integrity": "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/balanced-match": { "node_modules/balanced-match": {
+2 -9
View File
@@ -1,6 +1,6 @@
{ {
"name": "@actions/glob", "name": "@actions/glob",
"version": "0.6.0", "version": "0.5.1",
"preview": true, "preview": true,
"description": "Actions glob lib", "description": "Actions glob lib",
"keywords": [ "keywords": [
@@ -10,15 +10,8 @@
], ],
"homepage": "https://github.com/actions/toolkit/tree/main/packages/glob", "homepage": "https://github.com/actions/toolkit/tree/main/packages/glob",
"license": "MIT", "license": "MIT",
"type": "module",
"main": "lib/glob.js", "main": "lib/glob.js",
"types": "lib/glob.d.ts", "types": "lib/glob.d.ts",
"exports": {
".": {
"types": "./lib/glob.d.ts",
"import": "./lib/glob.js"
}
},
"directories": { "directories": {
"lib": "lib", "lib": "lib",
"test": "__tests__" "test": "__tests__"
@@ -44,7 +37,7 @@
"url": "https://github.com/actions/toolkit/issues" "url": "https://github.com/actions/toolkit/issues"
}, },
"dependencies": { "dependencies": {
"@actions/core": "^3.0.0", "@actions/core": "^2.0.3",
"minimatch": "^3.0.4" "minimatch": "^3.0.4"
} }
} }
+4 -4
View File
@@ -1,7 +1,7 @@
import {Globber, DefaultGlobber} from './internal-globber.js' import {Globber, DefaultGlobber} from './internal-globber'
import {GlobOptions} from './internal-glob-options.js' import {GlobOptions} from './internal-glob-options'
import {HashFileOptions} from './internal-hash-file-options.js' import {HashFileOptions} from './internal-hash-file-options'
import {hashFiles as _hashFiles} from './internal-hash-files.js' import {hashFiles as _hashFiles} from './internal-hash-files'
export {Globber, GlobOptions} export {Globber, GlobOptions}
@@ -1,5 +1,5 @@
import * as core from '@actions/core' 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. * Returns a copy with defaults filled in.
+6 -6
View File
@@ -1,12 +1,12 @@
import * as core from '@actions/core' import * as core from '@actions/core'
import * as fs from 'fs' 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 path from 'path'
import * as patternHelper from './internal-pattern-helper.js' import * as patternHelper from './internal-pattern-helper'
import {GlobOptions} from './internal-glob-options.js' import {GlobOptions} from './internal-glob-options'
import {MatchKind} from './internal-match-kind.js' import {MatchKind} from './internal-match-kind'
import {Pattern} from './internal-pattern.js' import {Pattern} from './internal-pattern'
import {SearchState} from './internal-search-state.js' import {SearchState} from './internal-search-state'
const IS_WINDOWS = process.platform === 'win32' const IS_WINDOWS = process.platform === 'win32'
+1 -1
View File
@@ -4,7 +4,7 @@ import * as fs from 'fs'
import * as stream from 'stream' import * as stream from 'stream'
import * as util from 'util' import * as util from 'util'
import * as path from 'path' import * as path from 'path'
import {Globber} from './glob.js' import {Globber} from './glob'
export async function hashFiles( export async function hashFiles(
globber: Globber, globber: Globber,
+1 -1
View File
@@ -1,5 +1,5 @@
import * as path from 'path' 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 assert from 'assert'
const IS_WINDOWS = process.platform === 'win32' const IS_WINDOWS = process.platform === 'win32'
+3 -3
View File
@@ -1,6 +1,6 @@
import * as pathHelper from './internal-path-helper.js' import * as pathHelper from './internal-path-helper'
import {MatchKind} from './internal-match-kind.js' import {MatchKind} from './internal-match-kind'
import {Pattern} from './internal-pattern.js' import {Pattern} from './internal-pattern'
const IS_WINDOWS = process.platform === 'win32' const IS_WINDOWS = process.platform === 'win32'
+3 -3
View File
@@ -1,10 +1,10 @@
import * as os from 'os' import * as os from 'os'
import * as path from 'path' 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 assert from 'assert'
import {Minimatch, IMinimatch, IOptions as IMinimatchOptions} from 'minimatch' import {Minimatch, IMinimatch, IOptions as IMinimatchOptions} from 'minimatch'
import {MatchKind} from './internal-match-kind.js' import {MatchKind} from './internal-match-kind'
import {Path} from './internal-path.js' import {Path} from './internal-path'
const IS_WINDOWS = process.platform === 'win32' const IS_WINDOWS = process.platform === 'win32'
+1 -3
View File
@@ -3,9 +3,7 @@
"compilerOptions": { "compilerOptions": {
"baseUrl": "./", "baseUrl": "./",
"outDir": "./lib", "outDir": "./lib",
"rootDir": "./src", "rootDir": "./src"
"module": "node16",
"moduleResolution": "node16"
}, },
"include": [ "include": [
"./src" "./src"