Skip to content

Commit 6af6550

Browse files
committed
ci: make scope in npm publications transparents
Since it's already in the package.json name, we do not need to re-specify it so it can be removed from the ci workflows.
1 parent 814a4ce commit 6af6550

File tree

6 files changed

+5
-16
lines changed

6 files changed

+5
-16
lines changed

.github/workflows/actions/publish-npm-package/action.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ inputs:
88
package_dir:
99
description: directory containing the package.json file.
1010
required: true
11-
scope:
12-
description: npm package scope (must not include '@' prefix).
13-
required: true
1411
tag:
1512
description: npm package tag.
1613
required: false
@@ -81,7 +78,7 @@ runs:
8178
shell: bash
8279
working-directory: ${{ inputs.package_dir }}
8380
env:
84-
WASM_PACK_ARGS: --release --scope ${{ inputs.scope }}
81+
WASM_PACK_ARGS: --release
8582
run: |
8683
echo "Build '${{ steps.prepare.outputs.package_name }}' package"
8784
make build

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
shell: bash
137137
working-directory: mithril-client-wasm
138138
env:
139-
WASM_PACK_ARGS: --release --scope mithril-dev
139+
WASM_PACK_ARGS: --release
140140
run: make build
141141

142142
- name: Prepare 'mithril-client-wasm' package
@@ -594,7 +594,6 @@ jobs:
594594
package: [mithril-client-wasm]
595595
include:
596596
- package: mithril-client-wasm
597-
scope: mithril-dev
598597
tag: latest
599598
access: public
600599
api_token_secret_name: NPM_API_TOKEN_MITHRIL_CLIENT_WASM
@@ -618,7 +617,6 @@ jobs:
618617
with:
619618
dry_run: "true"
620619
package_dir: ${{ matrix.package }}
621-
scope: ${{ matrix.scope }}
622620
access: ${{ matrix.access }}
623621
api_token: ${{ secrets[matrix.api_token_secret_name] }}
624622

.github/workflows/manual-publish-npm.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
package: [mithril-client-wasm]
4040
include:
4141
- package: mithril-client-wasm
42-
scope: mithril-dev
4342
tag: latest
4443
access: public
4544
api_token_secret_name: NPM_API_TOKEN_MITHRIL_CLIENT_WASM
@@ -66,7 +65,6 @@ jobs:
6665
with:
6766
dry_run: ${{ inputs.dry_run }}
6867
package_dir: ${{ matrix.package }}
69-
scope: ${{ matrix.scope }}
7068
tag: ${{ matrix.tag }}
7169
access: ${{ matrix.access }}
7270
api_token: ${{ secrets[matrix.api_token_secret_name] }}

.github/workflows/pre-release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ jobs:
324324
package: [mithril-client-wasm]
325325
include:
326326
- package: mithril-client-wasm
327-
scope: mithril-dev
328327
tag: next
329328
access: public
330329
api_token_secret_name: NPM_API_TOKEN_MITHRIL_CLIENT_WASM
@@ -346,7 +345,6 @@ jobs:
346345
with:
347346
dry_run: "false"
348347
package_dir: ${{ matrix.package }}
349-
scope: ${{ matrix.scope }}
350348
tag: next
351349
access: ${{ matrix.access }}
352350
api_token: ${{ secrets[matrix.api_token_secret_name] }}

.github/workflows/release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ jobs:
256256
package: [mithril-client-wasm]
257257
include:
258258
- package: mithril-client-wasm
259-
scope: mithril-dev
260259
tag: latest
261260
access: public
262261
api_token_secret_name: NPM_API_TOKEN_MITHRIL_CLIENT_WASM
@@ -278,7 +277,6 @@ jobs:
278277
with:
279278
dry_run: "false"
280279
package_dir: ${{ matrix.package }}
281-
scope: ${{ matrix.scope }}
282280
tag: latest
283281
access: ${{ matrix.access }}
284282
api_token: ${{ secrets[matrix.api_token_secret_name] }}

mithril-client-wasm/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
"types": "dist/node/mithril_client_wasm.d.ts",
2626
"scripts": {
2727
"build": "npm run build:node && npm run build:web && npm run build:bundler",
28-
"build:bundler": "wasm-pack build --target bundler --out-dir dist/bundler $WASM_PACK_ARGS",
28+
"build:bundler": "wasm-pack build --target bundler --out-dir dist/bundler --scope mithril-dev $WASM_PACK_ARGS",
2929
"postbuild:bundler": "rm dist/bundler/.gitignore",
30-
"build:node": "wasm-pack build --target nodejs --out-dir dist/node $WASM_PACK_ARGS",
30+
"build:node": "wasm-pack build --target nodejs --out-dir dist/node --scope mithril-dev $WASM_PACK_ARGS",
3131
"postbuild:node": "rm dist/node/.gitignore",
32-
"build:web": "wasm-pack build --target web --out-dir dist/web $WASM_PACK_ARGS",
32+
"build:web": "wasm-pack build --target web --out-dir dist/web --scope mithril-dev $WASM_PACK_ARGS",
3333
"postbuild:web": "rm dist/web/.gitignore"
3434
}
3535
}

0 commit comments

Comments
 (0)