Skip to content

Commit

Permalink
Merge pull request #70 from advanced-security/revert-62-esm-cli-work
Browse files Browse the repository at this point in the history
Revert "Modifications to support conversion from ESM in to CJS for the executables"
  • Loading branch information
jonjanego authored Mar 5, 2024
2 parents 73da251 + 68f64b7 commit 78e33de
Show file tree
Hide file tree
Showing 10 changed files with 2,061 additions and 412 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
lib
output

node_modules
target
Expand Down
2,079 changes: 1,991 additions & 88 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions dist/package.json

This file was deleted.

File renamed without changes.
343 changes: 55 additions & 288 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 13 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
"name": "maven-dependency-submission-action",
"version": "4.0.1",
"description": "Submit Maven dependencies to GitHub dependency submission API",
"type": "module",
"main": "index.js",
"scripts": {
"base-build": "npm ci && tsc",
"build": "npm run base-build && npm exec -- @vercel/ncc build --source-map lib/src/index.js",
"build:cli": "npm run base-build && npm exec -- rollup -c rollup.config.js",
"build-exe": "npm run build:cli && pkg output/cli.js --compress Gzip --out-path cli --targets node18-linux-x64,node18-macos-x64,node18-win-x64",
"build-exe": "npm run build && pkg package.json --compress Gzip",
"test": "vitest --run"
},
"repository": {
Expand All @@ -30,19 +28,27 @@
"packageurl-js": "^1.2.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@types/chai": "^4.3.1",
"@vercel/ncc": "^0.38.1",
"chai": "^4.3.6",
"pkg": "^5.8.0",
"rollup": "^4.10.0",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"vitest": "^1.2.1"
},
"bin": {
"cli": "lib/src/executable/cli.js"
},
"pkg": {
"targets": [
"node18-linux-x64",
"node18-win-x64",
"node18-macos-x64"
],
"assets": [
"package.json"
],
"publicPackages": "*",
"outputPath": "cli"
}
}
19 changes: 0 additions & 19 deletions rollup.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/executable/cli.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pkg from '../../package.json';
import { program } from 'commander';

const { program } = require('commander');
program.name(pkg.name);
program.version(pkg.version);

Expand Down
4 changes: 0 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
"compilerOptions": {
"target": "es6",
"module": "ES2020",
"lib": [
"ES2020",
],
"allowSyntheticDefaultImports": true,
"outDir": "./lib",
"sourceRoot": "./src",
"strict": true,
Expand Down

0 comments on commit 78e33de

Please sign in to comment.