Skip to content

Commit 43f05ee

Browse files
committed
Attempt to improve npm ci
1 parent e612960 commit 43f05ee

2 files changed

Lines changed: 20 additions & 10 deletions

File tree

.github/workflows/publish-npm.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ jobs:
5555
node-version: '24'
5656
registry-url: 'https://registry.npmjs.org'
5757

58+
- name: Remove deprecated always-auth from npmrc
59+
run: npm config delete always-auth
60+
5861
- name: Build WASM package
5962
run: wasm-pack build crates/usfm3-wasm --target web
6063

@@ -66,16 +69,8 @@ jobs:
6669
node -e "
6770
const fs = require('fs');
6871
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
69-
pkg.name = 'usfm3';
70-
pkg.version = '${TAG_VERSION}';
71-
pkg.files = ['usfm3_wasm_bg.wasm', 'usfm3_wasm.js', 'usfm3_wasm.d.ts', 'node.js'];
72-
pkg.keywords = ['usfm', 'usj', 'usx', 'vref', 'parser', 'bible', 'scripture'];
73-
pkg.exports = {
74-
'.': {
75-
node: { import: './node.js' },
76-
default: './usfm3_wasm.js'
77-
}
78-
};
72+
const overrides = JSON.parse(fs.readFileSync('../package-overrides.json', 'utf8'));
73+
Object.assign(pkg, overrides, { version: '${TAG_VERSION}' });
7974
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
8075
"
8176
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "usfm3",
3+
"repository": {
4+
"type": "git",
5+
"url": "git+https://github.com/jcuenod/usfm3.git"
6+
},
7+
"files": ["usfm3_wasm_bg.wasm", "usfm3_wasm.js", "usfm3_wasm.d.ts", "node.js"],
8+
"keywords": ["usfm", "usj", "usx", "vref", "parser", "bible", "scripture"],
9+
"exports": {
10+
".": {
11+
"node": { "import": "./node.js" },
12+
"default": "./usfm3_wasm.js"
13+
}
14+
}
15+
}

0 commit comments

Comments
 (0)