Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: adds support for ESM and Deno #295

Merged
merged 26 commits into from Aug 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
762343f
build: trying to target esm and cjs
bcoe Jul 27, 2020
2ff8f3f
share approch used for dual mode module
bcoe Jul 27, 2020
fdff3c0
feat!: support for ESM and Deno
bcoe Jul 30, 2020
7b25881
chore: fix spacing
bcoe Jul 30, 2020
a0d4446
chore: remove unused deps
bcoe Jul 30, 2020
53a02f0
chore: finished shimming deno
bcoe Jul 30, 2020
3ffbe28
chore: working on shimming deno
bcoe Jul 30, 2020
6f6e630
chore: fix up windows tests
bcoe Jul 30, 2020
af37a7f
chore: add deno to CI/CD
bcoe Jul 30, 2020
f170db8
chore: add unit tests for deno
bcoe Jul 30, 2020
5015beb
chore: checking in build seems like bad idea
bcoe Jul 30, 2020
72c8d18
chore: build library for deno
bcoe Jul 30, 2020
760f39d
Update scripts/replace-legacy-export.cjs
bcoe Jul 30, 2020
df420bb
Update package.json
bcoe Aug 1, 2020
482dee6
chore: addressing review
bcoe Aug 1, 2020
084ed03
chore: add browser tests
bcoe Aug 1, 2020
2abb990
chore: add browser tests
bcoe Aug 1, 2020
2396cb1
chore: only run typescript tests on Node 14
bcoe Aug 1, 2020
7f1380e
chore: fix and simplify linting rules
bcoe Aug 1, 2020
369bd46
chore: continuing to perfect structure
bcoe Aug 1, 2020
c05f030
build: 1:many source maps supported
bcoe Aug 3, 2020
a0f112c
chore: Deno now supports config files
bcoe Aug 4, 2020
43517c7
chore: add rough config for deno release
bcoe Aug 4, 2020
6c2d640
build: configure deno build
bcoe Aug 4, 2020
47aa246
chore: update README with deno and ESM examples
bcoe Aug 4, 2020
a040ec4
chore: remove 'bonus' html
bcoe Aug 4, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 0 additions & 12 deletions .editorconfig

This file was deleted.

45 changes: 43 additions & 2 deletions .github/workflows/ci.yaml
Expand Up @@ -17,6 +17,8 @@ jobs:
node-version: ${{ matrix.node }}
- run: node --version
- run: npm install
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- run: npm test
windows:
runs-on: windows-latest
Expand All @@ -26,14 +28,53 @@ jobs:
with:
node-version: 12
- run: npm install
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- run: npm test
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 13
node-version: 14
- run: npm install
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- run: npm test
- run: npm run coverage
deno:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- run: npm install
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- run: npm run compile
- uses: denolib/setup-deno@v2
with:
deno-version: v1.x
- run: |
deno --version
deno test --allow-read test/deno/yargs-test.ts
browser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- run: npm install
- run: npm run test:browser
typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- run: npm install
- run: npm run test:typescript
22 changes: 21 additions & 1 deletion .github/workflows/release-please.yml
Expand Up @@ -7,8 +7,28 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: bcoe/release-please-action@v1.2.1
- uses: bcoe/release-please-action@v1.6.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: yargs-parser
release-deno:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- run: npm install
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- run: npm run compile
- name: push Deno release
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN}}@github.com/yargs/yargs-parser.git"
git checkout -b deno
git add -f build
git commit -a -m 'build: deploy latest Deno build'
git push origin +deno
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,8 +1,8 @@
.idea
build/
.nyc_output
node_modules
.DS_Store
package-lock.json
./test/fixtures/package.json
coverage
build
6 changes: 0 additions & 6 deletions .mocharc.json

This file was deleted.

6 changes: 3 additions & 3 deletions .nycrc
Expand Up @@ -7,7 +7,7 @@
"html",
"text"
],
"lines": 100,
"branches": "97",
"statements": "100"
"lines": 99.5,
"branches": "98",
"statements": "99.5"
}