Skip to content

Commit 195bc4a

Browse files
authored
feat!: adds support for ESM and Deno (#295)
1 parent bdc80ba commit 195bc4a

30 files changed

+2082
-1701
lines changed

.editorconfig

-12
This file was deleted.

.github/workflows/ci.yaml

+43-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
node-version: ${{ matrix.node }}
1818
- run: node --version
1919
- run: npm install
20+
env:
21+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
2022
- run: npm test
2123
windows:
2224
runs-on: windows-latest
@@ -26,14 +28,53 @@ jobs:
2628
with:
2729
node-version: 12
2830
- run: npm install
31+
env:
32+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
2933
- run: npm test
3034
coverage:
3135
runs-on: ubuntu-latest
3236
steps:
33-
- uses: actions/checkout@v1
37+
- uses: actions/checkout@v2
3438
- uses: actions/setup-node@v1
3539
with:
36-
node-version: 13
40+
node-version: 14
3741
- run: npm install
42+
env:
43+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
3844
- run: npm test
3945
- run: npm run coverage
46+
deno:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v2
50+
- uses: actions/setup-node@v1
51+
with:
52+
node-version: 14
53+
- run: npm install
54+
env:
55+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
56+
- run: npm run compile
57+
- uses: denolib/setup-deno@v2
58+
with:
59+
deno-version: v1.x
60+
- run: |
61+
deno --version
62+
deno test --allow-read test/deno/yargs-test.ts
63+
browser:
64+
runs-on: ubuntu-latest
65+
steps:
66+
- uses: actions/checkout@v2
67+
- uses: actions/setup-node@v1
68+
with:
69+
node-version: 14
70+
- run: npm install
71+
- run: npm run test:browser
72+
typescript:
73+
runs-on: ubuntu-latest
74+
steps:
75+
- uses: actions/checkout@v2
76+
- uses: actions/setup-node@v1
77+
with:
78+
node-version: 14
79+
- run: npm install
80+
- run: npm run test:typescript

.github/workflows/release-please.yml

+21-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,28 @@ jobs:
77
release-please:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: bcoe/release-please-action@v1.2.1
10+
- uses: bcoe/release-please-action@v1.6.3
1111
with:
1212
token: ${{ secrets.GITHUB_TOKEN }}
1313
release-type: node
1414
package-name: yargs-parser
15+
release-deno:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: actions/setup-node@v1
20+
with:
21+
node-version: 14
22+
- run: npm install
23+
env:
24+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
25+
- run: npm run compile
26+
- name: push Deno release
27+
run: |
28+
git config user.name github-actions[bot]
29+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
30+
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN}}@github.com/yargs/yargs-parser.git"
31+
git checkout -b deno
32+
git add -f build
33+
git commit -a -m 'build: deploy latest Deno build'
34+
git push origin +deno

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.idea
2-
build/
32
.nyc_output
43
node_modules
54
.DS_Store
65
package-lock.json
76
./test/fixtures/package.json
87
coverage
8+
build

.mocharc.json

-6
This file was deleted.

.nycrc

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"html",
88
"text"
99
],
10-
"lines": 100,
11-
"branches": "97",
12-
"statements": "100"
10+
"lines": 99.5,
11+
"branches": "98",
12+
"statements": "99.5"
1313
}

0 commit comments

Comments
 (0)