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
9 changes: 0 additions & 9 deletions examples/inputs-outputs/environment.yml

This file was deleted.

13 changes: 8 additions & 5 deletions examples/inputs-outputs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"description": "An itk-wasm pipeline example for inputs/outputs",
"type": "module",
"itk-wasm": {
"test-data-hash": "bafkreidnoz54py66bn56uq6itwkfgngflaqilflfvwkxlps4ycmygstzja",
"test-data-urls": [
"https://github.com/InsightSoftwareConsortium/ITK-Wasm/releases/download/itk-wasm-v1.0.0-b.179/sample-data.tar.gz",
"https://bafybeidxatrsrrphfmntdyze6ec3jbiak527wj3kalwjptv4bimpcnzxdq.ipfs.w3s.link/ipfs/bafybeidxatrsrrphfmntdyze6ec3jbiak527wj3kalwjptv4bimpcnzxdq/sample-data.tar.gz"
],
"emscripten-docker-image": "quay.io/itkwasm/emscripten:latest",
"wasi-docker-image": "quay.io/itkwasm/wasi:latest",
"typescript-package-name": "@itk-wasm/inputs-outputs-example",
Expand All @@ -18,12 +23,11 @@
"build:emscripten:debug": "itk-wasm pnpm-script build:emscripten:debug",
"build:wasi": "itk-wasm pnpm-script build:wasi",
"build:wasi:debug": "itk-wasm pnpm-script build:wasi:debug",
"build:python:wasi": "itk-wasm pnpm-script build:python:wasi",
"build:python:wasi": "echo 'No build:python:wasi script required with pixi'",
"bindgen:typescript": "itk-wasm pnpm-script bindgen:typescript",
"bindgen:python": "itk-wasm pnpm-script bindgen:python",
"build:gen:typescript": "itk-wasm pnpm-script build:gen:typescript",
"build:gen:python": "itk-wasm pnpm-script build:gen:python",
"build:micromamba": "itk-wasm pnpm-script build:micromamba",
"build:python:versionSync": "itk-wasm pnpm-script build:python:versionSync",
"publish:python": "itk-wasm pnpm-script publish:python",
"test:data:download": "echo skip",
Expand All @@ -34,15 +38,14 @@
"test:pyodide:download:dispatch": "itk-wasm pnpm-script test:pyodide:download:dispatch",
"test:python:dispatch": "itk-wasm pnpm-script test:python:emscripten",
"test:python": "itk-wasm pnpm-script test:python",
"test": "pnpm test:wasi && pnpm test:wasi:help",
"test": "pnpm build:gen:python && pnpm test:wasi && pnpm test:wasi:help",
"test:wasi": "itk-wasm -i itkwasm/wasi:latest -b wasi-build run inputs-outputs.wasi.wasm -- -- cthead1.png smoothed.png",
"test:wasi:help": "itk-wasm -i itkwasm/wasi:latest -b wasi-build run inputs-outputs.wasi.wasm -- -- --help"
},
"author": "Matt McCormick <matt@mmmccormick.com>",
"author": "Matt McCormick <matt@fideus.io>",
"license": "Apache-2.0",
"devDependencies": {
"@itk-wasm/image-io": "workspace:^",
"@thewtex/setup-micromamba": "^1.9.7",
"itk-wasm": "workspace:^"
}
}
2 changes: 1 addition & 1 deletion examples/inputs-outputs/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"shx": "^0.3.4",
"typescript": "^5.3.2",
"vite": "^6.4.1",
"vite-plugin-static-copy": "^0.17.0"
"vite-plugin-static-copy": "^2.3.2"
},
"repository": {
"type": "git",
Expand Down
9 changes: 0 additions & 9 deletions examples/mean-squares-versor-registration/environment.yml

This file was deleted.

13 changes: 8 additions & 5 deletions examples/mean-squares-versor-registration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"description": "Illustrate the use of the VersorRigid3DTransform for 3D image registration.",
"type": "module",
"itk-wasm": {
"test-data-hash": "bafkreidnoz54py66bn56uq6itwkfgngflaqilflfvwkxlps4ycmygstzja",
"test-data-urls": [
"https://github.com/InsightSoftwareConsortium/ITK-Wasm/releases/download/itk-wasm-v1.0.0-b.179/sample-data.tar.gz",
"https://bafybeidxatrsrrphfmntdyze6ec3jbiak527wj3kalwjptv4bimpcnzxdq.ipfs.w3s.link/ipfs/bafybeidxatrsrrphfmntdyze6ec3jbiak527wj3kalwjptv4bimpcnzxdq/sample-data.tar.gz"
],
"emscripten-docker-image": "quay.io/itkwasm/emscripten:latest",
"wasi-docker-image": "quay.io/itkwasm/wasi:latest",
"typescript-package-name": "@itk-wasm/mean-squares-versor-registration-example",
Expand All @@ -18,12 +23,11 @@
"build:emscripten:debug": "itk-wasm pnpm-script build:emscripten:debug",
"build:wasi": "itk-wasm pnpm-script build:wasi",
"build:wasi:debug": "itk-wasm pnpm-script build:wasi:debug",
"build:python:wasi": "itk-wasm pnpm-script build:python:wasi",
"build:python:wasi": "echo 'No build:python:wasi script required with pixi'",
"bindgen:typescript": "itk-wasm pnpm-script bindgen:typescript",
"bindgen:python": "itk-wasm pnpm-script bindgen:python",
"build:gen:typescript": "itk-wasm pnpm-script build:gen:typescript",
"build:gen:python": "itk-wasm pnpm-script build:gen:python",
"build:micromamba": "itk-wasm pnpm-script build:micromamba",
"build:python:versionSync": "itk-wasm pnpm-script build:python:versionSync",
"publish:python": "itk-wasm pnpm-script publish:python",
"test:data:download": "echo skip",
Expand All @@ -34,15 +38,14 @@
"test:pyodide:download:dispatch": "itk-wasm pnpm-script test:pyodide:download:dispatch",
"test:python:dispatch": "itk-wasm pnpm-script test:python:emscripten",
"test:python": "itk-wasm pnpm-script test:python",
"test": "pnpm test:wasi:help",
"test": "pnpm build:gen:python && pnpm test:wasi:help",
"test:wasi:long": "itk-wasm test -- -- -V",
"test:wasi:help": "itk-wasm -i itkwasm/wasi:latest run mean-squares-versor-registration.wasi.wasm -- -- --help"
},
"author": "Matt McCormick <matt@mmmccormick.com>",
"author": "Matt McCormick <matt@fideus.io>",
"license": "Apache-2.0",
"devDependencies": {
"@itk-wasm/image-io": "workspace:^",
"@thewtex/setup-micromamba": "^1.9.7",
"itk-wasm": "workspace:^"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"shx": "^0.3.4",
"typescript": "^5.3.2",
"vite": "^6.4.1",
"vite-plugin-static-copy": "^0.17.0"
"vite-plugin-static-copy": "^2.3.2"
},
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions examples/vite/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default defineConfig({
plugins: [
// put lazy loaded JavaScript and Wasm bundles in dist directory
viteStaticCopy({
silent: true,
targets: [
{
src: "node_modules/@itk-wasm/image-io/dist/pipelines/*.{js,wasm,wasm.zst}",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "itk-wasm-workspace",
"version": "1.0.0",
"private": true,
"packageManager": "pnpm@10.14.0",
"packageManager": "pnpm@10.30.2",
"description": "High-performance spatial analysis in a web browser, Node.js, and reproducible execution across programming languages and hardware architectures.",
"type": "module",
"directories": {
Expand Down
3 changes: 3 additions & 0 deletions packages/compare-images/.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Prevent pixi's directory walker (ignore crate) from traversing into
# node_modules, which can contain circular workspace symlinks.
node_modules
1 change: 0 additions & 1 deletion packages/compare-images/pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ description = "Run tests for itkwasm-compare-images-wasi"
cmd = '''curl -L https://github.com/pyodide/pyodide/releases/download/0.26.3/pyodide-0.26.3.tar.bz2 -o pyodide.tar.bz2 &&
tar xjf pyodide.tar.bz2 &&
rm pyodide.tar.bz2'''
outputs = ["pyodide"]
description = "Download Pyodide"

[feature.python.tasks.test-emscripten]
Expand Down
1 change: 1 addition & 0 deletions packages/compare-images/typescript/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default defineConfig({
plugins: [
// put lazy loaded JavaScript and Wasm bundles in dist directory
viteStaticCopy({
silent: true,
targets: [
{ src: '../../../dist/pipelines/*', dest: 'pipelines' },
{ src: '../../../node_modules/@itk-wasm/image-io/dist/pipelines/*.{js,wasm,wasm.zst}', dest: 'pipelines' },
Expand Down
3 changes: 3 additions & 0 deletions packages/compare-meshes/.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Prevent pixi's directory walker (ignore crate) from traversing into
# node_modules, which can contain circular workspace symlinks.
node_modules
1 change: 0 additions & 1 deletion packages/compare-meshes/pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ description = "Run tests for itkwasm-compare-meshes-wasi"
cmd = '''curl -L https://github.com/pyodide/pyodide/releases/download/0.26.3/pyodide-0.26.3.tar.bz2 -o pyodide.tar.bz2 &&
tar xjf pyodide.tar.bz2 &&
rm pyodide.tar.bz2'''
outputs = ["pyodide"]
description = "Download Pyodide"

[feature.python.tasks.test-emscripten]
Expand Down
2 changes: 1 addition & 1 deletion packages/compare-meshes/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"shx": "^0.3.4",
"typescript": "^5.3.2",
"vite": "^6.4.1",
"vite-plugin-static-copy": "^0.17.0"
"vite-plugin-static-copy": "^2.3.2"
},
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions packages/compare-meshes/typescript/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default defineConfig({
plugins: [
// put lazy loaded JavaScript and Wasm bundles in dist directory
viteStaticCopy({
silent: true,
targets: [
{ src: "../../../dist/pipelines/*", dest: "pipelines" },
{
Expand Down
3 changes: 3 additions & 0 deletions packages/compress-stringify/.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Prevent pixi's directory walker (ignore crate) from traversing into
# node_modules, which can contain circular workspace symlinks.
node_modules
1 change: 0 additions & 1 deletion packages/compress-stringify/pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ description = "Run tests for itkwasm-compress-stringify-wasi"
cmd = '''curl -L https://github.com/pyodide/pyodide/releases/download/0.26.3/pyodide-0.26.3.tar.bz2 -o pyodide.tar.bz2 &&
tar xjf pyodide.tar.bz2 &&
rm pyodide.tar.bz2'''
outputs = ["pyodide"]
description = "Download Pyodide"

[feature.python.tasks.test-emscripten]
Expand Down
2 changes: 1 addition & 1 deletion packages/compress-stringify/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"shx": "^0.3.4",
"typescript": "^5.4.3",
"vite": "^6.4.1",
"vite-plugin-static-copy": "^0.17.0"
"vite-plugin-static-copy": "^2.3.2"
},
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion packages/compress-stringify/typescript/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ export default defineConfig({
format: 'es'
},
optimizeDeps: {
exclude: ['itk-wasm', '@itk-wasm/image-io', '@thewtex/zstddec', '@itk-wasm/mesh-io', '@itk-wasm/compare-images', '@itk-wasm/compare-meshes', '@itk-viewer/io']
exclude: ['itk-wasm', '@itk-wasm/image-io', '@thewtex/zstddec', '@itk-wasm/mesh-io', '@itk-wasm/compare-images', '@itk-wasm/compare-meshes', '@itk-wasm/mesh-to-poly-data', '@itk-viewer/io']
},
plugins: [
// put lazy loaded JavaScript and Wasm bundles in dist directory
viteStaticCopy({
silent: true,
targets: [
{ src: '../../../dist/pipelines/*', dest: 'pipelines' },
{ src: '../../../node_modules/@itk-wasm/image-io/dist/pipelines/*.{js,wasm,wasm.zst}', dest: 'pipelines' },
Expand Down
2 changes: 1 addition & 1 deletion packages/core/typescript/create-itk-wasm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-itk-wasm",
"version": "2.1.3",
"version": "2.1.4",
"description": "CLI to create a new ITK-Wasm project or add a pipeline to an existing project.",
"type": "module",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/typescript/demo-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"./*": "./src/*"
},
"scripts": {
"build": "shx mkdir -p dist && shx cp -r node_modules/@shoelace-style/shoelace/dist/assets dist/",
"build": "node ./scripts/copy-shoelace-assets.mjs",
"build:tsc": "pnpm build"
},
"keywords": [
Expand Down
37 changes: 37 additions & 0 deletions packages/core/typescript/demo-app/scripts/copy-shoelace-assets.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

// Resolve the package root regardless of pnpm/npm layout
// Use import.meta.resolve on a known exported subpath, then walk up to find package.json
const shoelaceEntryUrl = await import.meta.resolve("@shoelace-style/shoelace/dist/shoelace.js");
const shoelaceEntryPath = fileURLToPath(shoelaceEntryUrl);
// shoelaceEntryPath is .../shoelace/dist/shoelace.js — go up until we find package.json
let pkgRoot = path.dirname(shoelaceEntryPath);
while (pkgRoot !== path.dirname(pkgRoot)) {
if (fs.existsSync(path.join(pkgRoot, "package.json"))) break;
pkgRoot = path.dirname(pkgRoot);
}

// Try common asset locations across Shoelace versions
const candidates = [
path.join(pkgRoot, "dist", "assets"),
path.join(pkgRoot, "cdn", "assets"),
path.join(pkgRoot, "assets")
];

const src = candidates.find(p => fs.existsSync(p));
if (!src) {
console.error("Could not find Shoelace assets. Looked in:\n" + candidates.join("\n"));
process.exit(1);
}

const dest = path.join(process.cwd(), "dist", "assets");
fs.mkdirSync(dest, { recursive: true });

// Node >=16: fs.cpSync exists
fs.cpSync(src, dest, { recursive: true });
console.log(`Copied Shoelace assets from ${src} -> ${dest}`);
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"esbuild": "^0.19.8",
"shx": "^0.3.4",
"typescript": "^5.3.2",
"vite": "^4.5.0",
"vite-plugin-static-copy": "^0.17.0"
"vite": "^6.4.1",
"vite-plugin-static-copy": "^2.3.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default defineConfig({
plugins: [
// put lazy loaded JavaScript and Wasm bundles in dist directory
viteStaticCopy({
silent: true,
targets: [
{ src: '../../../dist/pipelines/*', dest: 'pipelines' },
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default defineConfig({
crossOriginIsolation(),
// put lazy loaded JavaScript and Wasm bundles in dist directory
viteStaticCopy({
silent: true,
targets: [
{ src: '../../../dist/pipelines/*', dest: 'pipelines' },
{ src: '../../../node_modules/@itk-wasm/image-io/dist/pipelines/*.{js,wasm,wasm.zst}', dest: 'pipelines' },
Expand Down
3 changes: 3 additions & 0 deletions packages/dicom/.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Prevent pixi's directory walker (ignore crate) from traversing into
# node_modules, which can contain circular workspace symlinks.
node_modules
1 change: 0 additions & 1 deletion packages/dicom/pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ description = "Run tests for itkwasm-dicom-wasi"
cmd = '''curl -L https://github.com/pyodide/pyodide/releases/download/0.27.2/pyodide-0.27.2.tar.bz2 -o pyodide.tar.bz2 &&
tar xjf pyodide.tar.bz2 &&
rm pyodide.tar.bz2'''
outputs = ["pyodide"]
description = "Download Pyodide"

[feature.python.tasks.test-emscripten]
Expand Down
2 changes: 1 addition & 1 deletion packages/dicom/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"shx": "^0.3.4",
"typescript": "^5.1.6",
"vite": "^6.4.1",
"vite-plugin-static-copy": "^0.17.0"
"vite-plugin-static-copy": "^2.3.2"
},
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions packages/dicom/typescript/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default defineConfig({
plugins: [
// put lazy loaded JavaScript and Wasm bundles in dist directory
viteStaticCopy({
silent: true,
targets: [
{ src: '../../../dist/pipelines/*', dest: 'pipelines' },
{ src: '../../../node_modules/@itk-wasm/image-io/dist/pipelines/*.{js,wasm,wasm.zst}', dest: 'pipelines' },
Expand Down
3 changes: 3 additions & 0 deletions packages/downsample/.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Prevent pixi's directory walker (ignore crate) from traversing into
# node_modules, which can contain circular workspace symlinks.
node_modules
1 change: 0 additions & 1 deletion packages/downsample/pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ description = "Run tests for itkwasm-downsample-wasi"
cmd = '''curl -L https://github.com/pyodide/pyodide/releases/download/0.26.3/pyodide-0.26.3.tar.bz2 -o pyodide.tar.bz2 &&
tar xjf pyodide.tar.bz2 &&
rm pyodide.tar.bz2'''
outputs = ["pyodide"]
description = "Download Pyodide"

[feature.python.tasks.test-emscripten]
Expand Down
2 changes: 1 addition & 1 deletion packages/downsample/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"shx": "^0.3.4",
"typescript": "^5.3.2",
"vite": "^6.4.1",
"vite-plugin-static-copy": "^0.17.0"
"vite-plugin-static-copy": "^2.3.2"
},
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions packages/downsample/typescript/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default defineConfig({
plugins: [
// put lazy loaded JavaScript and Wasm bundles in dist directory
viteStaticCopy({
silent: true,
targets: [
{ src: '../../../dist/pipelines/*', dest: 'pipelines' },
{ src: '../../../node_modules/@itk-wasm/image-io/dist/pipelines/*.{js,wasm,wasm.zst}', dest: 'pipelines' },
Expand Down
3 changes: 3 additions & 0 deletions packages/image-io/.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Prevent pixi's directory walker (ignore crate) from traversing into
# node_modules, which can contain circular workspace symlinks.
node_modules
1 change: 0 additions & 1 deletion packages/image-io/pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ description = "Run tests for itkwasm-image-io-wasi"
cmd = '''curl -L https://github.com/pyodide/pyodide/releases/download/0.26.3/pyodide-0.26.3.tar.bz2 -o pyodide.tar.bz2 &&
tar xjf pyodide.tar.bz2 &&
rm pyodide.tar.bz2'''
outputs = ["pyodide"]
description = "Download Pyodide"

[feature.python.tasks.test-emscripten]
Expand Down
1 change: 1 addition & 0 deletions packages/image-io/typescript/build/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function generateConfig() {
plugins: [
// put lazy loaded JavaScript and Wasm bundles in dist directory
viteStaticCopy({
silent: true,
targets: [
{ src: '../../../dist/pipelines/*', dest: 'pipelines' },
],
Expand Down
1 change: 1 addition & 0 deletions packages/image-io/typescript/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default defineConfig({
plugins: [
// put lazy loaded JavaScript and Wasm bundles in dist directory
viteStaticCopy({
silent: true,
targets: [
{ src: '../../../dist/pipelines/*', dest: 'pipelines' },
{ src: '../../../node_modules/@itk-wasm/image-io/dist/pipelines/*.{js,wasm,wasm.zst}', dest: 'pipelines' },
Expand Down
3 changes: 3 additions & 0 deletions packages/mesh-filters/.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Prevent pixi's directory walker (ignore crate) from traversing into
# node_modules, which can contain circular workspace symlinks.
node_modules
Loading
Loading