Skip to content

Commit c27bdee

Browse files
authored
fix/npm scripts (#1956)
1 parent 7ceb945 commit c27bdee

File tree

64 files changed

+1022
-905
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1022
-905
lines changed

.changeset/nice-stars-deny.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
"@prosopo/procaptcha-frictionless": patch
3+
"@prosopo/vite-plugin-watch-workspace": patch
4+
"@prosopo/client-bundle-example": patch
5+
"@prosopo/client-example-server": patch
6+
"@prosopo/api-express-router": patch
7+
"@prosopo/user-access-policy": patch
8+
"@prosopo/procaptcha-bundle": patch
9+
"@prosopo/procaptcha-common": patch
10+
"@prosopo/procaptcha-react": patch
11+
"@prosopo/widget-skeleton": patch
12+
"@prosopo/procaptcha-pow": patch
13+
"@prosopo/types-database": patch
14+
"@prosopo/load-balancer": patch
15+
"@prosopo/cypress-shared": patch
16+
"@prosopo/prosoponator-bot": patch
17+
"@prosopo/datasets-fs": patch
18+
"@prosopo/file-server": patch
19+
"@prosopo/fingerprint": patch
20+
"@prosopo/util-crypto": patch
21+
"@prosopo/provider-mock": patch
22+
"@prosopo/procaptcha": patch
23+
"@prosopo/api-route": patch
24+
"@prosopo/types-env": patch
25+
"@prosopo/database": patch
26+
"@prosopo/datasets": patch
27+
"@prosopo/detector": patch
28+
"@prosopo/provider": patch
29+
"@prosopo/account": patch
30+
"@prosopo/keyring": patch
31+
"@prosopo/common": patch
32+
"@prosopo/dotenv": patch
33+
"@prosopo/server": patch
34+
"@prosopo/gh-actions": patch
35+
"@prosopo/types": patch
36+
"@prosopo/util": patch
37+
"@prosopo/ts-brand": patch
38+
"@prosopo/api": patch
39+
"@prosopo/cli": patch
40+
"@prosopo/env": patch
41+
"@prosopo/scripts": patch
42+
"@prosopo/config": patch
43+
"@prosopo/flux": patch
44+
"@prosopo/lint": patch
45+
---
46+
47+
fix npm scripts bundle command
48+

.changeset/violet-papayas-slide.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
"@prosopo/procaptcha-frictionless": patch
3+
"@prosopo/vite-plugin-watch-workspace": patch
4+
"@prosopo/client-bundle-example": patch
5+
"@prosopo/client-example-server": patch
6+
"@prosopo/api-express-router": patch
7+
"@prosopo/user-access-policy": patch
8+
"@prosopo/procaptcha-bundle": patch
9+
"@prosopo/procaptcha-common": patch
10+
"@prosopo/procaptcha-react": patch
11+
"@prosopo/widget-skeleton": patch
12+
"@prosopo/procaptcha-pow": patch
13+
"@prosopo/types-database": patch
14+
"@prosopo/load-balancer": patch
15+
"@prosopo/cypress-shared": patch
16+
"@prosopo/prosoponator-bot": patch
17+
"@prosopo/datasets-fs": patch
18+
"@prosopo/file-server": patch
19+
"@prosopo/fingerprint": patch
20+
"@prosopo/util-crypto": patch
21+
"@prosopo/provider-mock": patch
22+
"@prosopo/procaptcha": patch
23+
"@prosopo/api-route": patch
24+
"@prosopo/types-env": patch
25+
"@prosopo/database": patch
26+
"@prosopo/datasets": patch
27+
"@prosopo/detector": patch
28+
"@prosopo/provider": patch
29+
"@prosopo/account": patch
30+
"@prosopo/keyring": patch
31+
"@prosopo/common": patch
32+
"@prosopo/dotenv": patch
33+
"@prosopo/locale": patch
34+
"@prosopo/server": patch
35+
"@prosopo/gh-actions": patch
36+
"@prosopo/types": patch
37+
"@prosopo/util": patch
38+
"@prosopo/ts-brand": patch
39+
"@prosopo/api": patch
40+
"@prosopo/cli": patch
41+
"@prosopo/env": patch
42+
"@prosopo/scripts": patch
43+
"@prosopo/config": patch
44+
"@prosopo/flux": patch
45+
"@prosopo/lint": patch
46+
---
47+
48+
standardise all vite based npm scripts for bundling
49+

.github/workflows/cache.yml

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,56 @@
33
name: cache
44

55
on:
6-
push:
7-
branches: [main, dev, staging]
8-
workflow_dispatch:
6+
push:
7+
branches: [main, dev, staging]
8+
workflow_dispatch:
99

1010
concurrency:
11-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12-
cancel-in-progress: true
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
1313

1414
env:
15-
GITHUB_TOKEN: ${{ secrets.PROSOPONATOR_PAT }}
16-
GH_TOKEN: ${{ secrets.PROSOPONATOR_PAT }}
17-
CARGO_TERM_COLOR: always
18-
NODE_OPTIONS: "--max-old-space-size=4096"
15+
GITHUB_TOKEN: ${{ secrets.PROSOPONATOR_PAT }}
16+
GH_TOKEN: ${{ secrets.PROSOPONATOR_PAT }}
17+
CARGO_TERM_COLOR: always
18+
NODE_OPTIONS: "--max-old-space-size=4096"
1919

2020
defaults:
21-
run:
22-
shell: bash
21+
run:
22+
shell: bash
2323

2424
jobs:
25-
build:
26-
runs-on: ubuntu-latest
27-
steps:
28-
- name: Print contexts
29-
uses: prosopo/captcha/.github/actions/print_contexts@gha
30-
with:
31-
INPUTS_CONTEXT: ${{ toJson(inputs) }}
32-
NEEDS_CONTEXT: ${{ toJson(needs) }}
33-
VARS_CONTEXT: ${{ toJson(vars) }}
34-
SECRETS_CONTEXT: ${{ toJson(secrets) }}
35-
36-
- name: Set NX_PARALLEL environment variable
37-
run: echo "NX_PARALLEL=$(nproc)" >> $GITHUB_ENV
38-
39-
- uses: actions/checkout@v4
40-
with:
41-
submodules: "recursive"
42-
43-
# don't restore the cache, otherwise we get artifacts left over from the previous run sit in the cache for eternity. Do a clean build every time.
44-
- run: npm cache clean --force
45-
46-
- uses: prosopo/captcha/.github/actions/npm@gha
47-
with:
48-
npm_ci_args: '--include=dev'
49-
50-
# clean the nx cache
51-
- run: npx nx reset
52-
53-
# install cypress so we don't have to do that every time
54-
- run: npx cypress install
55-
56-
- name: Save npm cache
57-
uses: prosopo/captcha/.github/actions/save_npm_cache@gha
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Print contexts
29+
uses: prosopo/captcha/.github/actions/print_contexts@gha
30+
with:
31+
INPUTS_CONTEXT: ${{ toJson(inputs) }}
32+
NEEDS_CONTEXT: ${{ toJson(needs) }}
33+
VARS_CONTEXT: ${{ toJson(vars) }}
34+
SECRETS_CONTEXT: ${{ toJson(secrets) }}
35+
36+
- name: Set NX_PARALLEL environment variable
37+
run: echo "NX_PARALLEL=$(nproc)" >> $GITHUB_ENV
38+
39+
- uses: actions/checkout@v4
40+
with:
41+
submodules: "recursive"
42+
43+
# don't restore the cache, otherwise we get artifacts left over from the previous run sit in the cache for eternity. Do a clean build every time.
44+
- run: npm cache clean --force
45+
46+
- uses: prosopo/captcha/.github/actions/npm@gha
47+
with:
48+
npm_ci_args: '--include=dev'
49+
50+
# clean the nx cache
51+
- run: npx nx reset
52+
53+
# install cypress so we don't have to do that every time
54+
- run: npx cypress install
55+
56+
- name: Save npm cache
57+
uses: prosopo/captcha/.github/actions/save_npm_cache@gha
5858

.github/workflows/changesets.yml

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -5,59 +5,59 @@
55
name: changesets
66

77
on:
8-
pull_request:
9-
# all branches
10-
types:
11-
- opened # when a PR is opened
12-
- synchronize # when a PR is pushed to
13-
- reopened # when a PR is reopened
14-
- ready_for_review # when a PR is marked as ready for review (e.g. taken off draft mode)
15-
workflow_dispatch:
8+
pull_request:
9+
# all branches
10+
types:
11+
- opened # when a PR is opened
12+
- synchronize # when a PR is pushed to
13+
- reopened # when a PR is reopened
14+
- ready_for_review # when a PR is marked as ready for review (e.g. taken off draft mode)
15+
workflow_dispatch:
1616

1717
concurrency:
18-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
19-
cancel-in-progress: true
18+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
19+
cancel-in-progress: true
2020

2121
defaults:
22-
run:
23-
shell: bash
22+
run:
23+
shell: bash
2424

2525
jobs:
26-
check:
27-
name: check
28-
runs-on: ubuntu-latest
29-
steps:
30-
- name: Print contexts
31-
uses: prosopo/captcha/.github/actions/print_contexts@gha
32-
with:
33-
INPUTS_CONTEXT: ${{ toJson(inputs) }}
34-
NEEDS_CONTEXT: ${{ toJson(needs) }}
35-
VARS_CONTEXT: ${{ toJson(vars) }}
36-
SECRETS_CONTEXT: ${{ toJson(secrets) }}
37-
38-
- name: Set NX_PARALLEL environment variable
39-
run: echo "NX_PARALLEL=$(nproc)" >> $GITHUB_ENV
40-
41-
- uses: actions/checkout@v4
42-
with:
43-
submodules: 'recursive'
44-
fetch-depth: 0 # required for comparing changesets to the base branch
45-
46-
- uses: prosopo/captcha/.github/actions/npm@gha
47-
with:
48-
npm_ci_args: '--include=dev'
49-
50-
# checkout the base and head refs
51-
# ensures we have history for both
52-
- name: Checkout base ref
53-
run: git fetch origin ${{ github.base_ref }} && git checkout ${{ github.base_ref }}
54-
55-
- name: Checkout head ref
56-
run: git fetch origin ${{ github.head_ref }} && git checkout ${{ github.head_ref }}
57-
58-
# if this fails, you need to run `npm run changesets:add` (preferred!) or `npm run changesets:empty` for an empty changeset (avoid if possible)
59-
- name: check changesets
60-
run: |
61-
62-
# check that the changesets are present for each package which has been modified
63-
npm run changesets -- --since ${{ github.base_ref }}
26+
check:
27+
name: check
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Print contexts
31+
uses: prosopo/captcha/.github/actions/print_contexts@gha
32+
with:
33+
INPUTS_CONTEXT: ${{ toJson(inputs) }}
34+
NEEDS_CONTEXT: ${{ toJson(needs) }}
35+
VARS_CONTEXT: ${{ toJson(vars) }}
36+
SECRETS_CONTEXT: ${{ toJson(secrets) }}
37+
38+
- name: Set NX_PARALLEL environment variable
39+
run: echo "NX_PARALLEL=$(nproc)" >> $GITHUB_ENV
40+
41+
- uses: actions/checkout@v4
42+
with:
43+
submodules: 'recursive'
44+
fetch-depth: 0 # required for comparing changesets to the base branch
45+
46+
- uses: prosopo/captcha/.github/actions/npm@gha
47+
with:
48+
npm_ci_args: '--include=dev'
49+
50+
# checkout the base and head refs
51+
# ensures we have history for both
52+
- name: Checkout base ref
53+
run: git fetch origin ${{ github.base_ref }} && git checkout ${{ github.base_ref }}
54+
55+
- name: Checkout head ref
56+
run: git fetch origin ${{ github.head_ref }} && git checkout ${{ github.head_ref }}
57+
58+
# if this fails, you need to run `npm run changesets:add` (preferred!) or `npm run changesets:empty` for an empty changeset (avoid if possible)
59+
- name: check changesets
60+
run: |
61+
62+
# check that the changesets are present for each package which has been modified
63+
npm run changesets -- --since ${{ github.base_ref }}

0 commit comments

Comments
 (0)