Skip to content

Commit 6d20396

Browse files
committed
Change prepublish to prepack, add build test.
- Changed to avoid build step for development installs. - No `dist/` files will be generated by default for development installs. Run `npm run build` if needed. - CI build test added to check builds work.
1 parent b79fc11 commit 6d20396

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

.github/workflows/main.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ name: Node.js CI
33
on: [push]
44

55
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
timeout-minutes: 10
9+
strategy:
10+
matrix:
11+
node-version: [16.x]
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Use Node.js ${{ matrix.node-version }}
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: ${{ matrix.node-version }}
18+
- run: npm install
19+
- name: Run eslint
20+
run: npm run lint
621
test-node:
722
runs-on: ubuntu-latest
823
timeout-minutes: 10
@@ -42,7 +57,7 @@ jobs:
4257
run: npm run test-karma
4358
env:
4459
BUNDLER: ${{ matrix.bundler }}
45-
lint:
60+
build:
4661
runs-on: ubuntu-latest
4762
timeout-minutes: 10
4863
strategy:
@@ -55,8 +70,8 @@ jobs:
5570
with:
5671
node-version: ${{ matrix.node-version }}
5772
- run: npm install
58-
- name: Run eslint
59-
run: npm run lint
73+
- name: Run build
74+
run: npm run build
6075
coverage:
6176
needs: [test-node, test-karma]
6277
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
causes the included `node` `documentLoader` to not function and tests to
1111
fail. If you wish to still use earlier Node.js versions, you may still be
1212
able to do so with your own custom `documentLoader`.
13+
- **BREAKING**: `npm` `prepublish` script changed to `prepack`. The `dist/`
14+
contents will not be generated by default for development installs. Run `npm
15+
run build` if needed. This was done to avoid extra work only needed for
16+
packing and publication, and for temporary `webpack` version issues. A new CI
17+
`build` test has been added to check builds pass. The `prepack` script could
18+
be `prepare` instead if use cases exist where that is needed. File an issue
19+
if this is a concern.
1320
- Update to `@digitalbazaar/http-client@3`:
1421
- Pulls in newer `ky` and `ky-universal` that should address security alerts
1522
and provide other improvements.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"jsonld"
9090
],
9191
"scripts": {
92-
"prepublish": "npm run build",
92+
"prepack": "npm run build",
9393
"build": "npm run build-webpack",
9494
"build-webpack": "webpack",
9595
"fetch-test-suites": "npm run fetch-json-ld-wg-test-suite && npm run fetch-json-ld-org-test-suite && npm run fetch-normalization-test-suite",

0 commit comments

Comments
 (0)