Skip to content

Commit d43aaa2

Browse files
committed
feat: use aegir for build/testing/release
1 parent dcfdac5 commit d43aaa2

12 files changed

Lines changed: 185 additions & 137 deletions

.eslintrc

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
{
2-
"extends": [
3-
"standard",
4-
"plugin:@typescript-eslint/recommended"
5-
],
6-
"plugins": [
7-
"@typescript-eslint"
8-
],
9-
"rules": {
10-
"@typescript-eslint/explicit-module-boundary-types": "off",
11-
"@typescript-eslint/ban-ts-comment": "off"
2+
"extends": "ipfs",
3+
"env": {
4+
"browser": true,
5+
"node": true,
6+
"es2020": true
127
}
138
}

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
.nyc_output
2-
build
3-
dist
4-
coverage
1+
.coverage
52
package-lock.json
63
node_modules
74
.DS_Store

package.json

Lines changed: 16 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,21 @@
66
"types": "./types/src/index.d.ts",
77
"type": "module",
88
"scripts": {
9-
"build": "npm run build:js && npm run build:types",
10-
"build:js": "ipjs build --tests --main && npm run build:copy",
11-
"build:copy": "cp -a tsconfig.json src vendor test dist/ && rm -rf dist/test/ts-use",
12-
"build:types": "npm run build:copy && cd dist && tsc --build",
13-
"build:vendor": "npm run build:vendor:varint && npm run build:vendor:base-x",
14-
"build:vendor:varint": "npm_config_yes=true npx brrp -x varint > vendor/varint.js",
15-
"build:vendor:base-x": "npm_config_yes=true npx brrp -x @multiformats/base-x > vendor/base-x.js",
16-
"lint": "standard",
17-
"test:cjs": "npm run build:js && mocha dist/cjs/node-test/test-*.js && npm run test:cjs:browser",
18-
"test:esm": "npm run build:js && mocha dist/esm/node-test/test-*.js && npm run test:esm:browser",
19-
"test:node": "c8 --check-coverage --branches 100 --functions 100 --lines 100 mocha test/test-*.js",
20-
"test:cjs:browser": "polendina --page --worker --serviceworker --cleanup dist/cjs/browser-test/test-*.js",
21-
"test:esm:browser": "polendina --page --worker --serviceworker --cleanup dist/esm/browser-test/test-*.js",
22-
"test:ts": "npm run build:types && npm run test --prefix test/ts-use",
23-
"test": "npm run lint && npm run test:node && npm run test:esm && npm run test:ts",
24-
"test:ci": "npm run lint && npm run test:node && npm run test:esm && npm run test:cjs && npm run test:ts",
25-
"coverage": "c8 --reporter=html mocha test/test-*.js && npm_config_yes=true npx st -d coverage -p 8080"
9+
"lint": "aegir lint",
10+
"release": "aegir release",
11+
"build": "aegir build",
12+
"test": "aegir test",
13+
"test:node": "aegir test --target node",
14+
"test:browser": "aegir test --target browser"
2615
},
27-
"c8": {
28-
"exclude": [
29-
"test/**",
30-
"vendor/**"
31-
]
16+
"aegir": {
17+
"build": {
18+
"bundle": false
19+
},
20+
"test": {
21+
"cov": true,
22+
"target": ["node", "browser"]
23+
}
3224
},
3325
"keywords": [
3426
"ipfs",
@@ -111,24 +103,11 @@
111103
"@types/chai-as-promised": "^7.1.4",
112104
"@types/mocha": "^9.0.0",
113105
"@types/node": "^18.0.0",
114-
"@typescript-eslint/eslint-plugin": "^5.6.0",
115-
"@typescript-eslint/parser": "^5.6.0",
106+
"aegir": "^37.5.1",
116107
"buffer": "^6.0.3",
117-
"c8": "^7.10.0",
118108
"chai": "^4.3.4",
119109
"chai-as-promised": "^7.1.1",
120-
"cids": "^1.1.9",
121-
"ipjs": "^5.2.0",
122-
"mocha": "^10.0.0",
123-
"polendina": "^3.0.0",
124-
"standard": "^17.0.0",
125-
"typescript": "^4.5.4"
126-
},
127-
"standard": {
128-
"ignore": [
129-
"dist",
130-
"vendor"
131-
]
110+
"cids": "^1.1.9"
132111
},
133112
"directories": {
134113
"test": "test"
@@ -150,91 +129,5 @@
150129
"types/*"
151130
]
152131
}
153-
},
154-
"release": {
155-
"branches": [
156-
"master"
157-
],
158-
"plugins": [
159-
[
160-
"@semantic-release/commit-analyzer",
161-
{
162-
"preset": "conventionalcommits",
163-
"releaseRules": [
164-
{
165-
"breaking": true,
166-
"release": "major"
167-
},
168-
{
169-
"revert": true,
170-
"release": "patch"
171-
},
172-
{
173-
"type": "feat",
174-
"release": "minor"
175-
},
176-
{
177-
"type": "fix",
178-
"release": "patch"
179-
},
180-
{
181-
"type": "chore",
182-
"release": "patch"
183-
},
184-
{
185-
"type": "docs",
186-
"release": "patch"
187-
},
188-
{
189-
"type": "test",
190-
"release": "patch"
191-
},
192-
{
193-
"scope": "no-release",
194-
"release": false
195-
}
196-
]
197-
}
198-
],
199-
[
200-
"@semantic-release/release-notes-generator",
201-
{
202-
"preset": "conventionalcommits",
203-
"presetConfig": {
204-
"types": [
205-
{
206-
"type": "feat",
207-
"section": "Features"
208-
},
209-
{
210-
"type": "fix",
211-
"section": "Bug Fixes"
212-
},
213-
{
214-
"type": "chore",
215-
"section": "Trivial Changes"
216-
},
217-
{
218-
"type": "docs",
219-
"section": "Trivial Changes"
220-
},
221-
{
222-
"type": "test",
223-
"section": "Tests"
224-
}
225-
]
226-
}
227-
}
228-
],
229-
"@semantic-release/changelog",
230-
[
231-
"@semantic-release/npm",
232-
{
233-
"pkgRoot": "dist"
234-
}
235-
],
236-
"@semantic-release/github",
237-
"@semantic-release/git"
238-
]
239132
}
240133
}
File renamed without changes.

0 commit comments

Comments
 (0)