Skip to content
Open
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
8 changes: 8 additions & 0 deletions .changeset/pnpm-preact-resolution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@doc-kit/generator-react': patch
---

Resolve the React→Preact aliases to absolute paths and anchor package imports
in generated virtual modules to the generator's own dependencies, so builds
work under isolated installs (pnpm) that don't hoist Preact and the UI
component packages to the project root.
92 changes: 14 additions & 78 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Harden Runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
- name: Setup environment
uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f
with:
egress-policy: block
allowed-endpoints: >
github.com:443
registry.npmjs.org:443

- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install dependencies
run: npm ci
use-version-file: true
pnpm: true

- name: Run linting
run: node --run lint
Expand All @@ -51,33 +35,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Harden Runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
- name: Setup environment
uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f
with:
egress-policy: block
allowed-endpoints: >
cli.codecov.io:443
github.com:443
ingest.codecov.io:443
keybase.io:443
o26192.ingest.us.sentry.io:443
raw.githubusercontent.com:443
registry.npmjs.org:443
storage.googleapis.com:443

- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install dependencies
run: npm ci
use-version-file: true
pnpm: true

- name: Run tests with coverage
run: node --run test:ci
Expand All @@ -100,37 +62,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Harden Runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: block
allowed-endpoints: >
*.archive.ubuntu.com:80
*.microsoft.com:443
api.github.com:443
cdn.playwright.dev:443
dl.google.com:443
esm.ubuntu.com:443
fonts.googleapis.com:443
fonts.gstatic.com:443
github.com:443
raw.githubusercontent.com:443
registry.npmjs.org:443
storage.googleapis.com:443

- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup environment
uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install dependencies
run: npm ci
use-version-file: true
pnpm: true

- name: Checkout Node.js source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -141,10 +77,10 @@ jobs:
path: node

- name: Build Node.js API docs
run: npx @doc-kit/cli generate -t web -i "./node/doc/api/assert.md" -o out --config-file ./e2e/doc-kit.config.mjs
run: node packages/cli/bin/cli.mjs generate -t web -i "./node/doc/api/assert.md" -o out --config-file ./e2e/doc-kit.config.mjs

- name: Install Playwright browsers
run: npx playwright install --with-deps
run: pnpm exec playwright install --with-deps

- name: Run E2E tests
run: node --run test:e2e
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
with:
ignore_words_list: crate,raison
exclude_file: .gitignore
skip: package-lock.json, ./packages/core/src/generators/mandoc/template.1
skip: pnpm-lock.yaml, ./packages/core/src/generators/mandoc/template.1
21 changes: 4 additions & 17 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,11 @@ jobs:
name: Build docs site
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
- name: Setup environment
uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f
with:
egress-policy: audit

- name: Git Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install dependencies
run: npm ci
use-version-file: true
pnpm: true

- name: Build site
run: node --run docs:build
Expand Down
21 changes: 4 additions & 17 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,11 @@ jobs:
input: './node/doc/api/*.md'
compare: file-size
steps:
- name: Harden Runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
- name: Setup environment
uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f
with:
egress-policy: audit

- name: Git Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
use-version-file: true
pnpm: true

- name: Git Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -132,15 +128,6 @@ jobs:
.
path: node

- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Create output directory
run: mkdir -p out/${{ matrix.target }}

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f
with:
use-version-file: true
pnpm: true
registry-url: 'https://registry.npmjs.org'
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
npm-shrinkwrap.json
pnpm-lock.yaml

# Tests files
packages/node/src/api-links/__tests__/fixtures/
Expand Down
Loading
Loading