diff --git a/.eslintrc.json b/.eslintrc.json index fe40370..ed061ad 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,6 @@ { "root": true, - "ignorePatterns": ["main"], + "ignorePatterns": ["dist"], "extends": ["eslint:recommended", "prettier"], "parserOptions": { "ecmaVersion": 2022, diff --git a/.gitattributes b/.gitattributes index 0e05081..54e68c8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ -main/index.mjs -diff linguist-generated +dist/** -diff linguist-generated yarn.lock -diff linguist-generated diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c6325ad..dc3b818 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -66,7 +66,7 @@ jobs: with: sparse-checkout: | action.yaml - main + dist test sparse-checkout-cone-mode: false @@ -100,7 +100,7 @@ jobs: with: sparse-checkout: | action.yaml - main + dist test sparse-checkout-cone-mode: false @@ -129,7 +129,7 @@ jobs: with: sparse-checkout: | action.yaml - main + dist test sparse-checkout-cone-mode: false @@ -153,7 +153,7 @@ jobs: with: sparse-checkout: | action.yaml - main + dist test sparse-checkout-cone-mode: false @@ -177,7 +177,7 @@ jobs: with: sparse-checkout: | action.yaml - main + dist test sparse-checkout-cone-mode: false @@ -206,7 +206,7 @@ jobs: with: sparse-checkout: | action.yaml - main + dist test sparse-checkout-cone-mode: false diff --git a/.gitignore b/.gitignore index 4f2f85c..aed26c5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,6 @@ build/ coverage/ -dist/ node_modules/ + +src/*.mjs diff --git a/action.yaml b/action.yaml index 58f21b6..463c7e6 100644 --- a/action.yaml +++ b/action.yaml @@ -52,4 +52,4 @@ outputs: value: ${{ steps.process-inputs.outputs.build-dir }} runs: using: node20 - main: main/index.mjs + main: dist/index.mjs diff --git a/main/index.mjs b/dist/index.mjs similarity index 99% rename from main/index.mjs rename to dist/index.mjs index aa2f822..4946f72 100644 --- a/main/index.mjs +++ b/dist/index.mjs @@ -27303,6 +27303,6 @@ async function main() { } } main(); -//# sourceMappingURL=main.mjs.map + })(); diff --git a/jest.config.json b/jest.config.json index 8b7bd70..aef53fe 100644 --- a/jest.config.json +++ b/jest.config.json @@ -7,8 +7,5 @@ "lines": 100, "statements": 100 } - }, - "moduleNameMapper": { - "^(\\.{1,2}/.*)\\.mjs$": "/dist/$1.mjs" } } diff --git a/package.json b/package.json index 5a76fe6..3b979a1 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "private": true, "type": "module", "scripts": { - "build": "tsc && ncc build dist/main.mjs -o main", - "format": "prettier --write . !main !README.md", + "build": "tsc && ncc build src/index.mjs -o dist", + "format": "prettier --write . !dist !README.md", "lint": "eslint --ignore-path .gitignore .", "test": "tsc && jest" }, diff --git a/src/main.mts b/src/index.mts similarity index 100% rename from src/main.mts rename to src/index.mts diff --git a/src/main.test.js b/src/index.test.js similarity index 100% rename from src/main.test.js rename to src/index.test.js diff --git a/tsconfig.json b/tsconfig.json index efec48a..e9de469 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,9 +3,6 @@ "exactOptionalPropertyTypes": true, "strict": true, "module": "node16", - "declaration": true, - "outDir": "dist", - "sourceMap": true, "target": "es2022", "skipLibCheck": true },