mirror of
https://github.com/dorny/paths-filter.git
synced 2025-06-07 16:49:03 +00:00
Merge pull request #16 from AurorNZ/esbuild_esm
Generate build with esm
This commit is contained in:
commit
54ebb4d5f2
18 changed files with 30072 additions and 67 deletions
4
.gitattributes
vendored
4
.gitattributes
vendored
|
@ -1 +1,3 @@
|
|||
* text=auto eol=lf
|
||||
* text=auto eol=lf
|
||||
|
||||
dist/** -diff linguist-generated=true
|
||||
|
|
14
.github/workflows/pull-request-verification.yml
vendored
14
.github/workflows/pull-request-verification.yml
vendored
|
@ -13,11 +13,21 @@ jobs:
|
|||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Need history for changelog generation
|
||||
- uses: volta-cli/action@v4
|
||||
- run: |
|
||||
pnpm install
|
||||
pnpm i
|
||||
pnpm run all
|
||||
# We need to make sure the checked-in `index.mjs` actually matches what we expect it to be.
|
||||
- name: Compare the expected and actual dist/ directories
|
||||
run: |
|
||||
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
|
||||
echo "Detected uncommitted changes after build. See status below:"
|
||||
git diff
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test-inline:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {describe, expect, test} from 'vitest'
|
||||
|
||||
import {csvEscape} from '../src/list-format/csv-escape'
|
||||
import {csvEscape} from '../src/list-format/csv-escape.ts'
|
||||
|
||||
describe('csvEscape() backslash escapes every character except subset of definitely safe characters', () => {
|
||||
test('simple filename should not be modified', () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {describe, expect, test} from 'vitest'
|
||||
|
||||
import {File, ChangeStatus} from '../src/file'
|
||||
import {Filter} from '../src/filter'
|
||||
import {File, ChangeStatus} from '../src/file.ts'
|
||||
import {Filter} from '../src/filter.ts'
|
||||
|
||||
describe('yaml filter parsing tests', () => {
|
||||
test('throws if yaml is not a dictionary', () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {describe, expect, test} from 'vitest'
|
||||
|
||||
import {ChangeStatus} from '../src/file'
|
||||
import * as git from '../src/git'
|
||||
import {ChangeStatus} from '../src/file.ts'
|
||||
import * as git from '../src/git.ts'
|
||||
|
||||
describe('parsing output of the git diff command', () => {
|
||||
test('parseGitDiffOutput returns files with correct change status', () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {describe, expect, test} from 'vitest'
|
||||
|
||||
import {backslashEscape, shellEscape} from '../src/list-format/shell-escape'
|
||||
import {backslashEscape, shellEscape} from '../src/list-format/shell-escape.ts'
|
||||
|
||||
describe('escape() backslash escapes every character except subset of definitely safe characters', () => {
|
||||
test('simple filename should not be modified', () => {
|
||||
|
|
|
@ -49,7 +49,7 @@ outputs:
|
|||
description: JSON array with names of all filters matching any of changed files
|
||||
runs:
|
||||
using: 'node20'
|
||||
main: 'dist/index.js'
|
||||
main: 'dist/index.mjs'
|
||||
branding:
|
||||
color: blue
|
||||
icon: filter
|
||||
|
|
21
dist/index.js
generated
vendored
21
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
29730
dist/index.mjs
generated
vendored
Normal file
29730
dist/index.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
41
esbuild.config.mjs
Normal file
41
esbuild.config.mjs
Normal file
|
@ -0,0 +1,41 @@
|
|||
import chalk from "chalk";
|
||||
import { analyzeMetafile, build } from "esbuild";
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
const startTime = Date.now();
|
||||
console.info(
|
||||
chalk.bold(`🚀 ${chalk.blueBright("paths-filter")} Build\n`),
|
||||
);
|
||||
|
||||
const result = await build({
|
||||
entryPoints: ["./src/main.ts"],
|
||||
outfile: "dist/index.mjs",
|
||||
metafile: true,
|
||||
bundle: true,
|
||||
format: "esm",
|
||||
platform: "node",
|
||||
target: ["node20"],
|
||||
treeShaking: true,
|
||||
// Ensure require is properly defined: https://github.com/evanw/esbuild/issues/1921
|
||||
banner: {
|
||||
js:
|
||||
"import { createRequire } from 'module';\n" +
|
||||
"const require = createRequire(import.meta.url);",
|
||||
},
|
||||
});
|
||||
|
||||
const analysis = await analyzeMetafile(result.metafile);
|
||||
console.info(`📝 Bundle Analysis:${analysis}`);
|
||||
|
||||
console.info(
|
||||
`${chalk.bold.green("✔ Bundled successfully!")} (${
|
||||
Date.now() - startTime
|
||||
}ms)`,
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(`🧨 ${chalk.red.bold("Failed:")} ${error.message}`);
|
||||
console.debug(`📚 ${chalk.blueBright.bold("Stack:")} ${error.stack}`);
|
||||
process.exit(1);
|
||||
}
|
||||
})();
|
|
@ -44,7 +44,7 @@ export default tsEslint.config(
|
|||
}
|
||||
},
|
||||
{
|
||||
ignores: ['coverage', 'dist', 'lib']
|
||||
ignores: ['**/coverage', '**/dist', '**/esbuild.config.mjs']
|
||||
},
|
||||
{
|
||||
plugins: {
|
||||
|
|
16
package.json
16
package.json
|
@ -3,27 +3,26 @@
|
|||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "Execute your workflow steps only if relevant files are modified.",
|
||||
"main": "lib/main.js",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "tsc -b tsconfig.build.json",
|
||||
"tscheck": "tsc",
|
||||
"build": "pnpm run build:types && pnpm run build:bundle",
|
||||
"build:bundle": "node ./esbuild.config.mjs",
|
||||
"build:types": "tsc",
|
||||
"format": "prettier --write **/*.ts",
|
||||
"format-check": "prettier --check **/*.ts",
|
||||
"lint": "eslint",
|
||||
"pack": "ncc build -m",
|
||||
"test": "vitest",
|
||||
"all": "pnpm run build && pnpm run tscheck && pnpm run lint && pnpm run format && pnpm run pack && pnpm test run"
|
||||
"all": "pnpm run build && pnpm run lint && pnpm run format && pnpm test run"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/actions/typescript-action.git"
|
||||
"url": "git+https://github.com/AurorNZ/paths-filter.git"
|
||||
},
|
||||
"keywords": [
|
||||
"actions",
|
||||
"node",
|
||||
"setup"
|
||||
],
|
||||
"author": "YourNameOrOrganization",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.0",
|
||||
|
@ -44,7 +43,8 @@
|
|||
"@types/node": "^20.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.5.0",
|
||||
"@typescript-eslint/parser": "^8.5.0",
|
||||
"@vercel/ncc": "^0.38.1",
|
||||
"chalk": "^5.3.0",
|
||||
"esbuild": "^0.23.1",
|
||||
"eslint": "^9.10.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-import-resolver-typescript": "^3.6.3",
|
||||
|
|
267
pnpm-lock.yaml
generated
267
pnpm-lock.yaml
generated
|
@ -55,9 +55,12 @@ devDependencies:
|
|||
'@typescript-eslint/parser':
|
||||
specifier: ^8.5.0
|
||||
version: 8.5.0(eslint@9.10.0)(typescript@5.3.3)
|
||||
'@vercel/ncc':
|
||||
specifier: ^0.38.1
|
||||
version: 0.38.1
|
||||
chalk:
|
||||
specifier: ^5.3.0
|
||||
version: 5.3.0
|
||||
esbuild:
|
||||
specifier: ^0.23.1
|
||||
version: 0.23.1
|
||||
eslint:
|
||||
specifier: ^9.10.0
|
||||
version: 9.10.0
|
||||
|
@ -147,6 +150,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/aix-ppc64@0.23.1:
|
||||
resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ppc64]
|
||||
os: [aix]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/android-arm64@0.21.5:
|
||||
resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -156,6 +168,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/android-arm64@0.23.1:
|
||||
resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/android-arm@0.21.5:
|
||||
resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -165,6 +186,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/android-arm@0.23.1:
|
||||
resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm]
|
||||
os: [android]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/android-x64@0.21.5:
|
||||
resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -174,6 +204,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/android-x64@0.23.1:
|
||||
resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/darwin-arm64@0.21.5:
|
||||
resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -183,6 +222,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/darwin-arm64@0.23.1:
|
||||
resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/darwin-x64@0.21.5:
|
||||
resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -192,6 +240,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/darwin-x64@0.23.1:
|
||||
resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/freebsd-arm64@0.21.5:
|
||||
resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -201,6 +258,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/freebsd-arm64@0.23.1:
|
||||
resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [freebsd]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/freebsd-x64@0.21.5:
|
||||
resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -210,6 +276,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/freebsd-x64@0.23.1:
|
||||
resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-arm64@0.21.5:
|
||||
resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -219,6 +294,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-arm64@0.23.1:
|
||||
resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-arm@0.21.5:
|
||||
resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -228,6 +312,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-arm@0.23.1:
|
||||
resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-ia32@0.21.5:
|
||||
resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -237,6 +330,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-ia32@0.23.1:
|
||||
resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ia32]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-loong64@0.21.5:
|
||||
resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -246,6 +348,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-loong64@0.23.1:
|
||||
resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-mips64el@0.21.5:
|
||||
resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -255,6 +366,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-mips64el@0.23.1:
|
||||
resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [mips64el]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-ppc64@0.21.5:
|
||||
resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -264,6 +384,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-ppc64@0.23.1:
|
||||
resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-riscv64@0.21.5:
|
||||
resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -273,6 +402,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-riscv64@0.23.1:
|
||||
resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-s390x@0.21.5:
|
||||
resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -282,6 +420,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-s390x@0.23.1:
|
||||
resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-x64@0.21.5:
|
||||
resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -291,6 +438,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-x64@0.23.1:
|
||||
resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/netbsd-x64@0.21.5:
|
||||
resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -300,6 +456,24 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/netbsd-x64@0.23.1:
|
||||
resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [netbsd]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/openbsd-arm64@0.23.1:
|
||||
resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [openbsd]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/openbsd-x64@0.21.5:
|
||||
resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -309,6 +483,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/openbsd-x64@0.23.1:
|
||||
resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [openbsd]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/sunos-x64@0.21.5:
|
||||
resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -318,6 +501,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/sunos-x64@0.23.1:
|
||||
resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [sunos]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/win32-arm64@0.21.5:
|
||||
resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -327,6 +519,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/win32-arm64@0.23.1:
|
||||
resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/win32-ia32@0.21.5:
|
||||
resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -336,6 +537,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/win32-ia32@0.23.1:
|
||||
resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/win32-x64@0.21.5:
|
||||
resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -345,6 +555,15 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/win32-x64@0.23.1:
|
||||
resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@eslint-community/eslint-utils@4.4.0(eslint@9.10.0):
|
||||
resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
|
@ -1017,11 +1236,6 @@ packages:
|
|||
eslint-visitor-keys: 3.4.3
|
||||
dev: true
|
||||
|
||||
/@vercel/ncc@0.38.1:
|
||||
resolution: {integrity: sha512-IBBb+iI2NLu4VQn3Vwldyi2QwaXt5+hTyh58ggAMoCGE6DJmPvwL3KPBWcJl1m9LYPChBLE980Jw+CS4Wokqxw==}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/@vitest/expect@2.0.5:
|
||||
resolution: {integrity: sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==}
|
||||
dependencies:
|
||||
|
@ -1288,6 +1502,11 @@ packages:
|
|||
supports-color: 7.2.0
|
||||
dev: true
|
||||
|
||||
/chalk@5.3.0:
|
||||
resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==}
|
||||
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/check-error@2.1.1:
|
||||
resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==}
|
||||
engines: {node: '>= 16'}
|
||||
|
@ -1529,6 +1748,38 @@ packages:
|
|||
'@esbuild/win32-x64': 0.21.5
|
||||
dev: true
|
||||
|
||||
/esbuild@0.23.1:
|
||||
resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==}
|
||||
engines: {node: '>=18'}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
optionalDependencies:
|
||||
'@esbuild/aix-ppc64': 0.23.1
|
||||
'@esbuild/android-arm': 0.23.1
|
||||
'@esbuild/android-arm64': 0.23.1
|
||||
'@esbuild/android-x64': 0.23.1
|
||||
'@esbuild/darwin-arm64': 0.23.1
|
||||
'@esbuild/darwin-x64': 0.23.1
|
||||
'@esbuild/freebsd-arm64': 0.23.1
|
||||
'@esbuild/freebsd-x64': 0.23.1
|
||||
'@esbuild/linux-arm': 0.23.1
|
||||
'@esbuild/linux-arm64': 0.23.1
|
||||
'@esbuild/linux-ia32': 0.23.1
|
||||
'@esbuild/linux-loong64': 0.23.1
|
||||
'@esbuild/linux-mips64el': 0.23.1
|
||||
'@esbuild/linux-ppc64': 0.23.1
|
||||
'@esbuild/linux-riscv64': 0.23.1
|
||||
'@esbuild/linux-s390x': 0.23.1
|
||||
'@esbuild/linux-x64': 0.23.1
|
||||
'@esbuild/netbsd-x64': 0.23.1
|
||||
'@esbuild/openbsd-arm64': 0.23.1
|
||||
'@esbuild/openbsd-x64': 0.23.1
|
||||
'@esbuild/sunos-x64': 0.23.1
|
||||
'@esbuild/win32-arm64': 0.23.1
|
||||
'@esbuild/win32-ia32': 0.23.1
|
||||
'@esbuild/win32-x64': 0.23.1
|
||||
dev: true
|
||||
|
||||
/escalade@3.1.1:
|
||||
resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
|
||||
engines: {node: '>=6'}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as jsyaml from 'js-yaml'
|
||||
import micromatch from 'micromatch'
|
||||
|
||||
import {File} from './file'
|
||||
import {File} from './file.ts'
|
||||
|
||||
// Type definition of object we expect to load from YAML
|
||||
type FilterYaml = Record<string, FilterItemYaml>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as core from '@actions/core'
|
||||
|
||||
import exec from './exec'
|
||||
import {File, ChangeStatus} from './file'
|
||||
import exec from './exec.ts'
|
||||
import {File, ChangeStatus} from './file.ts'
|
||||
|
||||
export const NULL_SHA = '0000000000000000000000000000000000000000'
|
||||
export const HEAD = 'HEAD'
|
||||
|
|
10
src/main.ts
10
src/main.ts
|
@ -4,11 +4,11 @@ import * as core from '@actions/core'
|
|||
import * as github from '@actions/github'
|
||||
import {PullRequest, PushEvent} from '@octokit/webhooks-types'
|
||||
|
||||
import {File, ChangeStatus} from './file'
|
||||
import {Filter, FilterResults} from './filter'
|
||||
import * as git from './git'
|
||||
import {csvEscape} from './list-format/csv-escape'
|
||||
import {backslashEscape, shellEscape} from './list-format/shell-escape'
|
||||
import {File, ChangeStatus} from './file.ts'
|
||||
import {Filter, FilterResults} from './filter.ts'
|
||||
import * as git from './git.ts'
|
||||
import {csvEscape} from './list-format/csv-escape.ts'
|
||||
import {backslashEscape, shellEscape} from './list-format/shell-escape.ts'
|
||||
|
||||
type ExportFormat = 'none' | 'csv' | 'json' | 'shell' | 'escape'
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": false,
|
||||
|
||||
"outDir": "./lib" /* Redirect output structure to the directory. */,
|
||||
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
||||
},
|
||||
"exclude": ["node_modules", "**/*.test.ts"]
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"extends": "@tsconfig/node20/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": true
|
||||
"noEmit": true,
|
||||
|
||||
"allowImportingTsExtensions": true,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue