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

fix(ts): allow opt-in esModuleInterop (#1) #40

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 33 additions & 17 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,43 @@ on:
pull_request:
branches:
- "*"
env:
CI: true
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
PULL_NUMBER: ${{ github.event.pull_request.number }}
RUN_ID: ${{ github.run_id }}
# NODE_ENV: test

jobs:
build:

runs-on: ubuntu-latest
pipeline:
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: ['12.x', '14.x', '16.x']
os: ['ubuntu-latest']

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm install
npm run test
npm run browser-tests
npm run lint
env:
CI: true
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install project dependencies
run: npm install
id: install

- name: Run project test
run: npm run test
id: test

- name: Run Browser tests
run: npm run browser-tests
id: browser

- name: Check for lint issues
run: npm run lint
id: lint
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ethereum-cryptography",
"version": "1.0.2",
"version": "1.0.4",
"description": "All the cryptographic primitives used in Ethereum",
"contributors": [
{
Expand Down Expand Up @@ -72,7 +72,8 @@
"tslint": "^5.19.0",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.0.1",
"typescript": "4.5.4",
"tslib": "2.4.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't tslib be a dependency? as it's now imported by the compilation output, isn't it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its used at build time to effect compiled output, I do not think it should be, its not like babel-runtime, can double check ofc

"typescript": "4.6.3",
"webpack": "^4.39.3",
"webpack-cli": "^3.3.8"
},
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"target": "es2020",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"esModuleInterop": false,
"importHelpers": true,
"downlevelIteration": true,
"rootDirs": [
"./src",
Expand All @@ -17,4 +18,4 @@
"src/**/*.ts",
"test/**/*.ts"
]
}
}
5 changes: 3 additions & 2 deletions tsconfig.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"target": "es2020",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": false,
"rootDir": "src",
"outDir": ".",
"declaration": true
Expand All @@ -12,4 +13,4 @@
"src/**/*.ts"
],
"exclude": []
}
}