-
Notifications
You must be signed in to change notification settings - Fork 26
chore: switch to esm #22
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
Changes from 10 commits
af071d9
6188dfa
f7fd981
8da4fa7
0d9929c
61d7b40
96141d7
9c8835a
bb3ed8d
c5124ff
4b704df
7776e63
3064dda
09e7c3e
89b1d80
fa58e00
b9905f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,6 @@ jobs: | |
- uses: gozala/[email protected] | ||
- run: npx aegir build | ||
- run: npx aegir dep-check | ||
- uses: ipfs/aegir/actions/bundle-size@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
test-node: | ||
needs: check | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -66,11 +63,13 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npx xvfb-maybe aegir test -t electron-main --bail | ||
- run: npm run build -- --esm-tests # build tests with esm | ||
- run: npx xvfb-maybe aegir test -t electron-main -f "dist/cjs/node-test/*js" --bail | ||
test-electron-renderer: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npx xvfb-maybe aegir test -t electron-renderer --bail | ||
- run: npm run build -- --esm-tests # build tests with esm | ||
- run: npx xvfb-maybe aegir test -t electron-renderer -f "dist/cjs/node-test/*js" --bail |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules | ||
dist | ||
types | ||
docs | ||
package-lock.json |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,40 +2,17 @@ | |
"name": "uint8arrays", | ||
"version": "2.1.8", | ||
"description": "Utility functions to make dealing with Uint8Arrays easier", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"author": "Alex Potsides <[email protected]>", | ||
"homepage": "https://github.com/achingbrain/uint8arrays", | ||
"bugs": "https://github.com/achingbrain/uint8arrays/issues", | ||
"types": "dist/index.d.ts", | ||
"typesVersions": { | ||
"*": { | ||
"*": [ | ||
"dist/*" | ||
], | ||
"index.js": [ | ||
"dist/index.d.ts" | ||
] | ||
} | ||
}, | ||
"files": [ | ||
"compare.js", | ||
"concat.js", | ||
"equals.js", | ||
"from-string.js", | ||
"index.js", | ||
"to-string.js", | ||
"xor.js", | ||
"dist/**/*.ts", | ||
"dist/**/*.map", | ||
"dist/**/*.js", | ||
"util/*.js" | ||
], | ||
"type": "module", | ||
"types": "types/src/index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/achingbrain/uint8arrays.git" | ||
}, | ||
"scripts": { | ||
"prepare": "aegir build --no-bundle", | ||
"test": "aegir test", | ||
"lint": "aegir ts -p check && aegir lint", | ||
"release": "aegir release", | ||
|
@@ -48,15 +25,70 @@ | |
"multiformats": "^9.4.2" | ||
}, | ||
"devDependencies": { | ||
"aegir": "^34.0.2", | ||
"aegir": "https://gitpkg.now.sh/ipfs/aegir?feat/build-esm-modules-follow-up", | ||
"util": "^0.12.4" | ||
}, | ||
"eslintConfig": { | ||
"extends": "ipfs", | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"ignorePatterns": [ | ||
"!.aegir.js" | ||
] | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
"*": [ | ||
"types/src", | ||
"types/src/*" | ||
] | ||
} | ||
}, | ||
"exports": { | ||
".": { | ||
"import": "./src/index.js" | ||
}, | ||
"./compare": { | ||
"import": "./src/compare.js" | ||
}, | ||
"./concat": { | ||
"import": "./src/concat.js" | ||
}, | ||
"./equals": { | ||
"import": "./src/equals.js" | ||
}, | ||
"./from-string": { | ||
"import": "./src/from-string.js" | ||
}, | ||
"./to-string": { | ||
"import": "./src/to-string.js" | ||
}, | ||
"./xor": { | ||
"import": "./src/xor.js" | ||
}, | ||
"./index.js": { | ||
"import": "./src/index.js" | ||
}, | ||
"./compare.js": { | ||
"import": "./src/compare.js" | ||
}, | ||
"./concat.js": { | ||
"import": "./src/concat.js" | ||
}, | ||
"./equals.js": { | ||
"import": "./src/equals.js" | ||
}, | ||
"./from-string.js": { | ||
"import": "./src/from-string.js" | ||
}, | ||
"./to-string.js": { | ||
"import": "./src/to-string.js" | ||
}, | ||
"./xor.js": { | ||
"import": "./src/xor.js" | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need to double up these exports? Could be quite error prone over time, maybe we could get ipjs to do this for us? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We talked about this offline a couple of weeks. Anyway, we do not need this anymore. Removed now |
||
}, | ||
"contributors": [ | ||
"achingbrain <[email protected]>", | ||
"Cayman <[email protected]>", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { compare } from './compare.js' | ||
import { concat } from './concat.js' | ||
import { equals } from './equals.js' | ||
import { fromString } from './from-string.js' | ||
import { toString } from './to-string.js' | ||
import { xor } from './xor.js' | ||
|
||
export { | ||
compare, | ||
concat, | ||
equals, | ||
fromString, | ||
toString, | ||
xor | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be added again once aegir ships it as I could not make it use a branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've restored this but now CI is failing on this step with:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh damn, I will look into it