Skip to content

Commit 943ffbe

Browse files
committed
chore: bump itk-wasm version to 1.0.0-b.165
1 parent 9471169 commit 943ffbe

File tree

11 files changed

+103
-226
lines changed

11 files changed

+103
-226
lines changed

packages/compress-stringify/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131
"test:data:download": "dam download test/data test/data.tar.gz bafkreiha6oye3fd5cxfadnua5r2jlkaco2xuyeek454d2ihiffsx7rauqe https://placeholder",
3232
"test:data:pack": "dam pack test/data test/data.tar.gz",
3333
"test:python:wasi": "itk-wasm pnpm-script test:python:wasi",
34-
"test:pyodide:download:emscripten": "itk-wasm pnpm-script test:pyodide:download:emscripten",
3534
"test:python:emscripten": "itk-wasm pnpm-script test:python:emscripten",
36-
"test:pyodide:download:dispatch": "itk-wasm pnpm-script test:pyodide:download:dispatch",
3735
"test:python:dispatch": "itk-wasm pnpm-script test:python:emscripten",
3836
"test:python": "itk-wasm pnpm-script test:python",
3937
"test:wasi": "itk-wasm pnpm-script test:wasi"

packages/core/typescript/itk-wasm/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "itk-wasm",
3-
"version": "1.0.0-b.164",
3+
"version": "1.0.0-b.165",
44
"packageManager": "pnpm@8.11.0",
55
"description": "High-performance spatial analysis in a web browser, Node.js, and reproducible execution across programming languages and hardware architectures.",
66
"type": "module",
@@ -75,7 +75,6 @@
7575
},
7676
"homepage": "https://wasm.itk.org/",
7777
"devDependencies": {
78-
"@itk-wasm/dam": "^1.0.1",
7978
"@types/node": "^20.10.3",
8079
"ava": "^5.3.1",
8180
"cypress": "^13.6.0",
@@ -87,6 +86,7 @@
8786
"typescript": "^5.3.2"
8887
},
8988
"dependencies": {
89+
"@itk-wasm/dam": "^1.1.1",
9090
"@thewtex/zstddec": "^0.2.0",
9191
"@types/emscripten": "^1.39.10",
9292
"axios": "^1.6.2",

packages/core/typescript/itk-wasm/src/bindgen/typescript/resources/template.package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"author": "",
3434
"license": "Apache-2.0",
3535
"dependencies": {
36-
"itk-wasm": "1.0.0-b.162"
36+
"itk-wasm": "1.0.0-b.165"
3737
},
3838
"devDependencies": {
3939
"@itk-wasm/image-io": "^1.1.0",

packages/core/typescript/itk-wasm/src/cli/pnpm-script.js

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import path from 'path'
66
import program from './program.js'
77
import defaultImageTag from './default-image-tag.js'
88

9+
import { download as damDownload } from '@itk-wasm/dam'
10+
911
function configValue(name, options, packageJson, defaultValue, required=false) {
1012
const nameCamelCase = name.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); })
1113
if (options[nameCamelCase]) {
@@ -25,7 +27,15 @@ function configValue(name, options, packageJson, defaultValue, required=false) {
2527
return defaultValue
2628
}
2729

28-
function pnpmScript(name, extraArgs, options) {
30+
async function downloadPyodide(unpackPath, pkg) {
31+
const pyodideDamCid = 'bafybeienencwyms2wzlzx6itqe4tw7rptocwaxihqf2sj6jej2hhoy7jxa'
32+
const pyodideDamUrls = [
33+
'https://github.com/InsightSoftwareConsortium/itk-wasm/releases/download/itk-wasm-v1.0.0-b.158/pyodide-0.24.1-itkwasm-1.0b145-test-dist.tar.bz2',
34+
]
35+
await damDownload(unpackPath, `test/pyodide-${pkg}.tar.bz2`, pyodideDamCid, pyodideDamUrls)
36+
}
37+
38+
async function pnpmScript(name, extraArgs, options) {
2939
let pnpmCommand = ['-c', 'exec']
3040

3141
const micromambaExe = process.platform === 'win32' ? 'micromamba.exe' : 'micromamba'
@@ -141,22 +151,17 @@ function pnpmScript(name, extraArgs, options) {
141151
pnpmCommand = pnpmCommand.concat(['pnpm', 'test:data:download', '&&', micromambaBinaryPath, '-r', micromambaRootPath, '-n', environmentName, 'run', '--cwd', pythonPackagePath, 'pytest', '-s'])
142152
}
143153
break
144-
case 'test:pyodide:download:emscripten':
145-
case 'test:pyodide:download:dispatch': {
146-
const pythonOutputDir = configValue('python-output-dir', options, packageJson, defaultPythonOutputDir)
147-
const pythonPackageName = configValue('python-package-name', options, packageJson, undefined, true)
148-
const unpackPath = name === 'test:pyodide:download:emscripten' ? path.join(pythonOutputDir, `${pythonPackageName}-emscripten`, 'dist') : path.join(pythonOutputDir, `${pythonPackageName}`, 'dist')
149-
const pkg = name.split(':').pop()
150-
pnpmCommand = pnpmCommand.concat(['dam', 'download', unpackPath, `test/pyodide-${pkg}.tar.bz2`, 'bafybeienencwyms2wzlzx6itqe4tw7rptocwaxihqf2sj6jej2hhoy7jxa', 'https://github.com/InsightSoftwareConsortium/itk-wasm/releases/download/itk-wasm-v1.0.0-b.158/pyodide-0.24.1-itkwasm-1.0b145-test-dist.tar.bz2'])
151-
}
152-
break
153154
case 'test:python:emscripten':
154155
case 'test:python:dispatch': {
155156
const pythonOutputDir = configValue('python-output-dir', options, packageJson, defaultPythonOutputDir)
156157
const pythonPackageName = configValue('python-package-name', options, packageJson, undefined, true)
157158
const pythonPackagePath = name === 'test:python:emscripten' ? path.join(pythonOutputDir, `${pythonPackageName}-emscripten`) : path.join(pythonOutputDir, pythonPackageName)
158-
const downloadScript = name.replace(':python', ':pyodide:download')
159-
pnpmCommand = pnpmCommand.concat(['pnpm', 'test:data:download', '&&', 'pnpm', downloadScript, '&&', micromambaBinaryPath, '-r', micromambaRootPath, '-n', environmentName, 'run', '--cwd', pythonPackagePath, 'hatch', 'run', 'test'])
159+
160+
const pyodideUnpackPath = path.join(pythonPackagePath, 'dist')
161+
const pkg = name.split(':').pop()
162+
await downloadPyodide(pyodideUnpackPath, pkg)
163+
164+
pnpmCommand = pnpmCommand.concat(['pnpm', 'test:data:download', '&&', micromambaBinaryPath, '-r', micromambaRootPath, '-n', environmentName, 'run', '--cwd', pythonPackagePath, 'hatch', 'run', 'test'])
160165
}
161166
break
162167
case 'test:python':

packages/core/typescript/itk-wasm/src/itk-wasm-cli.js

Lines changed: 73 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -12,83 +12,85 @@ import pnpmScript from './cli/pnpm-script.js'
1212

1313
import program from './cli/program.js'
1414

15-
program
16-
.option('-i, --image <image>', 'build environment Docker image, defaults to itkwasm/emscripten -- another common image is itkwasm/wasi')
17-
.option('-s, --source-dir <source-directory>', 'path to source directory, defaults to "."')
18-
.option('-b, --build-dir <build-directory>', 'build directory whose path is relative to the source directory, defaults to "wasi-build" for the "itkwasm/wasi" image and "emscripten-build" otherwise')
15+
async function main() {
16+
program
17+
.option('-i, --image <image>', 'build environment Docker image, defaults to itkwasm/emscripten -- another common image is itkwasm/wasi')
18+
.option('-s, --source-dir <source-directory>', 'path to source directory, defaults to "."')
19+
.option('-b, --build-dir <build-directory>', 'build directory whose path is relative to the source directory, defaults to "wasi-build" for the "itkwasm/wasi" image and "emscripten-build" otherwise')
1920

20-
program
21-
.command('build')
22-
.usage('[-- <cmake arguments>]')
23-
.description('build the CMake project found in the source directory')
24-
.action(build)
21+
program
22+
.command('build')
23+
.usage('[-- <cmake arguments>]')
24+
.description('build the CMake project found in the source directory')
25+
.action(build)
2526

26-
program
27-
.command('test')
28-
.option('-t, --test-dir <test-dir>', 'Subdirectory to run ctest in relative to the build directory.')
29-
.usage('[-- <ctest arguments>]')
30-
.description('Run the tests for the CMake project found in the build directory')
31-
.action(test)
27+
program
28+
.command('test')
29+
.option('-t, --test-dir <test-dir>', 'Subdirectory to run ctest in relative to the build directory.')
30+
.usage('[-- <ctest arguments>]')
31+
.description('Run the tests for the CMake project found in the build directory')
32+
.action(test)
3233

33-
program
34-
.command('run <wasmBinary>')
35-
.addOption(new Option('-r, --runtime <wasm-runtime>', 'wasm runtime to use for execution, defaults to "wasmtime"').choices(['wasmtime', 'wasmer', 'wasm3', 'wavm']))
36-
.usage('[options] <wasmBinary> [-- -- <wasm binary arguments>]')
37-
.description('run the wasm binary, whose path is specified relative to the build directory')
38-
.action(run)
34+
program
35+
.command('run <wasmBinary>')
36+
.addOption(new Option('-r, --runtime <wasm-runtime>', 'wasm runtime to use for execution, defaults to "wasmtime"').choices(['wasmtime', 'wasmer', 'wasm3', 'wavm']))
37+
.usage('[options] <wasmBinary> [-- -- <wasm binary arguments>]')
38+
.description('run the wasm binary, whose path is specified relative to the build directory')
39+
.action(run)
3940

40-
program
41-
.command('bindgen')
42-
.option('-o, --output-dir <output-dir>', 'Output directory name. Defaults to the interface option value.')
43-
.requiredOption('-p, --package-name <package-name>', 'Output a package configuration files with the given packages name')
44-
.requiredOption('-d, --package-description <package-description...>', 'Description for package')
45-
.option('-v, --package-version <package-version>', 'Package version, e.g. "1.0.0"')
46-
.addOption(new Option('--interface <interface>', 'interface to generate bindings for, defaults to "typescript". "python-web-demo" support is in progress.').choices(['typescript', 'python', 'python-web-demo']))
47-
.option('-r, --repository <repository-url>', 'Source code repository URL')
48-
.option('-j, --js-module-url <js-module-url>', 'URL for the default hosted itk-wasm bindgen JS ESM module bundle. A JsDeliver is assumed by default.')
49-
.usage('[options]')
50-
.description('Generate language bindings or other interfaces for Wasm modules')
51-
.action(bindgen)
41+
program
42+
.command('bindgen')
43+
.option('-o, --output-dir <output-dir>', 'Output directory name. Defaults to the interface option value.')
44+
.requiredOption('-p, --package-name <package-name>', 'Output a package configuration files with the given packages name')
45+
.requiredOption('-d, --package-description <package-description...>', 'Description for package')
46+
.option('-v, --package-version <package-version>', 'Package version, e.g. "1.0.0"')
47+
.addOption(new Option('--interface <interface>', 'interface to generate bindings for, defaults to "typescript". "python-web-demo" support is in progress.').choices(['typescript', 'python', 'python-web-demo']))
48+
.option('-r, --repository <repository-url>', 'Source code repository URL')
49+
.option('-j, --js-module-url <js-module-url>', 'URL for the default hosted itk-wasm bindgen JS ESM module bundle. A JsDeliver is assumed by default.')
50+
.usage('[options]')
51+
.description('Generate language bindings or other interfaces for Wasm modules')
52+
.action(bindgen)
5253

53-
program
54-
.command('version-sync')
55-
.requiredOption('-p, --package-name <package-name>', 'Assume bindgen package configuration files with the given packages name')
56-
.option('-o, --output-dir <output-dir>', 'Output directory name. Defaults to the interface option value.')
57-
.addOption(new Option('--interface <interface>', 'interface to sync version to, defaults to "python".').choices(['python']))
58-
.option('-t, --typescript-dir <typescript-dir>', 'Path to the typescript binding dir. Defaults to <output-dir>/../typescript.')
59-
.option('-m, --micromamba-binary-path <micromamba-binary-path>', 'Path to the micromamba binary. Defaults to <output-dir>/../micromamba/micromamba.')
60-
.option('-r, --micromamba-root-path <micromamba-root-path>', 'Path to the micromamba root. Defaults to <output-dir>/../micromamba.')
61-
.option('-n, --micromamba-name <micromamba-name>', 'Micromamba environnment name. Defaults to <output-dir>/../ basename.')
62-
.usage('[options]')
63-
.description('Synchronize the version in other language\'s bindings to the typescript binding version.')
64-
.action(versionSync)
54+
program
55+
.command('version-sync')
56+
.requiredOption('-p, --package-name <package-name>', 'Assume bindgen package configuration files with the given packages name')
57+
.option('-o, --output-dir <output-dir>', 'Output directory name. Defaults to the interface option value.')
58+
.addOption(new Option('--interface <interface>', 'interface to sync version to, defaults to "python".').choices(['python']))
59+
.option('-t, --typescript-dir <typescript-dir>', 'Path to the typescript binding dir. Defaults to <output-dir>/../typescript.')
60+
.option('-m, --micromamba-binary-path <micromamba-binary-path>', 'Path to the micromamba binary. Defaults to <output-dir>/../micromamba/micromamba.')
61+
.option('-r, --micromamba-root-path <micromamba-root-path>', 'Path to the micromamba root. Defaults to <output-dir>/../micromamba.')
62+
.option('-n, --micromamba-name <micromamba-name>', 'Micromamba environnment name. Defaults to <output-dir>/../ basename.')
63+
.usage('[options]')
64+
.description('Synchronize the version in other language\'s bindings to the typescript binding version.')
65+
.action(versionSync)
6566

66-
program
67-
.command('publish')
68-
.requiredOption('-p, --package-name <package-name>', 'Assume bindgen package configuration files with the given packages name')
69-
.option('-o, --output-dir <output-dir>', 'Output directory name. Defaults to the interface option value.')
70-
.addOption(new Option('--interface <interface>', 'interface to sync version to, defaults to "python".').choices(['python']))
71-
.option('-m, --micromamba-binary-path <micromamba-binary-path>', 'Path to the micromamba binary. Defaults to <output-dir>/../micromamba/micromamba.')
72-
.option('-r, --micromamba-root-path <micromamba-root-path>', 'Path to the micromamba root. Defaults to <output-dir>/../micromamba.')
73-
.option('-n, --micromamba-name <micromamba-name>', 'Micromamba environnment name. Defaults to <output-dir>/../ basename.')
74-
.usage('[options]')
75-
.description('Build and publish language\'s bindings packages.')
76-
.action(publish)
67+
program
68+
.command('publish')
69+
.requiredOption('-p, --package-name <package-name>', 'Assume bindgen package configuration files with the given packages name')
70+
.option('-o, --output-dir <output-dir>', 'Output directory name. Defaults to the interface option value.')
71+
.addOption(new Option('--interface <interface>', 'interface to sync version to, defaults to "python".').choices(['python']))
72+
.option('-m, --micromamba-binary-path <micromamba-binary-path>', 'Path to the micromamba binary. Defaults to <output-dir>/../micromamba/micromamba.')
73+
.option('-r, --micromamba-root-path <micromamba-root-path>', 'Path to the micromamba root. Defaults to <output-dir>/../micromamba.')
74+
.option('-n, --micromamba-name <micromamba-name>', 'Micromamba environnment name. Defaults to <output-dir>/../ basename.')
75+
.usage('[options]')
76+
.description('Build and publish language\'s bindings packages.')
77+
.action(publish)
7778

78-
program
79-
.command('pnpm-script <name> [extra-args...]')
80-
.description('Run an itk-wasm pnpm build script command. The extra-args are passed to delegated script calls.')
81-
.option('--wasi-docker-image <wasi-docker-image>', 'ITK-Wasm WASI Docker image name:tag.')
82-
.option('--emscripten-docker-image <emscripten-docker-image>', 'ITK-Wasm Emscripten Docker image name:tag.')
83-
.option('--typescript-output-dir <typescript-output-dir>', 'Typescript bindings directory name. Defaults to typescript.')
84-
.option('--python-output-dir <python-output-dir>', 'Python bindings directory name. Defaults to python.')
85-
.option('--typescript-package-name <typescript-package-name>', 'Typescript bindings package name.')
86-
.option('--python-package-name <python-package-name>', 'Python bindings dispatch package name.')
87-
.option('--package-description <package-description>', 'Package description.')
88-
.option('--repository <repository>', 'Source code repository URL.')
89-
.action(pnpmScript)
79+
program
80+
.command('pnpm-script <name> [extra-args...]')
81+
.description('Run an itk-wasm pnpm build script command. The extra-args are passed to delegated script calls.')
82+
.option('--wasi-docker-image <wasi-docker-image>', 'ITK-Wasm WASI Docker image name:tag.')
83+
.option('--emscripten-docker-image <emscripten-docker-image>', 'ITK-Wasm Emscripten Docker image name:tag.')
84+
.option('--typescript-output-dir <typescript-output-dir>', 'Typescript bindings directory name. Defaults to typescript.')
85+
.option('--python-output-dir <python-output-dir>', 'Python bindings directory name. Defaults to python.')
86+
.option('--typescript-package-name <typescript-package-name>', 'Typescript bindings package name.')
87+
.option('--python-package-name <python-package-name>', 'Python bindings dispatch package name.')
88+
.option('--package-description <package-description>', 'Package description.')
89+
.option('--repository <repository>', 'Source code repository URL.')
90+
.action(pnpmScript)
9091

91-
program
92-
.parse(process.argv)
92+
await program
93+
.parseAsync(process.argv)
94+
}
9395

94-
program.help()
96+
await main()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
const version = "1.0.0-b.164";
1+
const version = '1.0.0-b.165'
22

33
export default version

packages/dicom/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131
"test:data:download": "dam download test/data test/data.tar.gz bafybeicskxufnvuem6342pkfwgeo3siiozgzmfo5f34woge6aptuzuwzzu https://github.com/InsightSoftwareConsortium/itk-wasm/releases/download/itk-wasm-v1.0.0-b.119/dicom-test-data.tar.gz https://w3s.link/ipfs/bafybeiby67winzvozowf4moqthwunuxxscssitnb6wahxv4ugvfxhu2vki/data.tar.gz",
3232
"test:data:pack": "dam pack test/data test/data.tar.gz",
3333
"test:python:wasi": "itk-wasm pnpm-script test:python:wasi",
34-
"test:pyodide:download:emscripten": "itk-wasm pnpm-script test:pyodide:download:emscripten",
3534
"test:python:emscripten": "itk-wasm pnpm-script test:python:emscripten",
36-
"test:pyodide:download:dispatch": "itk-wasm pnpm-script test:pyodide:download:dispatch",
3735
"test:python:dispatch": "itk-wasm pnpm-script test:python:emscripten",
3836
"test:python": "itk-wasm pnpm-script test:python",
3937
"test:wasi": "itk-wasm pnpm-script test:wasi"

packages/downsample/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131
"test:data:download": "dam download test/data test/data.tar.gz bafkreic7utwwa32sc7ekhouzdlnla4kffytphcwc7qwam5ndhixwjulydq https://github.com/InsightSoftwareConsortium/itk-wasm/releases/download/itk-wasm-v1.0.0-b.163/itkwasm-downsample-test-data.tar.gz https://w3s.link/ipfs/bafybeifwebok64osjl2i3zc6rkn3izgon333wsjotqzqlxorkkvrbldjcy/data.tar.gz",
3232
"test:data:pack": "dam pack test/data test/data.tar.gz",
3333
"test:python:wasi": "itk-wasm pnpm-script test:python:wasi",
34-
"test:pyodide:download:emscripten": "itk-wasm pnpm-script test:pyodide:download:emscripten",
3534
"test:python:emscripten": "itk-wasm pnpm-script test:python:emscripten",
36-
"test:pyodide:download:dispatch": "itk-wasm pnpm-script test:pyodide:download:dispatch",
3735
"test:python:dispatch": "itk-wasm pnpm-script test:python:emscripten",
3836
"test:python": "itk-wasm pnpm-script test:python",
3937
"test:wasi": "itk-wasm pnpm-script test:wasi -- -V"

packages/image-io/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131
"test:data:download": "dam download test/data test/data.tar.gz bafybeibyjhkcrinl2lotw5g2vngjs23aaenv3tjzxssm35jxaci5ylsqia https://github.com/InsightSoftwareConsortium/itk-wasm/releases/download/itk-wasm-v1.0.0-b.155/image-io-test-data.tar.gz https://w3s.link/ipfs/bafybeiewe4rankwwe7nw7qm2g3qclflhci2e53wthn3gukdlhbff64pua4/data.tar.gz",
3232
"test:data:pack": "dam pack test/data test/data.tar.gz",
3333
"test:python:wasi": "itk-wasm pnpm-script test:python:wasi",
34-
"test:pyodide:download:emscripten": "itk-wasm pnpm-script test:pyodide:download:emscripten",
3534
"test:python:emscripten": "itk-wasm pnpm-script test:python:emscripten",
36-
"test:pyodide:download:dispatch": "itk-wasm pnpm-script test:pyodide:download:dispatch",
3735
"test:python:dispatch": "itk-wasm pnpm-script test:python:emscripten",
3836
"test:python": "itk-wasm pnpm-script test:python",
3937
"test:wasi": "itk-wasm pnpm-script test:wasi"

packages/mesh-io/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131
"test:data:download": "dam download test/data test/data.tar.gz bafkreidvr5jnut7us3umgdm4gqrcqygvpd456z2duaiuiimby7mhvsniii https://github.com/InsightSoftwareConsortium/itk-wasm/releases/download/itk-wasm-v1.0.0-b.155/mesh-io-test-data.tar.gz",
3232
"test:data:pack": "dam pack test/data test/data.tar.gz",
3333
"test:python:wasi": "itk-wasm pnpm-script test:python:wasi",
34-
"test:pyodide:download:emscripten": "itk-wasm pnpm-script test:pyodide:download:emscripten",
3534
"test:python:emscripten": "itk-wasm pnpm-script test:python:emscripten",
36-
"test:pyodide:download:dispatch": "itk-wasm pnpm-script test:pyodide:download:dispatch",
3735
"test:python:dispatch": "itk-wasm pnpm-script test:python:emscripten",
3836
"test:python": "itk-wasm pnpm-script test:python",
3937
"test:wasi": "itk-wasm pnpm-script test:wasi"

0 commit comments

Comments
 (0)