Skip to content

Commit e96f63c

Browse files
Merge branch 'master' into feat/assign-multi-channels
Resolve i18n catalog conflicts by re-extracting translations after merging master. Co-authored-by: Cursor <cursoragent@cursor.com>
2 parents 522274f + ba5d189 commit e96f63c

482 files changed

Lines changed: 36506 additions & 7726 deletions

File tree

Some content is hidden

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

.github/workflows/docs_ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- '!docs/manifest.json'
1212
- 'lerna.json'
1313
pull_request:
14+
types: [opened, synchronize, reopened, ready_for_review]
1415
branches:
1516
- master
1617
- minor
@@ -27,6 +28,8 @@ concurrency:
2728
jobs:
2829
validate:
2930
name: Validate MDX
31+
# Skip draft PRs
32+
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
3033
permissions:
3134
contents: read
3235
runs-on: ubuntu-latest
@@ -48,8 +51,8 @@ jobs:
4851

4952
generate-manifest:
5053
name: Generate & commit manifest
51-
# Skip fork PRs can't push back to fork branches
52-
if: ${{ github.event_name == 'push' || !github.event.pull_request.head.repo.fork }}
54+
# Skip fork PRs (can't push back to fork branches) and draft PRs
55+
if: ${{ github.event_name == 'push' || (!github.event.pull_request.head.repo.fork && !github.event.pull_request.draft) }}
5356
runs-on: ubuntu-latest
5457
permissions:
5558
contents: write

.github/workflows/generate_docs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Generate Docs
22

33
on:
44
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56
branches:
67
- master
78
- minor
@@ -17,8 +18,8 @@ concurrency:
1718
jobs:
1819
generate:
1920
name: Generate & commit docs
20-
# Skip fork PRs can't push back to fork branches
21-
if: ${{ !github.event.pull_request.head.repo.fork }}
21+
# Skip fork PRs (can't push back to fork branches) and draft PRs
22+
if: ${{ !github.event.pull_request.head.repo.fork && !github.event.pull_request.draft }}
2223
runs-on: ubuntu-latest
2324
permissions:
2425
contents: write

.github/workflows/publish_and_install.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,3 +209,91 @@ jobs:
209209
name: dashboard-test-screenshots-${{ matrix.os }}-${{ matrix.node-version }}
210210
path: /tmp/dashboard-test-*.png
211211
retention-days: 28
212+
213+
# Job 3: Verify `@vendure/create` works end-to-end when invoked via bun and pnpm.
214+
# The package manager is detected from npm_config_user_agent (which bunx / pnpm dlx
215+
# set), so the install step and generated project must use that manager rather than
216+
# hard-coding npm (#4390).
217+
test_package_managers:
218+
needs: build_and_publish
219+
runs-on: ubuntu-latest
220+
permissions:
221+
contents: read
222+
strategy:
223+
matrix:
224+
include:
225+
- pm: bun
226+
scaffold: bunx @vendure/create@ci test-app --ci --log-level info
227+
- pm: pnpm
228+
scaffold: pnpm dlx @vendure/create@ci test-app --ci --log-level info
229+
fail-fast: false
230+
steps:
231+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
232+
- name: Use Node.js 22.x
233+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
234+
with:
235+
node-version: 22.x
236+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
237+
with:
238+
bun-version: '1.3.10'
239+
- name: Enable pnpm via corepack
240+
run: |
241+
corepack enable
242+
corepack prepare pnpm@9.15.9 --activate
243+
pnpm --version
244+
- name: Download Verdaccio storage
245+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
246+
with:
247+
name: verdaccio-storage
248+
path: ~/verdaccio-download
249+
- name: Setup Verdaccio with pre-built packages
250+
run: |
251+
npm install -g verdaccio
252+
npm install -g wait-on
253+
mkdir -p $HOME/.config/verdaccio
254+
cp -v ./.github/workflows/verdaccio/config.yaml $HOME/.config/verdaccio/config.yaml
255+
cd $HOME/.config/verdaccio
256+
tar -xzf ~/verdaccio-download/verdaccio-storage.tar.gz
257+
nohup verdaccio --config $HOME/.config/verdaccio/config.yaml &
258+
wait-on http://localhost:4873
259+
# Register a Verdaccio user and capture an auth token.
260+
TOKEN_RES=$(curl -XPUT \
261+
-H "Content-type: application/json" \
262+
-d '{ "name": "test", "password": "test" }' \
263+
'http://localhost:4873/-/user/org.couchdb.user:test')
264+
TOKEN=$(echo "$TOKEN_RES" | jq -r '.token')
265+
# npm + pnpm read ~/.npmrc; bun is pointed at Verdaccio via the
266+
# npm_config_registry env var on the install step (see below).
267+
npm set registry=http://localhost:4873
268+
npm set //localhost:4873/:_authToken $TOKEN
269+
- name: Install via @vendure/create using ${{ matrix.pm }}
270+
# bun ignores the home-directory ~/.npmrc (oven-sh/bun#22971) and does not walk
271+
# up to a parent .npmrc/bunfig, but it DOES honour the npm_config_registry env
272+
# var — and so does the scaffolded project's nested install (it inherits the
273+
# env). This is the one mechanism that reaches both bunx and the nested install.
274+
env:
275+
CI: true
276+
npm_config_registry: http://localhost:4873/
277+
run: |
278+
mkdir -p $HOME/install
279+
cd $HOME/install
280+
npm dist-tag ls @vendure/create
281+
# No --use-npm: the manager is detected from the invoking bunx / pnpm dlx.
282+
${{ matrix.scaffold }}
283+
- name: Assert the generated project used ${{ matrix.pm }}
284+
run: |
285+
cd $HOME/install/test-app
286+
case "${{ matrix.pm }}" in
287+
bun) test -f bun.lock || { echo "Expected bun.lock to exist"; ls -la; exit 1; } ;;
288+
pnpm) test -f pnpm-lock.yaml || { echo "Expected pnpm-lock.yaml to exist"; ls -la; exit 1; } ;;
289+
esac
290+
echo "Lockfile for ${{ matrix.pm }} present ✓"
291+
- name: Server smoke tests
292+
run: |
293+
cd $HOME/install/test-app
294+
${{ matrix.pm }} run dev &
295+
node $GITHUB_WORKSPACE/.github/workflows/scripts/smoke-tests
296+
- name: Kill dev server after smoke tests
297+
if: always()
298+
run: |
299+
lsof -ti:3000,5173 | xargs kill 2>/dev/null || true

.github/workflows/publish_to_npm.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ jobs:
6666
id-token: write
6767
strategy:
6868
fail-fast: false
69+
# Both nightly jobs publish new versions of the same packages. npm rejects
70+
# a publish with E409 while it is still processing a previous publish of
71+
# the same package, so the jobs must not run concurrently.
72+
max-parallel: 1
6973
matrix:
7074
type: ${{ fromJson(needs.setup.outputs.matrix) }}
7175

@@ -168,15 +172,19 @@ jobs:
168172
run: |
169173
bunx lerna exec --no-private -- 'publish_dir=$(node -p "require(\"./package.json\").publishConfig?.directory || \".\"") && cd "$publish_dir" && npm stage publish --access public'
170174
175+
# --no-bail: a failure in one package must not skip publishing the rest —
176+
# downstream consumers expect ALL packages to exist at a given nightly
177+
# version. The retry loop handles transient registry errors (e.g. E409
178+
# while npm is still processing an earlier publish of the same package).
171179
- name: Publish to NPM (master-nightly)
172180
if: matrix.type == 'master-nightly' && steps.commit_check.outputs.should_publish == 'true'
173181
run: |
174-
bunx lerna exec --no-private -- 'publish_dir=$(node -p "require(\"./package.json\").publishConfig?.directory || \".\"") && cd "$publish_dir" && npm publish --access public --tag master'
182+
bunx lerna exec --no-private --no-bail -- 'publish_dir=$(node -p "require(\"./package.json\").publishConfig?.directory || \".\"") && cd "$publish_dir" && for i in 1 2 3; do npm publish --access public --tag master && break; if [ "$i" = 3 ]; then exit 1; fi; echo "npm publish failed, retrying in 30s..."; sleep 30; done'
175183
176184
- name: Publish to NPM (minor-nightly)
177185
if: matrix.type == 'minor-nightly' && steps.commit_check.outputs.should_publish == 'true'
178186
run: |
179-
bunx lerna exec --no-private -- 'publish_dir=$(node -p "require(\"./package.json\").publishConfig?.directory || \".\"") && cd "$publish_dir" && npm publish --access public --tag minor'
187+
bunx lerna exec --no-private --no-bail -- 'publish_dir=$(node -p "require(\"./package.json\").publishConfig?.directory || \".\"") && cd "$publish_dir" && for i in 1 2 3; do npm publish --access public --tag minor && break; if [ "$i" = 3 ]; then exit 1; fi; echo "npm publish failed, retrying in 30s..."; sleep 30; done'
180188
181189
- name: Skip publish (no new commits)
182190
if: matrix.type != 'release' && steps.commit_check.outputs.should_publish == 'false'

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,3 +393,7 @@ __admin-ui/
393393

394394
# Vendure telemetry installation ID
395395
.vendure/
396+
397+
# Bun is the canonical package manager; package-lock.json is only generated
398+
# locally (e.g. for the dependency-tracker script) and must not be committed.
399+
package-lock.json

0 commit comments

Comments
 (0)