Skip to content

Commit 0cf2339

Browse files
authored
Merge pull request #71 from bollwyvl/bump-a-bunch-of-versions
Bump a bunch of versions
2 parents 2403fd1 + 158f26b commit 0cf2339

23 files changed

+2345
-4254
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
run: |
2424
set -eux
2525
jlpm
26-
jlpm run eslint:check
26+
jlpm eslint:check
2727
python -m pip install .
2828
2929
jupyter labextension list

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ node_modules/
55
.ipynb_checkpoints
66
*.tsbuildinfo
77
jupyterlab_blockly/labextension
8+
untitled*
9+
Untitled*
810

911
# Created by https://www.gitignore.io/api/python
1012
# Edit at https://www.gitignore.io/?templates=python

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,21 @@ pip install -e .
6464
# Link your development version of the extension with JupyterLab
6565
jupyter labextension develop . --overwrite
6666
# Rebuild extension Typescript source after making changes
67-
jlpm run build
67+
jlpm build
6868
```
6969

7070
You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
7171

7272
```bash
7373
# Watch the source directory in one terminal, automatically rebuilding when needed
74-
jlpm run watch
74+
jlpm watch
7575
# Run JupyterLab in another terminal
7676
jupyter lab
7777
```
7878

7979
With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
8080

81-
By default, the `jlpm run build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
81+
By default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
8282

8383
```bash
8484
jupyter lab build --minimize=False

binder/environment.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ channels:
1111

1212
dependencies:
1313
# runtime dependencies
14-
- python >=3.8,<3.9.0a0
15-
- jupyterlab >=3,<4.0.0a0
14+
- python >=3.8,<3.12.0a0
15+
- jupyterlab >=3.5,<4.0.0a0
1616
# labextension build dependencies
17-
- nodejs >=16,<17
17+
- nodejs >=18,<19
1818
- pip
1919
- wheel
2020
# additional packages for demos
21-
# - ipywidgets
21+
- ipywidgets

docs/conf.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,25 @@
5050
# The theme to use for HTML and HTML Help pages. See the documentation for
5151
# a list of builtin themes.
5252
html_theme = 'pydata_sphinx_theme'
53+
html_theme_options = {
54+
'github_url': 'https://github.com/quantstack/jupyterlab-blockly',
55+
'use_edit_page_button': True,
56+
'icon_links': [
57+
{
58+
'name': 'PyPI',
59+
'url': 'https://pypi.org/project/jupyterlab-blockly',
60+
'icon': 'fa-solid fa-box',
61+
},
62+
],
63+
'pygment_light_style': 'github-light',
64+
'pygment_dark_style': 'github-dark'
65+
}
66+
html_context = {
67+
'github_user': 'quantstack',
68+
'github_repo': 'jupyterlab-blockly',
69+
'github_version': 'main',
70+
'doc_path': 'docs',
71+
}
5372

5473
# Add any paths that contain custom static files (such as style sheets) here,
5574
# relative to this directory. They are copied after the builtin static files,

docs/environment.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ dependencies:
88
- myst-parser
99
- pydata-sphinx-theme
1010
- pip:
11-
- jupyterlite
11+
- jupyterlite ==0.1.0b18
1212
- jupyterlite-sphinx
1313
- jupyterlite-xeus-lua
14-

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pre-commit install
4848
# Link your development version of the extension with JupyterLab
4949
jupyter labextension develop . --overwrite
5050
# Rebuild extension Typescript source after making changes
51-
jlpm run build
51+
jlpm build
5252
```
5353

5454
You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.

docs/other_extensions.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The JupyterLab-Blockly extension is ready to be used as a base for other projects: you can register new Blocks, Toolboxes and Generators. It is a great tool for fast prototyping.
44

55
## Creating a new JupyterLab extension
6-
You can easily create a new JupyterLab extension by using a `cookiecutter`. You can read more documentation about `cookiecutters` [here](https://cookiecutter.readthedocs.io/en/latest/), but the process is fairly straight-forward.
6+
You can easily create a new JupyterLab extension by using a `cookiecutter`. You can read more documentation about `cookiecutters` [here](https://cookiecutter.readthedocs.io/en/latest/), but the process is fairly straight-forward.
77

88
After running the following command:
99
```
@@ -20,7 +20,7 @@ Firstly you need to install and add `jupyterlab-blockly` as a dependency for you
2020
jlpm add jupyterlab-blockly
2121
```
2222

23-
Once it is part of your project, all you need to do is import `IBlocklyRegistry`, as it follows:
23+
Once it is part of your project, all you need to do is import `IBlocklyRegistry`, as it follows:
2424
```typescript
2525
// src/index.ts
2626

@@ -40,7 +40,7 @@ The `IBlocklyRegistry` offers a function `registerBlocks`, which allows you to i
4040
*
4141
* @argument blocks Blocks to register.
4242
*/
43-
registerBlocks(blocks: JSONObject[]): void {
43+
registerBlocks(blocks: BlockDefinition[]): void {
4444
Blockly.defineBlocksWithJsonArray(blocks);
4545
}
4646
```
@@ -56,7 +56,7 @@ Using the `registerToolbox` function, provided by `IBlocklyRegistry`, you can re
5656
*
5757
* @argument value Toolbox to register.
5858
*/
59-
registerToolbox(name: string, value: JSONObject): void {
59+
registerToolbox(name: string, value: ToolboxDefinition): void {
6060
this._toolboxes.set(name, value);
6161
}
6262
```
@@ -86,7 +86,7 @@ Lastly, `IBlocklyRegistry` offers the function `registerGenerator` which lets yo
8686

8787

8888
## Example - JupyterLab-Niryo-One
89-
The [JupyterLab-Niryo-One](https://github.com/QuantStack/jupyterlab-niryo-one/) extension was built on top of JupyterLab-Blockly and poses as the perfect example. The [Github repository](https://github.com/QuantStack/jupyterlab-niryo-one/) gives access to its entire codebase.
89+
The [JupyterLab-Niryo-One](https://github.com/QuantStack/jupyterlab-niryo-one/) extension was built on top of JupyterLab-Blockly and poses as the perfect example. The [Github repository](https://github.com/QuantStack/jupyterlab-niryo-one/) gives access to its entire codebase.
9090

9191
The following code snippet showcases how to register a new toolbox, `BlocklyNiryo.Toolbox`, as `niryo`.
9292
```typescript
@@ -158,7 +158,7 @@ You will need to request the `jupyterlab-blockly` package as a dependency of you
158158
setup_args = dict(
159159
...
160160
install_requires=['jupyterlab-blockly>=0.1.1,<0.2']
161-
...
161+
...
162162
)
163163
```
164164

@@ -169,14 +169,14 @@ Moreover, as we are working with deduplication of dependencies and the extension
169169
170170
"jupyterlab": {
171171
"sharedPackages": {
172-
"jupyterlab-blockly": {
173-
"bundled": false,
174-
"singleton": true
175-
},
176-
"blockly": {
177-
"bundled": false,
178-
"singleton": true
179-
}
172+
"jupyterlab-blockly": {
173+
"bundled": false,
174+
"singleton": true
175+
},
176+
"blockly": {
177+
"bundled": false,
178+
"singleton": true
179+
}
180180
}
181181
}
182182
```

lerna.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"lerna": "5.1.0",
32
"version": "0.2.1",
4-
"npmClient": "yarn",
3+
"npmClient": "jlpm",
54
"useWorkspaces": true
65
}

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,21 @@
2323
]
2424
},
2525
"scripts": {
26-
"build": "lerna run build",
27-
"build:prod": "lerna run build:prod",
28-
"clean": "lerna run clean",
29-
"clean:all": "lerna run clean:all",
26+
"build": "lerna run --stream build",
27+
"build:prod": "lerna run --stream build:prod",
28+
"clean": "lerna run --stream clean",
29+
"clean:all": "lerna --stream run clean:all",
30+
"deduplicate": "yarn-deduplicate -s fewer --fail",
3031
"eslint": "jlpm eslint:check --fix",
3132
"eslint:check": "eslint . --ext .ts,.tsx",
3233
"install": "lerna bootstrap",
33-
"install:extension": "lerna run install:extension",
34+
"install:extension": "lerna run --stream install:extension",
3435
"lint": "jlpm prettier && jlpm eslint",
3536
"lint:check": "jlpm prettier:check && jlpm eslint:check",
3637
"prettier": "jlpm prettier:base --write --list-different",
3738
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css}\"",
3839
"prettier:check": "jlpm prettier:base --check",
39-
"watch": "lerna run watch",
40+
"watch": "lerna run --stream watch",
4041
"postinstall": "patch-package"
4142
},
4243
"dependencies": {
@@ -49,10 +50,10 @@
4950
"patch-package": "^6.4.7",
5051
"prettier": "^2.5.1",
5152
"postinstall-postinstall": "^2.1.0",
52-
"typescript": "~4.5.2"
53+
"typescript": "~4.9.5"
5354
},
5455
"devDependencies": {
55-
"lerna": "5.1.0",
56-
"yarn": "1.22.17"
56+
"lerna": "^6.5.1",
57+
"yarn-deduplicate": "^6.0.0"
5758
}
5859
}

packages/blockly-extension/package.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@
2828
"url": "https://github.com/quantstack/jupyterlab-blockly.git"
2929
},
3030
"scripts": {
31-
"build": "jlpm run build:lib && jlpm run build:labextension:dev",
32-
"build:prod": "jlpm run clean && jlpm run build:lib && jlpm run build:labextension",
31+
"build": "jlpm build:lib && jlpm build:labextension:dev",
32+
"build:prod": "jlpm clean && jlpm build:lib && jlpm build:labextension",
3333
"build:labextension": "jupyter labextension build .",
3434
"build:labextension:dev": "jupyter labextension build --development True .",
3535
"build:lib": "tsc",
36-
"clean": "jlpm run clean:lib",
36+
"clean": "jlpm clean:lib",
3737
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
3838
"clean:labextension": "rimraf ../../jupyterlab_blockly/labextension",
39-
"clean:all": "jlpm run clean:lib && jlpm run clean:labextension",
40-
"install:extension": "jlpm run build",
39+
"clean:all": "jlpm clean:lib && jlpm clean:labextension",
40+
"install:extension": "jlpm build",
4141
"watch": "run-p watch:src watch:labextension",
4242
"watch:src": "tsc -w",
4343
"watch:labextension": "jupyter labextension watch ."
@@ -56,10 +56,11 @@
5656
"jupyterlab-blockly": "^0.2.1"
5757
},
5858
"devDependencies": {
59-
"@jupyterlab/builder": "^3.4",
59+
"@jupyterlab/builder": "^3.5",
6060
"npm-run-all": "^4.1.5",
61-
"rimraf": "^3.0.2",
62-
"typescript": "~4.5.2"
61+
"rimraf": "^4.4.0",
62+
"typescript": "~4.9.5",
63+
"source-map-loader": "^4.0.1"
6364
},
6465
"sideEffects": [
6566
"style/*.css",
@@ -81,6 +82,7 @@
8182
"bundled": true,
8283
"singleton": true
8384
}
84-
}
85+
},
86+
"webpackConfig": "./webpack.config.js"
8587
}
8688
}

packages/blockly-extension/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@
55
"rootDir": "src"
66
},
77
"include": ["src/*.ts"],
8-
"exclude": ["node_modules"]
8+
"exclude": ["node_modules"],
9+
"references": [
10+
{"path": "../blockly"}
11+
]
912
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// @ts-check
2+
3+
module.exports = /** @type { import('webpack').Configuration } */ ({
4+
devtool: 'source-map'
5+
});

packages/blockly/package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@
3030
},
3131
"scripts": {
3232
"build": "tsc -b",
33-
"build:prod": "jlpm run build",
33+
"build:prod": "jlpm build",
3434
"clean": "rimraf lib tsconfig.tsbuildinfo",
35-
"clean:all": "jlpm run clean",
36-
"install:extension": "jlpm run build",
37-
"watch": "tsc -b --watch"
35+
"clean:all": "jlpm clean",
36+
"install:extension": "jlpm build"
3837
},
3938
"dependencies": {
4039
"@jupyterlab/apputils": "^3.4",
@@ -50,13 +49,13 @@
5049
"@lumino/messaging": "^1.10.0",
5150
"@lumino/signaling": "^1.10.0",
5251
"@lumino/widgets": "^1.30.0",
53-
"blockly": "^7.20211209.2",
52+
"blockly": "^9.2.1",
5453
"react": "^17.0.1",
5554
"react-dom": "^17.0.1"
5655
},
5756
"devDependencies": {
58-
"rimraf": "^3.0.2",
59-
"typescript": "~4.5.2"
57+
"rimraf": "^4.4.0",
58+
"typescript": "~4.9.5"
6059
},
6160
"sideEffects": [
6261
"style/*.css",

packages/blockly/src/layout.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { ISessionContext, showErrorMessage } from '@jupyterlab/apputils';
33
import { CodeCell, CodeCellModel } from '@jupyterlab/cells';
44

55
import { Message } from '@lumino/messaging';
6-
import { PartialJSONValue } from '@lumino/coreutils';
76
import { SplitLayout, SplitPanel, Widget } from '@lumino/widgets';
87
import { IIterator, ArrayIterator } from '@lumino/algorithm';
98
import { Signal } from '@lumino/signaling';
@@ -58,13 +57,13 @@ export class BlocklyLayout extends SplitLayout {
5857
this._manager.changed.connect(this._onManagerChanged, this);
5958
}
6059

61-
get workspace(): PartialJSONValue {
60+
get workspace(): Blockly.Workspace {
6261
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
6362
// @ts-ignore
6463
return Blockly.serialization.workspaces.save(this._workspace);
6564
}
6665

67-
set workspace(workspace: PartialJSONValue) {
66+
set workspace(workspace: Blockly.Workspace) {
6867
const data = workspace === null ? { variables: [] } : workspace;
6968
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
7069
// @ts-ignore

packages/blockly/src/manager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { KernelSpec, KernelConnection } from '@jupyterlab/services';
44
import { IChangedArgs } from '@jupyterlab/coreutils';
55

66
import { ISignal, Signal } from '@lumino/signaling';
7-
import { JSONObject } from '@lumino/coreutils';
87

98
import * as Blockly from 'blockly';
109

1110
import { BlocklyRegistry } from './registry';
11+
import { ToolboxDefinition } from 'blockly/core/utils/toolbox';
1212

1313
/**
1414
* BlocklyManager the manager for each document
@@ -46,7 +46,7 @@ export class BlocklyManager {
4646
/**
4747
* Returns the selected toolbox.
4848
*/
49-
get toolbox(): JSONObject {
49+
get toolbox(): ToolboxDefinition {
5050
return this._registry.toolboxes.get(this._toolbox);
5151
}
5252

0 commit comments

Comments
 (0)