Skip to content

Commit 92b492e

Browse files
committedApr 13, 2023
Switch build system from ncc to esbuild
1 parent 1641d03 commit 92b492e

14 files changed

+1322
-6243
lines changed
 

‎.eslintrc.yml

+10
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,15 @@ extends:
88
- "@jsdevtools"
99
- "prettier"
1010

11+
parserOptions:
12+
project:
13+
- "tsconfig.json"
14+
15+
overrides:
16+
- files: ["**/*.mjs"]
17+
parserOptions:
18+
ecmaVersion: "latest"
19+
sourceType: "module"
20+
1121
env:
1222
node: true

‎.github/workflows/ci-cd.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ jobs:
2626
os:
2727
- ubuntu-latest
2828
- macos-latest
29-
# TODO(mc, 2023-04-07): investigate and fix coverage-related failures on Windows
30-
# - windows-latest
29+
- windows-latest
3130
node:
3231
- 16
3332
- 18
@@ -54,9 +53,8 @@ jobs:
5453
run: npm run coverage
5554

5655
- name: Send code coverage results to Coveralls
57-
uses: coverallsapp/github-action@v1.1.0
56+
uses: coverallsapp/github-action@67662d24394fd74bffcf7b462d1b432814159afd
5857
with:
59-
github-token: ${{ secrets.GITHUB_TOKEN }}
6058
parallel: true
6159

6260
coverage:
@@ -66,9 +64,8 @@ jobs:
6664
needs: test
6765
steps:
6866
- name: Let Coveralls know that all tests have finished
69-
uses: coverallsapp/github-action@v1.1.0
67+
uses: coverallsapp/github-action@67662d24394fd74bffcf7b462d1b432814159afd
7068
with:
71-
github-token: ${{ secrets.GITHUB_TOKEN }}
7269
parallel-finished: true
7370

7471
deploy:

‎.gitignore

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ nbproject
2727
.lock-wscript
2828

2929
# Logs
30-
/logs
30+
logs
3131
*.log
3232

3333
# Runtime data
@@ -36,11 +36,11 @@ pids
3636
*.seed
3737

3838
# Dependencies
39-
/node_modules
39+
node_modules
4040

4141
# Build output
42-
/lib
42+
lib
4343

4444
# Test output
45-
/.nyc_output
46-
/coverage
45+
.nyc_output
46+
coverage

‎.nycrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ extension:
55
- .js
66
- .ts
77

8+
exclude:
9+
- test
10+
811
reporter:
912
- text
1013
- lcov

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ npm install @jsdevtools/npm-publish
109109
You can then import it and use it in your code like this:
110110

111111
```javascript
112-
const npmPublish = require("@jsdevtools/npm-publish");
112+
const { npmPublish } = require("@jsdevtools/npm-publish");
113113
114114
// Run npm-publish with all defaults
115115
await npmPublish();

‎bin/npm-publish.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env node
22
"use strict";
3-
const { main } = require("../lib/cli");
4-
main(process.argv.slice(2));
3+
const { version } = require("../package.json");
4+
const { main } = require("../lib/cli/index.js");
5+
6+
main(process.argv.slice(2), version);

‎build.mjs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import * as esbuild from "esbuild";
2+
3+
await esbuild.build({
4+
entryPoints: ["src/action/index.ts"],
5+
platform: "node",
6+
target: "node16",
7+
bundle: true,
8+
sourcemap: true,
9+
outdir: "dist",
10+
});

0 commit comments

Comments
 (0)
Failed to load comments.