Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cleanup-test-workers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Run cleanup script
env:
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,19 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Enable Corepack
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 22
cache: "pnpm"

- run: |
corepack enable
pnpm install
- name: Install dependencies
run: pnpm install

- name: Build SDK
run: pnpm build
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/playground-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,20 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Enable Corepack
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 22
cache: "pnpm"

- name: Install dependencies
shell: bash
run: |
corepack enable
pnpm install
run: pnpm install

- name: Build SDK
shell: bash
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Enable Corepack
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 22
cache: "pnpm"

- name: Get tag or input version
id: vars
Expand All @@ -36,7 +40,6 @@ jobs:

- name: Update starter package.json
run: |
corepack enable
version_without_v="${{ steps.vars.outputs.version }}"
(cd starter && npm pkg set dependencies.rwsdk=${version_without_v#v})
pnpm install --ignore-scripts --no-frozen-lockfile
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
# We need to fetch all history for semver to work correctly and to push changes.
fetch-depth: 0
Expand All @@ -51,15 +51,17 @@ jobs:
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Enable Corepack
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 22
cache: "pnpm"

- name: Install dependencies
run: |
corepack enable
pnpm install
run: pnpm install

- name: Setup .npmrc for publishing
working-directory: sdk
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,20 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Enable Corepack
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 22
cache: "pnpm"

- name: Install dependencies
shell: bash
run: |
corepack enable
pnpm install
run: pnpm install

- name: Run Smoke Tests
id: smoke-test
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
# This token should have write permissions to the repository.
token: ${{ secrets.GH_TOKEN_FOR_RELEASES }}

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 22

Expand Down
68 changes: 68 additions & 0 deletions .notes/justin/worklogs/2025-10-06-renovate-docs-and-infra-deps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# 2025-10-06: Renovate Docs and Infra Deps

## Problem

The Renovate PR for `docs-and-infra-deps` introduced several dependency updates. These updates caused two separate failures in the CI/CD pipeline: one in the GitHub Actions workflows and another in the Cloudflare Pages deployment for the documentation site.

## GitHub Actions Workflow Failures

### Observation

The `Code Quality`, `Smoke Tests`, and other workflows began failing with the error `Error: Unable to locate executable file: pnpm`. This coincided with the upgrade of the `actions/setup-node` action from `v4` to `v5`.

### Diagnosis and Fix

Version 5 of `actions/setup-node` automatically detects the project's package manager from the root `package.json` (`pnpm` in this case) and attempts to configure it. However, our workflows were set up to enable `corepack` (which makes `pnpm` available) *after* the `setup-node` step. The action was therefore running before `pnpm` was in the environment's `PATH`.

The solution was to modify the workflows to ensure `corepack` is enabled *before* `setup-node` runs.

**Changes Implemented:**

1. Added a dedicated "Enable Corepack" step (`run: corepack enable`) before the "Setup Node.js" step.
2. Added `cache: 'pnpm'` to the `setup-node` step to speed up dependency installation.
3. Removed the redundant `corepack enable` from the subsequent `pnpm install` step.

This fix was applied to all relevant workflow files and resolved the GitHub Actions failures.

## Cloudflare Docs Deployment Failure

### Observation

After fixing the GitHub Actions workflows, the Cloudflare Pages deployment for the docs site started failing with a new error during the `astro build` step: `Dynamic require of "path" is not supported`.

The stack trace pointed to `@fujocoded/expressive-code-output`, which had been updated by Renovate from `0.0.1` to `0.1.0`.

### Attempt 1: Dynamic Import

**Hypothesis:** The error suggested a CommonJS vs. ES Module compatibility issue. It seemed possible that the new version of the package was a CJS module being improperly imported into our ESM-based Astro configuration (`ec.config.mjs`).

**Action:** I modified `docs/ec.config.mjs` to use a dynamic `await import(...)` for `@fujocoded/expressive-code-output`, as Astro's configuration files support top-level await.

**Result:** The local development server failed with the exact same error. This proved the issue was not with how the module was being imported.

### Attempt 2: Deeper Investigation

**Hypothesis:** The problem must be internal to the package itself.

**Action:** Using the full file path from the local error log, I inspected the contents of the problematic file: `.../node_modules/.pnpm/@[email protected]/node_modules/@fujocoded/expressive-code-output/dist/index.js`.

**Finding:** The bundled JavaScript file contains a compatibility shim for `require`. The error is thrown by this shim because a `require('path')` call was not correctly processed and replaced by the package's build tool. This is a build issue within the dependency itself and cannot be fixed by configuration changes in our project.

### Conclusion

The investigation confirmed a bug within the `@fujocoded/[email protected]` package. After discussing the findings, I have reverted the attempts to fix it, and will now investigate a proper solution myself.

### Update: Pinpointing the Bug

After further investigation, the precise issue was identified. The `package.json` for `@fujocoded/expressive-code-output` has its `exports` map conditions swapped.

- The `import` condition points to `./dist/index.js`, which incorrectly contains CommonJS `require()` calls.
- The `require` condition points to `./dist/index.cjs`, which is the correct CommonJS bundle.

This is a packaging bug in the dependency. When our ESM-based Astro build tries to import the package, it's served the wrong file, causing the build to fail.

### Final Resolution

After reviewing the dependency's repository and observing an unstable versioning history (`1.0.0` then `0.1.0`), the decision was made to revert to the last known stable version to ensure stability and avoid further issues. The `pnpm patch` solution was considered but ultimately rejected in favor of using a stable version.

The `@fujocoded/expressive-code-output` package has been downgraded to `0.0.1`.
4 changes: 2 additions & 2 deletions addons/passkey/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"private": true,
"version": "0.0.0",
"dependencies": {
"@simplewebauthn/browser": "13.2.0",
"@simplewebauthn/server": "13.2.0",
"@simplewebauthn/browser": "13.2.2",
"@simplewebauthn/server": "13.2.2",
"rwsdk": "workspace:*"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion docs/.node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.14.0
22.20.0
26 changes: 16 additions & 10 deletions docs/ec.config.mjs
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
import { pluginCollapsibleSections } from '@expressive-code/plugin-collapsible-sections'
import { pluginLineNumbers } from '@expressive-code/plugin-line-numbers'
import { pluginCollapsibleSections } from "@expressive-code/plugin-collapsible-sections";
import { pluginLineNumbers } from "@expressive-code/plugin-line-numbers";
import { pluginCodeCaption } from "@fujocoded/expressive-code-caption";
import { pluginCodeOutput } from "@fujocoded/expressive-code-output";
import { pluginColorChips } from 'expressive-code-color-chips';
import { pluginColorChips } from "expressive-code-color-chips";

/** @type {import('@astrojs/starlight/expressive-code').StarlightExpressiveCodeOptions} */
export default{
plugins: [pluginCodeCaption(), pluginCollapsibleSections(), pluginLineNumbers(), pluginCodeOutput(), pluginColorChips()],
export default {
plugins: [
pluginCodeCaption(),
pluginCollapsibleSections(),
pluginLineNumbers(),
pluginCodeOutput(),
pluginColorChips(),
],
defaultProps: {
// disable line numbers by default
showLineNumbers: false,
// But enable line numbers for certain languages
overridesByLang: {
'js,ts,css,tsx,jsx': {
"js,ts,css,tsx,jsx": {
showLineNumbers: true,
}
}
}
}
},
},
},
};
8 changes: 4 additions & 4 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "^4.3.5",
"@astrojs/partytown": "^2.1.4",
"@astrojs/starlight": "^0.35.2",
"@astrojs/starlight": "^0.36.0",
"@expressive-code/plugin-collapsible-sections": "^0.41.3",
"@expressive-code/plugin-line-numbers": "^0.41.3",
"@fujocoded/expressive-code-caption": "^0.0.3",
Expand All @@ -22,8 +22,8 @@
"astro-embed": "^0.9.0",
"expressive-code-color-chips": "^0.1.2",
"lite-youtube-embed": "^0.3.3",
"sharp": "^0.32.6",
"starlight-llms-txt": "^0.5.1",
"sharp": "^0.34.0",
"starlight-llms-txt": "^0.6.0",
"starlight-package-managers": "^0.11.0"
}
}
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
"node": ">=18.0.0",
"pnpm": ">=8.0.0"
},
"packageManager": "pnpm@10.0.0",
"packageManager": "pnpm@10.18.0",
"devDependencies": {
"@antfu/eslint-config": "^2.21.1",
"@manypkg/cli": "^0.21.4",
"@types/node": "^20.14.2",
"@antfu/eslint-config": "^5.0.0",
"@manypkg/cli": "^0.25.0",
"@types/node": "^22.0.0",
"eslint": "^9.5.0",
"knip": "~5.26.0",
"knip": "~5.64.0",
"pnpm": "^10.0.0",
"prettier": "^3.3.2",
"prettier-plugin-organize-imports": "^4.3.0",
Expand Down
4 changes: 2 additions & 2 deletions playground/baseui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"devDependencies": {
"@cloudflare/vite-plugin": "1.13.3",
"@cloudflare/workers-types": "4.20250921.0",
"@types/node": "22.14.0",
"@types/node": "22.18.8",
"@types/react": "19.1.2",
"@types/react-dom": "19.1.2",
"typescript": "5.8.3",
"typescript": "5.9.3",
"vite": "7.1.6",
"wrangler": "4.38.0"
},
Expand Down
4 changes: 2 additions & 2 deletions playground/chakra-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"devDependencies": {
"@cloudflare/vite-plugin": "1.13.3",
"@cloudflare/workers-types": "4.20250921.0",
"@types/node": "22.14.0",
"@types/node": "22.18.8",
"@types/react": "19.1.2",
"@types/react-dom": "19.1.2",
"typescript": "5.8.3",
"typescript": "5.9.3",
"vite": "7.1.6",
"vitest": "^3.1.1",
"wrangler": "4.38.0"
Expand Down
4 changes: 2 additions & 2 deletions playground/client-navigation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"devDependencies": {
"@cloudflare/vite-plugin": "1.13.3",
"@cloudflare/workers-types": "4.20250921.0",
"@types/node": "22.14.0",
"@types/node": "22.18.8",
"@types/react": "19.1.2",
"@types/react-dom": "19.1.2",
"typescript": "5.8.3",
"typescript": "5.9.3",
"vite": "7.1.6",
"vitest": "^3.1.1",
"wrangler": "4.38.0"
Expand Down
6 changes: 3 additions & 3 deletions playground/database-do/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
},
"dependencies": {
"rwsdk": "workspace:*",
"kysely": "^0.27.4",
"kysely": "^0.28.0",
"react": "19.2.0-canary-d415fd3e-20250919",
"react-dom": "19.2.0-canary-d415fd3e-20250919",
"react-server-dom-webpack": "19.2.0-canary-d415fd3e-20250919"
},
"devDependencies": {
"@cloudflare/vite-plugin": "1.13.3",
"@cloudflare/workers-types": "4.20250921.0",
"@types/node": "22.14.0",
"@types/node": "22.18.8",
"@types/react": "19.1.2",
"@types/react-dom": "19.1.2",
"typescript": "5.8.3",
"typescript": "5.9.3",
"vite": "7.1.6",
"vitest": "^3.1.1",
"wrangler": "4.38.0"
Expand Down
4 changes: 2 additions & 2 deletions playground/hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"devDependencies": {
"@cloudflare/vite-plugin": "1.13.3",
"@cloudflare/workers-types": "4.20250921.0",
"@types/node": "22.14.0",
"@types/node": "22.18.8",
"@types/react": "19.1.2",
"@types/react-dom": "19.1.2",
"typescript": "5.8.3",
"typescript": "5.9.3",
"vite": "7.1.6",
"vitest": "^3.1.1",
"wrangler": "4.38.0"
Expand Down
Loading
Loading