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
11 changes: 8 additions & 3 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24.x'
cache: npm
- run: npm install -g npm@11 --registry=https://registry.npmjs.org
- name: Setup Pages
uses: actions/configure-pages@v5
- run: npm ci
- name: Build docs
run: npm run docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v5
with:
path: ./docs/build

Expand All @@ -36,4 +41,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '20.x'
node-version: '24.x'
registry-url: 'https://registry.npmjs.org'
cache: npm
- uses: microbit-foundation/npm-package-versioner-action@v1
- run: npm install -g npm@11 --registry=https://registry.npmjs.org
- uses: microbit-foundation/npm-package-versioner-action@v3
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm run ci
- run: npm publish
- run: npm publish --allow-directory=all
if: github.event_name == 'release' && github.event.action == 'created'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.18.0
14 changes: 14 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
access=public

min-release-age=7
min-release-age-exclude[]=@microbit/*
min-release-age-exclude[]=@microbit-foundation/*

# root here means this project's package.json
allow-git=root
allow-remote=root
allow-file=root
allow-directory=root

strict-allow-scripts=true

engine-strict=true
1 change: 1 addition & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { StorybookConfig } from '@storybook/react-vite';

const config: StorybookConfig = {
stories: ['../src/**/*.stories.tsx'],
staticDirs: ['../public'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
Expand Down
4 changes: 0 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
"type": "git",
"url": "https://github.com/microbit-foundation/python-editor-embed"
},
"engines": {
"node": ">=20",
"npm": ">=10"
"allowScripts": {
"fsevents": true,
"esbuild": true
},
"packageManager": "npm@11.18.0",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"typings": "./dist/esm/index.d.ts",
Expand Down
11 changes: 11 additions & 0 deletions public/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Never serve a stale HTML entry point: it references content-hashed assets
# that are purged on redeploy, which otherwise 404 -> SPA fallback -> a
# text/html response the browser rejects as a module script.
/index.html
Cache-Control: no-cache
/iframe.html
Cache-Control: no-cache

# Content-hashed assets are immutable and safe to cache forever.
/assets/*
Cache-Control: public, max-age=31536000, immutable
Loading