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
17 changes: 0 additions & 17 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ permissions:
jobs:
lint:
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -40,9 +37,6 @@ jobs:
with:
node-version-file: .tool-versions
cache: "yarn"
registry-url: "https://npm.pkg.github.com"
# Defaults to the user or organization that owns the workflow file
scope: "@RaspberryPiFoundation"

- name: Install code
run: yarn install --immutable
Expand All @@ -56,9 +50,6 @@ jobs:

test:
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v1
Expand All @@ -68,9 +59,6 @@ jobs:
with:
node-version-file: .tool-versions
cache: "yarn"
registry-url: "https://npm.pkg.github.com"
# Defaults to the user or organization that owns the workflow file
scope: "@RaspberryPiFoundation"

- name: Install code
run: yarn install --immutable
Expand All @@ -86,8 +74,6 @@ jobs:
test-cypress:
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REACT_APP_API_ENDPOINT: "https://test-editor-api.raspberrypi.org"
PUBLIC_URL: "http://localhost:3011"
ASSETS_URL: "http://localhost:3011"
Expand All @@ -103,9 +89,6 @@ jobs:
with:
node-version-file: .tool-versions
cache: "yarn"
registry-url: "https://npm.pkg.github.com"
# Defaults to the user or organization that owns the workflow file
scope: "@RaspberryPiFoundation"

- name: Install code
run: yarn install --immutable
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ jobs:
url: ${{ needs.setup-environment.outputs.public_url }}
env:
HAS_CLOUDFLARE_SECRETS: ${{ secrets.CLOUDFLARE_ZONE_ID != '' && secrets.CLOUDFLARE_API_TOKEN != '' }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check deployment path
run: |
Expand All @@ -132,9 +130,6 @@ jobs:
with:
node-version-file: .tool-versions
cache: "yarn"
registry-url: "https://npm.pkg.github.com"
# Defaults to the user or organization that owns the workflow file
scope: "@RaspberryPiFoundation"

- name: Install code
run: yarn install --immutable
Expand Down
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

6 changes: 0 additions & 6 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,9 @@ nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.12.0.cjs

npmScopes:
RaspberryPiFoundation:
npmRegistryServer: "https://npm.pkg.github.com"
npmAuthToken: "${NPM_AUTH_TOKEN:-}"

npmMinimalAgeGate: 7d

npmPreapprovedPackages:
- "@raspberrypifoundation/design-system-react"
- "@raspberrypifoundation/design-system-core"
- "@RaspberryPiFoundation/scratch-gui"
- "@raspberrypifoundation/python-friendly-error-messages"
42 changes: 2 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,8 @@ This project provides a web component containing the Raspberry Pi Code Editor fo

This repository uses Yarn (see `package.json` → `packageManager`).

The scratch-frame project depends on `@RaspberryPiFoundation/scratch-gui` which is installed from [GitHub Packages](https://github.com/RaspberryPiFoundation/scratch-editor/pkgs/npm/scratch-gui). Complete the steps below, then run `yarn install`.

Or skip installing scratch-frame dependencies run: `yarn workspaces focus @raspberrypifoundation/editor-ui`

### Set a personal access token

If you don't already have this set up you will need it to access deps in the RPF private registry

1. On GitHub, create a **classic** personal access token: [Settings → Developer settings → Personal access tokens](https://github.com/settings/tokens). Enable **`read:packages`** and **`repo`**. For packages tied to private repositories, `read:packages` alone can cause `yarn install` to fail with `401`/`403`.
2. If your organisation uses SAML SSO, open the token on GitHub and **Authorize** it for **RaspberryPiFoundation** (Configure SSO).
3. Add the token to your shell profile (for example `~/.zshrc` on macOS):

```bash
export GITHUB_TOKEN=ghp_your_token_here
export NPM_AUTH_TOKEN=$GITHUB_TOKEN
```

Replace `ghp_your_token_here` with your token.

4. Load the profile in any terminal you are currently using for this project:

```bash
source ~/.zshrc
```

5. Confirm GitHub Packages is reachable from this directory:

```bash
yarn npm info @RaspberryPiFoundation/scratch-gui version
```

You should see the version pinned in `package.json` (for example `13.7.3-code-classroom.20260522151700`), not an authentication error. If you see `unauthenticated` or `401`, run `source ~/.zshrc` again or check the token scopes and SSO authorisation.

6. When you use Docker, run `docker compose up` from a shell where `NPM_AUTH_TOKEN` is set. Compose passes it from the host into the container so `yarn install` can run there too.

Then install dependencies:
All dependencies come from the public npm registry, so no authentication is
needed. Install with:
Comment thread
jamiebenstead marked this conversation as resolved.

```
yarn install
Expand Down Expand Up @@ -319,10 +285,6 @@ Python code snippets are styled and syntax-highlighted using the `language-pytho
<code class="language-python">print('hello world')</code>
```

### Linking a local scratch-editor (Scratch GUI)

See [docs/linking-scratch-editor.md](./docs/linking-scratch-editor.md) for local scratch-editor linking instructions.

## Deployment

Deployment is managed through Github actions. The UI is deployed to staging and production environments through an S3 bucket, managed via Cloudflare. This requires the following environment variables to be set
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
x-app: &x-app
build:
context: .
environment:
NPM_AUTH_TOKEN: ${NPM_AUTH_TOKEN}
volumes:
- .:/app
- node_modules:/app/node_modules
Expand Down
101 changes: 0 additions & 101 deletions docs/linking-scratch-editor.md

This file was deleted.

12 changes: 0 additions & 12 deletions src/components/Menus/Sidebar/InfoPanel/InfoPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ const InfoPanel = ({ feedbackFormUrl = CODE_EDITOR_FEEDBACK_URL }) => {
<section className="info-panel__licences-modal__section">
<h2>Scratch Editor</h2>
<p>Copyright (C) Scratch Foundation</p>
<p>Modified 2026 by the Raspberry Pi Foundation</p>
<p>
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License
Expand Down Expand Up @@ -146,17 +145,6 @@ const InfoPanel = ({ feedbackFormUrl = CODE_EDITOR_FEEDBACK_URL }) => {
</a>
.
</p>
<p>
See modified source code and full licence at{" "}
<a
href="https://github.com/RaspberryPiFoundation/scratch-editor/tree/code-classroom"
target="_blank"
rel="noreferrer"
>
https://github.com/RaspberryPiFoundation/scratch-editor/tree/code-classroom
</a>
.
</p>
</section>
<section className="licences-modal__section">
<h2>Scratch Frame</h2>
Expand Down
Loading