Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream changes to linc neuroglancer #16

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
1255beb
fix: use HEAD request rather than bytes=-N suffix requests
jbms Nov 13, 2024
39272cd
fix(package.json): fix node.js version requirement
jbms Nov 14, 2024
ff735ed
chore: update package-lock.json to account for node.js version bump
jbms Nov 19, 2024
733539e
fix(layer): ensure layer references are unset when the associated lay…
chrisj Nov 20, 2024
0d767d1
ome.ts: update with ome-zarr 0.5 (#670)
joshmoore Nov 27, 2024
52cbc2a
chore(jxl): fix reproducibility issues (#672)
jbms Nov 28, 2024
98595ee
fix(segment properties): fix negative constraints on numeric properti…
jbms Nov 28, 2024
c581f20
fix(gzip): Use Compression Streams API in place of pako (#674)
jbms Dec 2, 2024
e9c1ff7
fix(gzip): Fix decoding of zlib-format data
jbms Dec 8, 2024
5ef8e6a
chore(mypy): fix mypy typing issues with NumPy 2.2
jbms Dec 9, 2024
9f7c238
refactor: Eliminate CancellationToken, use AbortSignal instead
jbms Dec 8, 2024
04ed8f9
chore(tsconfig): migrate to useDefineForClassFields=true
jbms Dec 10, 2024
413a098
docs(rsbuild/rspack): add rspack and rsbuild dependent project examples
jbms Dec 10, 2024
c6bc847
fix(typings): add ?raw declaration and remove stale dependency on vit…
jbms Dec 11, 2024
22246e2
chore(generate-code): migrate to ES module, fix type annotations
jbms Dec 11, 2024
b1c8e95
chore: support typescript 5.7
jbms Dec 11, 2024
0e02e35
fix(fetchChunk): properly handle already-failed chunks
jbms Dec 11, 2024
46dbd70
fix(status): fix delayed visibility of modal status messages
jbms Dec 11, 2024
a03db48
chore(eslint): upgrade eslint
jbms Dec 11, 2024
d5b2650
chore: switch to rspack from webpack
jbms Dec 12, 2024
ed2ab1a
fix(position_widget): fix display of playback controls
jbms Nov 9, 2024
dd4ffcf
fix(DimensionTool): fix text display of position
jbms Nov 9, 2024
15c5933
fix(display_context): make IntersectionObserver usage more robust
jbms Nov 26, 2024
610965b
fix(position_widget): fix display of dimension tool during initial load
jbms Nov 27, 2024
76fd4b1
feat(tool palettes): Add support for tool palettes
jbms Nov 6, 2024
a4404b9
fix(png): fix multi-channel png decoding
jbms Dec 13, 2024
2165343
chore: vendor glsl-editor/glsl.js as codemirror-glsl.ts
jbms Dec 19, 2024
3d2f93d
fix(examples/vite): fix vite example when using a real Neuroglancer i…
jbms Dec 19, 2024
5898236
chore(nguath_server): update deps
jbms Dec 19, 2024
9d3a618
Revamp file-based data access
jbms Dec 20, 2024
7c45c03
chore(lint): Use oxlint in addition to eslint
jbms Jan 19, 2025
6b207e3
fix(precomputed): Fix annotation source
jbms Jan 20, 2025
bdfd8dc
chore(examples): Update example lockfiles
jbms Jan 20, 2025
85231c0
fix(kvstore/url): fix relative path handling
jbms Jan 20, 2025
90e8ace
fix(annotations): fix toggling of default annotation subsources
jbms Jan 21, 2025
8217299
fix(url): fix buggy url parsing in the case of s3: scheme
jbms Jan 21, 2025
f343058
fix(precomputed): fix non-sharded annotation spatial index chunk URLs
jbms Jan 23, 2025
18da7fc
fix(single_mesh): fix single_mesh data sources
jbms Jan 23, 2025
5a54a48
fix(sliceview): fix reuse of rpc message objects
jbms Jan 23, 2025
6f9335f
Add missing event handler for position plot when rendered as tool in …
aranega Jan 24, 2025
063b8eb
Merge remote-tracking branch 'upstream/master' into ak-jan24
aaronkanzer Jan 24, 2025
b08a82a
Merge upstream changes to linc neuroglancer
aaronkanzer Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 0 additions & 16 deletions .eslintignore

This file was deleted.

68 changes: 0 additions & 68 deletions .eslintrc.yml

This file was deleted.

29 changes: 20 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ on:
tags:
- v**
pull_request:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: false

jobs:
client:
Expand All @@ -24,11 +31,16 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
cache: "npm"
cache-dependency-path: |
package-lock.json
examples/**/package-lock.json
# go needed for fake_gcs_server used by the javascript tests
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: "stable"
- run: npm install
- run: npm run format:fix
- name: Check for dirty working directory
Expand All @@ -47,7 +59,6 @@ jobs:
- run: npm run build-package
- run: npm publish --dry-run
working-directory: dist/package
- uses: ./.github/actions/setup-firefox
- name: Run JavaScript tests (including WebGL)
run: npm test
if: ${{ runner.os != 'macOS' }}
Expand Down Expand Up @@ -92,17 +103,17 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Uncomment the action below for an interactive shell
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- uses: ./.github/actions/setup-firefox
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Install Python packaging/test tools
run: pip install tox nox wheel numpy -r python/requirements-test.txt
- uses: ./.github/actions/setup-firefox
- run: nox -s lint format mypy
- name: Check for dirty working directory
run: git diff --exit-code
Expand Down Expand Up @@ -139,7 +150,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
cache: "npm"
- name: Set up Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -214,7 +225,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
registry-url: "https://registry.npmjs.org"
- uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
node-version:
- "20.x"
- "22.x"
runs-on: ubuntu-latest

steps:
Expand Down
5 changes: 5 additions & 0 deletions .ncurc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
reject:
# API break
- "gl-matrix"
- "@types/gl-matrix"
- "codemirror"
60 changes: 60 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["import", "typescript", "oxc", "unicorn", "promise", "vitest"],
"env": {
"browser": true
},
"settings": {},
"rules": {
// Seems to be buggy
"no-loss-of-precision": "off",
"import/no-cycle": "error",
"import/first": "error",
"no-unsafe-finally": "off",
"require-yield": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"erasing-op": "off",
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"no-new-array": "off",
"no-document-cookie": "off",
"@typescript-eslint/consistent-type-imports": "error"
},
"overrides": [
{
"files": ["*.test.ts", "*.spec.ts"],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
}
],
"ignorePatterns": [
"**/node_modules",
"**/dist",
"**/python",
"templates/neuroglancer/sliceview",
"src/third_party/jpgjs/jpg.js",
"**/templates",
"**/build",
"**/.tox",
"**/.nox",
"lib",
"**/python",
"**/config",
"**/typings",
"src/mesh/draco/stub.js",
"**/tsconfig.tsbuildinfo",
"examples"
]
}
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
/templates/
/python/
/third_party/jpgjs/jpg.js
/testdata/*.json
/testdata/**/*.json
zarr.json
.parcel-cache
dist
/lib
/docs/_build/
/.ruff_cache
package.json
package-lock.json
6 changes: 3 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ prune examples
exclude .clang-format
exclude .editorconfig
exclude .eslintignore
exclude .eslintrc
exclude .style.yapf
exclude cors_webserver.py
exclude gulpfile.js
Expand All @@ -36,8 +35,9 @@ exclude MANIFEST.in
exclude *.ts
exclude .prettierrc.yml
exclude .prettierignore
exclude .eslintrc.yml
exclude eslint.config.js
exclude .ncurc.yml
exclude index.html
exclude webpack.config.js
exclude rspack.config.js
exclude firebase.json
exclude .firebaserc
15 changes: 12 additions & 3 deletions build_tools/after-version-change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,17 @@ await Promise.all(
await execFileAsync("npm", ["install", "--no-audit", "--no-fund"], {
cwd: exampleDir,
});
await execFileAsync("git", ["add", "package-lock.json"], {
cwd: exampleDir,
});
}),
);

await execFileAsync(
"git",
[
"add",
...(await glob("examples/*/*/package-lock.json", {
absolute: false,
cwd: rootDir,
})),
],
{ cwd: rootDir },
);
29 changes: 22 additions & 7 deletions build_tools/build-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ function buildDeclarationFiles(
program.emit();
}

async function buildPackage(options: { inplace?: boolean }) {
const { inplace = false } = options;
async function buildPackage(options: {
inplace?: boolean;
skipDeclarations?: boolean;
}) {
const { inplace = false, skipDeclarations = false } = options;

const srcDir = path.resolve(rootDir, "src");
const outDir = inplace ? rootDir : path.resolve(rootDir, "dist", "package");
Expand Down Expand Up @@ -68,6 +71,7 @@ async function buildPackage(options: { inplace?: boolean }) {
outbase: srcDir,
bundle: false,
outdir: libDir,
target: "es2022",
});

let compilerOptionsFromConfigFile: ts.CompilerOptions = {};
Expand All @@ -80,10 +84,12 @@ async function buildPackage(options: { inplace?: boolean }) {
"./",
).options;
}
buildDeclarationFiles(entryPoints, {
...compilerOptionsFromConfigFile,
outDir: libDir,
});
if (!skipDeclarations) {
buildDeclarationFiles(entryPoints, {
...compilerOptionsFromConfigFile,
outDir: libDir,
});
}

const otherSources = await glob(["**/*.{css,js,html,wasm}"], {
cwd: srcDir,
Expand Down Expand Up @@ -117,6 +123,7 @@ async function buildPackage(options: { inplace?: boolean }) {
const { postpack } = packageJson["scripts"];
delete packageJson["scripts"];
packageJson["scripts"] = { postpack };
packageJson["files"] = ["lib/**/*"];
} else {
delete packageJson["private"];
packageJson["scripts"] = {};
Expand Down Expand Up @@ -156,6 +163,11 @@ async function parseArgsAndRunMain() {
default: false,
description: "Convert package to built format inplace.",
},
["skip-declarations"]: {
type: "boolean",
default: false,
description: "Skip generating .d.ts files.",
},
["if-not-toplevel"]: {
type: "boolean",
default: false,
Expand Down Expand Up @@ -193,7 +205,10 @@ async function parseArgsAndRunMain() {
return;
}
}
buildPackage({ inplace: argv.inplace });
buildPackage({
inplace: argv.inplace,
skipDeclarations: argv.skipDeclarations,
});
}

if (process.argv[1] === import.meta.filename) {
Expand Down
Loading
Loading