Skip to content

Commit 338e054

Browse files
authored
feat: Add support for all text blocks (using @deepnote/blocks). (#22)
1 parent b495c47 commit 338e054

20 files changed

+10182
-120
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ env:
1111
NODE_VERSION: 22.x
1212

1313
permissions:
14-
contents: read
1514
actions: read
15+
contents: read
16+
packages: read
1617

1718
concurrency:
1819
group: ${{ github.workflow }}-${{ github.ref }}
@@ -30,11 +31,15 @@ jobs:
3031
- name: Setup Node.js
3132
uses: actions/setup-node@v5
3233
with:
33-
node-version: ${{ env.NODE_VERSION }}
3434
cache: 'npm'
35+
node-version: ${{ env.NODE_VERSION }}
36+
registry-url: 'https://npm.pkg.github.com'
37+
scope: '@deepnote'
3538

3639
- name: Install dependencies
3740
run: npm ci --prefer-offline --no-audit
41+
env:
42+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3843

3944
- name: Run ESLint
4045
run: npm run lint
@@ -53,11 +58,15 @@ jobs:
5358
- name: Setup Node.js
5459
uses: actions/setup-node@v5
5560
with:
56-
node-version: ${{ env.NODE_VERSION }}
5761
cache: 'npm'
62+
node-version: ${{ env.NODE_VERSION }}
63+
registry-url: 'https://npm.pkg.github.com'
64+
scope: '@deepnote'
5865

5966
- name: Install dependencies
6067
run: npm ci --prefer-offline --no-audit
68+
env:
69+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6170

6271
- name: Compile TypeScript
6372
run: npm run compile
@@ -71,6 +80,7 @@ jobs:
7180

7281
- name: Check licenses
7382
run: npm run check-licenses
83+
7484
check_licenses:
7585
name: Check Licenses
7686
runs-on: ubuntu-latest
@@ -81,11 +91,15 @@ jobs:
8191
- name: Setup Node.js
8292
uses: actions/setup-node@v5
8393
with:
84-
node-version: ${{ env.NODE_VERSION }}
8594
cache: 'npm'
95+
node-version: ${{ env.NODE_VERSION }}
96+
registry-url: 'https://npm.pkg.github.com'
97+
scope: '@deepnote'
8698

8799
- name: Install dependencies
88100
run: npm ci
101+
env:
102+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89103

90104
- name: Check Licenses
91105
run: npm run check-licenses

.github/workflows/copilot-setup-steps.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
permissions:
3232
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
3333
contents: read
34+
packages: read
3435

3536
# You can define any steps you want, and they will run before the agent starts.
3637
# If you do not check out your code, Copilot will do this for you.
@@ -42,6 +43,8 @@ jobs:
4243
uses: actions/setup-node@v5
4344
with:
4445
node-version: ${{env.NODE_VERSION}}
46+
registry-url: 'https://npm.pkg.github.com'
47+
scope: '@deepnote'
4548

4649
- name: Cache npm files
4750
uses: actions/cache@v4
@@ -59,6 +62,8 @@ jobs:
5962
# Let that happen in other jobs, this job needs to be fast
6063
- name: npm ci
6164
run: npm ci --ignore-scripts --prefer-offline --no-audit
65+
env:
66+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6267

6368
- name: npm run postinstall
6469
run: npm run postinstall

.github/workflows/deps.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ env:
1010
NODE_VERSION: 22.x
1111

1212
permissions:
13-
contents: read
1413
actions: read
14+
contents: read
15+
packages: read
1516

1617
concurrency:
1718
group: ${{ github.workflow }}-${{ github.ref }}
@@ -28,11 +29,15 @@ jobs:
2829
- name: Setup Node.js
2930
uses: actions/setup-node@v5
3031
with:
31-
node-version: ${{ env.NODE_VERSION }}
3232
cache: 'npm'
33+
node-version: ${{ env.NODE_VERSION }}
34+
registry-url: 'https://npm.pkg.github.com'
35+
scope: '@deepnote'
3336

3437
- name: Install dependencies
3538
run: npm ci --prefer-offline --no-audit
39+
env:
40+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3641

3742
- name: Run security audit
3843
run: npm audit --json > audit-report.json || true

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@deepnote:registry=https://npm.pkg.github.com

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,34 @@ cd vscode-jupyter
3232

3333
```
3434

35+
#### Install Recommended Extensions
36+
37+
First, install all the recommended VS Code extensions. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P) and run:
38+
39+
```text
40+
Extensions: Show Recommended Extensions
41+
```
42+
43+
Then install all the extensions listed under "Workspace Recommendations".
44+
45+
#### Configure Access to @deepnote/blocks Package
46+
47+
The `@deepnote/blocks` package is published on GitHub Packages. To install it, you'll need to authenticate with GitHub:
48+
49+
1. Create a GitHub Personal Access Token (classic) with `read:packages` scope:
50+
- Go to https://github.com/settings/tokens
51+
- Click "Generate new token (classic)"
52+
- Select the `read:packages` scope
53+
- Generate and copy the token
54+
55+
2. Add the token to your global `.npmrc` file:
56+
```shell
57+
echo "//npm.pkg.github.com/:_authToken=YOUR_TOKEN_HERE" >> ~/.npmrc
58+
```
59+
Replace `YOUR_TOKEN_HERE` with your actual token.
60+
61+
After completing these steps, you can install dependencies normally with `npm ci`. The project's `.npmrc` file is already configured to use GitHub Packages for the `@deepnote` scope.
62+
3563
On Apple Silicon, you will have to use system versions of `libsodium` and `libzmq` instead of the bundled ones:
3664

3765
```shell

package-lock.json

Lines changed: 69 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2099,6 +2099,7 @@
20992099
},
21002100
"dependencies": {
21012101
"@c4312/evt": "^0.1.1",
2102+
"@deepnote/blocks": "^1.1.0",
21022103
"@enonic/fnv-plus": "^1.3.0",
21032104
"@jupyter-widgets/base": "^6.0.8",
21042105
"@jupyter-widgets/controls": "^5.0.9",

0 commit comments

Comments
 (0)