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
33 changes: 33 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
lint-staged.config.js
.eslintrc.js
scripts/serve.js

.yarn-packages
node_modules
**/build
**/lib
**/node_modules
**/mock_packages
**/static
**/typings
**/schemas
**/themes
coverage
*.map.js
*.bundle.js
docs/_build
app/lab/extensions/

# jetbrains IDE stuff
.idea/

# ms IDE stuff
.history/
.vscode/

# JS templating
bootstrap.js
index.template.js
config-utils.js

docs
39 changes: 39 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended'
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.eslint.json',
sourceType: 'module'
},
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: true
}
}
],
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/quotes': [
'error',
'single',
{ avoidEscape: true, allowTemplateLiterals: false }
],
curly: ['error', 'all'],
eqeqeq: 'error',
'prefer-arrow-callback': 'error'
}
};
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

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

- name: Lint the extension
run: |
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'
architecture: 'x64'
- uses: actions/download-artifact@v4
with:
Expand All @@ -75,12 +75,13 @@ jobs:
sudo rm -rf $(which node)
sudo rm -rf $(which node)

pip install "jupyterlab>=4.1.1,<4.2" jupyterlite_javascript_kernel*.whl
pip install "jupyterlab>=4.0.0,<5" jupyterlite_javascript_kernel*.whl


jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@jupyterlite/javascript-kernel.*OK"
# TODO: re-enable?

# TODO: add JupyterLite browser check
# python -m jupyterlab.browser_check --no-browser-test


Expand All @@ -93,9 +94,9 @@ jobs:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

build_pages:
needs: build
build_lite:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -108,7 +109,7 @@ jobs:
name: extension-artifacts
- name: Install the dependencies
run: |
python -m pip install "jupyterlite-core>=0.2.3" jupyterlite_javascript_kernel*.whl
python -m pip install --pre jupyterlite-core jupyterlite_javascript_kernel*.whl
- name: Build the JupyterLite site
run: |
jupyter lite build --output-dir dist
Expand All @@ -117,11 +118,10 @@ jobs:
with:
path: ./dist

deploy_pages:
needs: build_pages
deploy_lite:
needs: build_lite
if: github.ref == 'refs/heads/main'
permissions:
contents: read
pages: write
id-token: write

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
id-token: write
steps:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
with:
node_version: '24'

- uses: actions/create-github-app-token@v1
id: app-token
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ node_modules
**/package.json
!/package.json
jupyterlite_javascript_kernel
.venv
docs
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid"
}
12 changes: 12 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: mambaforge-latest
commands:
- mamba env update --name base --file docs/environment.yml
- python -m pip install .
- jupyter lite build --output-dir dist
- mkdir -p $READTHEDOCS_OUTPUT/html
- cp -r dist/* $READTHEDOCS_OUTPUT/html/
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
enableImmutableInstalls: false
nodeLinker: node-modules
1 change: 0 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ Here is a summary of the steps to cut a new release:
- 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.

- You can store the token as `PYPI_TOKEN` in your fork's `Secrets`.

- 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:

```text
Expand Down
10 changes: 10 additions & 0 deletions docs/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: jupyterlite-javascript-kernel
channels:
- conda-forge
dependencies:
- pip
- python=3.11
- ipywidgets>=8.1,<9
- jupyterlab>=4.5.0,<5
- nodejs=22
- jupyterlite-core>=0.7.0,<0.8
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"npmClient": "jlpm",
"version": "0.4.0-alpha.0",
"version": "independent",
"useWorkspaces": true
}
95 changes: 12 additions & 83 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"build:test": "lerna run build:test",
"bump:js:version": "lerna version --no-push --force-publish --no-git-tag-version --yes",
"clean": "lerna run clean",
"install": "lerna bootstrap",
"clean:all": "lerna run clean && rimraf node_modules",
"install:dev": "yarn run build:prod && yarn run develop",
"install:extension": "jupyter labextension develop --overwrite .",
"eslint": "eslint . --ext .ts,.tsx --fix",
Expand All @@ -43,87 +43,16 @@
"watch": "lerna run watch"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6",
"@typescript-eslint/parser": "^6",
"eslint": "^8",
"eslint-config-prettier": "^8",
"eslint-plugin-prettier": "^5",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^5.0.0",
"lerna": "^6.4.1",
"prettier": "^3",
"rimraf": "^3.0.2"
},
"eslintIgnore": [
"node_modules",
"dist",
"coverage",
"**/*.d.ts"
],
"eslintConfig": {
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.eslint.json",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": [
"PascalCase"
],
"custom": {
"regex": "^I[A-Z]",
"match": true
}
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"args": "none"
}
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/quotes": [
"error",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": false
}
],
"curly": [
"error",
"all"
],
"eqeqeq": "error",
"prefer-arrow-callback": "error"
}
},
"prettier": {
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid",
"endOfLine": "auto",
"overrides": [
{
"files": "package.json",
"options": {
"tabWidth": 4
}
}
]
"lint-staged": "^10.4.0",
"npm-run-all2": "^7.0.1",
"prettier": "^3.0.0",
"rimraf": "^5.0.1",
"shell-quote": "^1.7.2"
}
}
}
19 changes: 6 additions & 13 deletions packages/javascript-kernel-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@
"watch:src": "tsc -w"
},
"dependencies": {
"@jupyterlab/application": "^4.5.0",
"@jupyterlite/javascript-kernel": "^0.4.0-alpha.0",
"@jupyterlite/kernel": "^0.2.1 || ^0.3.0 || ^0.4.0-alpha.0",
"@jupyterlite/server": "^0.2.1 || ^0.3.0 || ^0.4.0-alpha.0"
"@jupyterlite/services": "^0.7.0"
},
"devDependencies": {
"@jupyterlab/builder": "~4.1.1",
"@jupyterlab/builder": "^4.5.0",
"npm-run-all2": "^7.0.1",
"rimraf": "~5.0.1",
"typescript": "~5.1.6"
"typescript": "~5.0.2"
},
"publishConfig": {
"access": "public"
Expand All @@ -55,15 +56,7 @@
"extension": true,
"outputDir": "../../jupyterlite_javascript_kernel/labextension",
"sharedPackages": {
"@jupyterlite/kernel": {
"bundled": false,
"singleton": true
},
"@jupyterlite/server": {
"bundled": false,
"singleton": true
},
"@jupyterlite/contents": {
"@jupyterlite/services": {
"bundled": false,
"singleton": true
}
Expand Down
Loading