Skip to content

Commit 239a447

Browse files
authored
Update to JupyterLite 0.7.0 (#18)
1 parent 18a43c5 commit 239a447

File tree

20 files changed

+5382
-1171
lines changed

20 files changed

+5382
-1171
lines changed

.eslintignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
lint-staged.config.js
2+
.eslintrc.js
3+
scripts/serve.js
4+
5+
.yarn-packages
6+
node_modules
7+
**/build
8+
**/lib
9+
**/node_modules
10+
**/mock_packages
11+
**/static
12+
**/typings
13+
**/schemas
14+
**/themes
15+
coverage
16+
*.map.js
17+
*.bundle.js
18+
docs/_build
19+
app/lab/extensions/
20+
21+
# jetbrains IDE stuff
22+
.idea/
23+
24+
# ms IDE stuff
25+
.history/
26+
.vscode/
27+
28+
# JS templating
29+
bootstrap.js
30+
index.template.js
31+
config-utils.js
32+
33+
docs

.eslintrc.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
module.exports = {
2+
extends: [
3+
'eslint:recommended',
4+
'plugin:@typescript-eslint/eslint-recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'plugin:prettier/recommended'
7+
],
8+
parser: '@typescript-eslint/parser',
9+
parserOptions: {
10+
project: 'tsconfig.eslint.json',
11+
sourceType: 'module'
12+
},
13+
plugins: ['@typescript-eslint'],
14+
rules: {
15+
'@typescript-eslint/naming-convention': [
16+
'error',
17+
{
18+
selector: 'interface',
19+
format: ['PascalCase'],
20+
custom: {
21+
regex: '^I[A-Z]',
22+
match: true
23+
}
24+
}
25+
],
26+
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
27+
'@typescript-eslint/no-explicit-any': 'off',
28+
'@typescript-eslint/no-namespace': 'off',
29+
'@typescript-eslint/no-use-before-define': 'off',
30+
'@typescript-eslint/quotes': [
31+
'error',
32+
'single',
33+
{ avoidEscape: true, allowTemplateLiterals: false }
34+
],
35+
curly: ['error', 'all'],
36+
eqeqeq: 'error',
37+
'prefer-arrow-callback': 'error'
38+
}
39+
};

.github/workflows/build.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
2323

2424
- name: Install dependencies
25-
run: python -m pip install -U "jupyterlab>=4.1.1,<4.2"
25+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
2626

2727
- name: Lint the extension
2828
run: |
@@ -63,7 +63,7 @@ jobs:
6363
- name: Install Python
6464
uses: actions/setup-python@v5
6565
with:
66-
python-version: '3.9'
66+
python-version: '3.10'
6767
architecture: 'x64'
6868
- uses: actions/download-artifact@v4
6969
with:
@@ -75,12 +75,13 @@ jobs:
7575
sudo rm -rf $(which node)
7676
sudo rm -rf $(which node)
7777
78-
pip install "jupyterlab>=4.1.1,<4.2" jupyterlite_javascript_kernel*.whl
78+
pip install "jupyterlab>=4.0.0,<5" jupyterlite_javascript_kernel*.whl
7979
8080
8181
jupyter labextension list
8282
jupyter labextension list 2>&1 | grep -ie "@jupyterlite/javascript-kernel.*OK"
83-
# TODO: re-enable?
83+
84+
# TODO: add JupyterLite browser check
8485
# python -m jupyterlab.browser_check --no-browser-test
8586
8687
@@ -93,9 +94,9 @@ jobs:
9394
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
9495
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
9596

96-
build_pages:
97-
needs: build
97+
build_lite:
9898
runs-on: ubuntu-latest
99+
needs: build
99100
steps:
100101
- name: Checkout
101102
uses: actions/checkout@v4
@@ -108,7 +109,7 @@ jobs:
108109
name: extension-artifacts
109110
- name: Install the dependencies
110111
run: |
111-
python -m pip install "jupyterlite-core>=0.2.3" jupyterlite_javascript_kernel*.whl
112+
python -m pip install --pre jupyterlite-core jupyterlite_javascript_kernel*.whl
112113
- name: Build the JupyterLite site
113114
run: |
114115
jupyter lite build --output-dir dist
@@ -117,11 +118,10 @@ jobs:
117118
with:
118119
path: ./dist
119120

120-
deploy_pages:
121-
needs: build_pages
121+
deploy_lite:
122+
needs: build_lite
122123
if: github.ref == 'refs/heads/main'
123124
permissions:
124-
contents: read
125125
pages: write
126126
id-token: write
127127

.github/workflows/publish-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
id-token: write
2121
steps:
2222
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
23+
with:
24+
node_version: '24'
2325

2426
- uses: actions/create-github-app-token@v1
2527
id: app-token

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ node_modules
44
**/package.json
55
!/package.json
66
jupyterlite_javascript_kernel
7+
.venv
8+
docs

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "none",
4+
"arrowParens": "avoid"
5+
}

.readthedocs.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: mambaforge-latest
7+
commands:
8+
- mamba env update --name base --file docs/environment.yml
9+
- python -m pip install .
10+
- jupyter lite build --output-dir dist
11+
- mkdir -p $READTHEDOCS_OUTPUT/html
12+
- cp -r dist/* $READTHEDOCS_OUTPUT/html/

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
enableImmutableInstalls: false
12
nodeLinker: node-modules

RELEASE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ Here is a summary of the steps to cut a new release:
8282
- If the repo generates PyPI release(s), create a scoped PyPI [token](https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#saving-credentials-on-github). We recommend using a scoped token for security reasons.
8383

8484
- You can store the token as `PYPI_TOKEN` in your fork's `Secrets`.
85-
8685
- Advanced usage: if you are releasing multiple repos, you can create a secret named `PYPI_TOKEN_MAP` instead of `PYPI_TOKEN` that is formatted as follows:
8786

8887
```text

docs/environment.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: jupyterlite-javascript-kernel
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- pip
6+
- python=3.11
7+
- ipywidgets>=8.1,<9
8+
- jupyterlab>=4.5.0,<5
9+
- nodejs=22
10+
- jupyterlite-core>=0.7.0,<0.8

0 commit comments

Comments
 (0)