-
Notifications
You must be signed in to change notification settings - Fork 24
Build system changes #252
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
Build system changes #252
Changes from all commits
2afe22f
b6d5813
457fded
8e50ee0
25031f8
927a84d
96c9c06
2a0e237
357ac15
b0c8810
c84d461
c5396bb
37bb7eb
11e9623
872a156
51dd228
b8c1a60
e78d919
8b038f5
7e9118e
1d8803c
c0c5829
a27e013
5bf0d2c
edf3f47
19be18c
c60a2d7
5b9c3e8
1be0f36
ab3e2d6
66635fc
fa30fb8
6c774dc
b38286f
787786f
518f6a0
cbb2fec
48bb593
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Test | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
push: | ||
branches: [ main ] | ||
|
||
pull_request: | ||
branches: [ main ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
build-and-test: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node Environment | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
|
||
# https://github.com/actions/cache/blob/main/examples.md#node---yarn | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
# --- | ||
|
||
- name: Install Dependencies | ||
run: yarn install --network-concurrency 1 | ||
|
||
- name: Build & Test | ||
run: yarn test:prod |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/coverage | ||
/dist | ||
/lib | ||
/docs | ||
/node_modules | ||
/yarn-error.log | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,18 +8,33 @@ | |
"IPFS", | ||
"files" | ||
], | ||
"main": "dist/index.cjs.js", | ||
"module": "dist/index.es5.js", | ||
"browser": "dist/index.umd.min.js", | ||
"main": "lib/index.js", | ||
"exports": { | ||
".": "./lib/index.js", | ||
"./*": "./lib/*.js", | ||
"./package.json": "./package.json" | ||
}, | ||
"types": "lib/index.d.ts", | ||
"typesVersions": { | ||
"*": { | ||
"lib/index.d.ts": [ | ||
"lib/index.d.ts" | ||
], | ||
"*": [ | ||
"lib/*" | ||
] | ||
} | ||
}, | ||
"files": [ | ||
"lib", | ||
"dist", | ||
matheus23 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"README.md", | ||
"CHANGELOG.md", | ||
"LICENSE", | ||
"package.json", | ||
"!*.test.ts", | ||
"docs" | ||
], | ||
"types": "dist/index.d.ts", | ||
"author": "Daniel Holmgren <daniel@fission.codes>", | ||
"repository": { | ||
"type": "git", | ||
|
@@ -28,53 +43,39 @@ | |
"homepage": "https://guide.fission.codes", | ||
"license": "Apache-2.0", | ||
"engines": { | ||
"node": ">=10.21.0" | ||
"node": ">=15" | ||
}, | ||
"scripts": { | ||
"docs": "rimraf docs && typedoc && typedoc --entryPoints ./src/fs --out docs/fs", | ||
"lint": "yarn eslint src/**/*.ts", | ||
"prebuild": "rimraf dist && node scripts/gen-version.js", | ||
"build": "tsc && rollup -c rollup.config.ts", | ||
"start": "tsc -w", | ||
"prebuild": "rimraf lib dist && node scripts/gen-version.js", | ||
"build": "ttsc && yarn run build:minified && cp src/package.json lib/package.json", | ||
"build:minified": "esbuild src/index.ts --outfile=dist/index.min.js --bundle --minify --sourcemap --platform=browser --format=iife --global-name=globalThis.webnative --target=es2020 && gzip -k9 dist/index.min.js", | ||
"start": "ttsc -w", | ||
"test": "jest --forceExit", | ||
Comment on lines
+54
to
55
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. Not totally relevant, but do we want to switch stuff around so |
||
"test:watch": "jest --watch", | ||
"test:prod": "yarn run build && yarn run lint && yarn run test -- --no-cache", | ||
"test:types": "cp -RT tests/types/ dist/ && yarn run tsd", | ||
"test:prod": "yarn run build && yarn run lint && yarn run test --no-cache", | ||
"test:types": "cp -RT tests/types/ lib/ && yarn run tsd", | ||
"test:unit": "jest --watch --testPathPattern=src/", | ||
"precommit": "lint-staged", | ||
"prepublishOnly": "yarn build && yarn docs", | ||
"prepare": "yarn build && yarn docs", | ||
"publish-dry": "npm publish --dry-run", | ||
"publish-alpha": "npm publish --tag alpha", | ||
"publish-latest": "npm publish --tag latest" | ||
}, | ||
"lint-staged": { | ||
"{src,test}/**/*.ts": [ | ||
"prettier --write", | ||
"git add" | ||
] | ||
}, | ||
"prettier": { | ||
"semi": false, | ||
"singleQuote": true | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.14.3", | ||
"@babel/preset-env": "^7.14.2", | ||
"@babel/preset-typescript": "^7.13.0", | ||
"@ipld/car": "https://github.com/matheus23/ipld-car-jest-fix#28fa48a8d0e701ddaf6e4785d0d9f08735b67bc8", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^19.0.0", | ||
"@rollup/plugin-inject": "^4.0.2", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-node-resolve": "^13.0.0", | ||
"@types/jest": "^26.0.23", | ||
"@types/jest-environment-puppeteer": "^4.4.1", | ||
"@types/node": "^15.6.1", | ||
"@types/throttle-debounce": "^2.1.0", | ||
"@typescript-eslint/eslint-plugin": "^4.25.0", | ||
"@typescript-eslint/parser": "^4.25.0", | ||
"@zoltu/typescript-transformer-append-js-extension": "^1.0.1", | ||
"babel-jest": "^27.0.1", | ||
"braces": "^3.0.2", | ||
"esbuild": "^0.12.8", | ||
"eslint": "^7.27.0", | ||
"fast-check": "^2.14.0", | ||
"interface-datastore": "^4.0.1", | ||
|
@@ -84,44 +85,34 @@ | |
"jest": "^27.0.1", | ||
"jest-config": "^27.0.1", | ||
"jest-puppeteer": "^5.0.4", | ||
"lint-staged": "^11.0.0", | ||
"multihashing-async": "^2.1.2", | ||
"prettier": "^2.3.0", | ||
"prompt": "^1.1.0", | ||
"puppeteer": "^9.1.1", | ||
"replace-in-file": "^6.2.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.50.3", | ||
"rollup-plugin-gzip": "^2.5.0", | ||
"rollup-plugin-node-polyfills": "^0.2.1", | ||
"rollup-plugin-sourcemaps": "^0.6.3", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-typescript2": "^0.30.0", | ||
"tslib": "^2.2.0", | ||
"typedoc": "^0.20.36", | ||
"ttypescript": "^1.5.12", | ||
"typedoc": "^0.21.0-beta.2", | ||
matheus23 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"typescript": "^4.3.2", | ||
"typescript-documentation": "^2.0.0", | ||
"yarn": "^1.22.4" | ||
}, | ||
"dependencies": { | ||
"base58-universal": "https://github.com/digitalbazaar/base58-universal#de970560f005de0f7054723c35ef6e0ff4b328b7", | ||
"borc": "^3.0.0", | ||
"buffer": "^6.0.3", | ||
"cborg": "^1.3.4", | ||
"cids": "^1.1.6", | ||
"fission-bloom-filters": "1.7.0", | ||
"fission-bloom-filters": "1.7.1", | ||
"ipfs-message-port-client": "https://ipfs.runfission.com/ipfs/bafybeigx6q4aezve7my76s5vvfuiinbxtepapqvmjf2jbgrozrut6cjape/p/ipfs-message-port-client.tar.gz", | ||
"ipfs-message-port-protocol": "https://ipfs.runfission.com/ipfs/bafybeigx6q4aezve7my76s5vvfuiinbxtepapqvmjf2jbgrozrut6cjape/p/ipfs-message-port-protocol.tar.gz", | ||
"ipld-dag-pb": "^0.22.2", | ||
"keystore-idb": "0.14.1", | ||
"keystore-idb": "0.14.2", | ||
"localforage": "^1.9.0", | ||
"make-error": "^1.3.6", | ||
"noble-ed25519": "^1.2.2", | ||
"noble-ed25519": "^1.2.4", | ||
"throttle-debounce": "^3.0.1" | ||
}, | ||
"resolutions": { | ||
"**/ipfs-message-port-protocol": "https://ipfs.runfission.com/ipfs/bafybeigx6q4aezve7my76s5vvfuiinbxtepapqvmjf2jbgrozrut6cjape/p/ipfs-message-port-protocol.tar.gz" | ||
}, | ||
"tsd": { | ||
"directory": "dist" | ||
"directory": "lib" | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,4 @@ pkgs.mkShell { | |
unstable.nodejs-16_x | ||
unstable.niv | ||
]; | ||
|
||
shellHook = '' | ||
${yarn}/bin/yarn install | ||
''; | ||
} |
Uh oh!
There was an error while loading. Please reload this page.