From 9cef9c3e9e6f6eefbc6f7574775763a4f7f2e191 Mon Sep 17 00:00:00 2001 From: Garrett Stevens Date: Wed, 28 Jan 2026 23:46:38 +0000 Subject: [PATCH 01/23] Use tsconfig references for non-src files --- .husky/pre-commit | 2 +- .husky/{pre-commit.js => pre-commit.cjs} | 0 .prettierrc.lint-staged.mjs | 1 + eslint.config.mjs | 10 +-- package.json | 3 +- packages/apollo-cli/README.md | 2 +- packages/apollo-cli/package.json | 2 +- packages/apollo-cli/tsconfig.eslint.json | 4 - .../apollo-collaboration-server/package.json | 2 +- .../apollo-collaboration-server/tsconfig.json | 4 +- packages/apollo-common/package.json | 2 +- packages/apollo-common/tsconfig.json | 2 +- packages/apollo-mst/tsconfig.json | 2 +- packages/apollo-schemas/package.json | 2 +- packages/apollo-schemas/tsconfig.json | 2 +- packages/apollo-shared/package.json | 2 +- packages/apollo-shared/tsconfig.json | 2 +- .../jbrowse-plugin-apollo/cypress.config.js | 2 - .../cypress/tsconfig.json | 2 +- packages/jbrowse-plugin-apollo/package.json | 2 +- .../tsconfig.eslint.json | 4 - packages/jbrowse-plugin-apollo/tsconfig.json | 3 +- .../jbrowse-plugin-apollo/tsconfig.node.json | 12 +++ packages/website/package.json | 2 +- tsconfig-base.json | 73 ---------------- tsconfig.json | 85 ++++++++++++++++--- tsconfig.node.json | 51 +++++++++++ yarn.lock | 48 +++++------ 28 files changed, 182 insertions(+), 146 deletions(-) rename .husky/{pre-commit.js => pre-commit.cjs} (100%) delete mode 100644 packages/apollo-cli/tsconfig.eslint.json delete mode 100644 packages/jbrowse-plugin-apollo/tsconfig.eslint.json create mode 100644 packages/jbrowse-plugin-apollo/tsconfig.node.json delete mode 100644 tsconfig-base.json create mode 100644 tsconfig.node.json diff --git a/.husky/pre-commit b/.husky/pre-commit index 5e08d62fe..508f69fa9 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,3 +1,3 @@ #!/usr/bin/env sh -yarn node .husky/pre-commit.js +yarn node .husky/pre-commit.cjs yarn lint-staged diff --git a/.husky/pre-commit.js b/.husky/pre-commit.cjs similarity index 100% rename from .husky/pre-commit.js rename to .husky/pre-commit.cjs diff --git a/.prettierrc.lint-staged.mjs b/.prettierrc.lint-staged.mjs index ec3e4318e..431902430 100644 --- a/.prettierrc.lint-staged.mjs +++ b/.prettierrc.lint-staged.mjs @@ -13,6 +13,7 @@ const config = { options: { parser: 'jsonc' }, }, ], + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment plugins: [packagejson], } diff --git a/eslint.config.mjs b/eslint.config.mjs index 2a8e98397..956fcaef0 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -33,18 +33,11 @@ export default [ pluginReact.configs.flat.recommended, // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access pluginJSXA11y.flatConfigs.recommended, - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access pluginCypress.configs.recommended, { languageOptions: { globals: { ...globals.browser, ...globals.node }, - parserOptions: { - projectService: { - allowDefaultProject: ['packages/jbrowse-plugin-apollo/*.js'], - }, - defaultProject: 'tsconfig.json', - tsconfigRootDir: import.meta.dirname, - }, + parserOptions: { projectService: true }, }, settings: { react: { version: 'detect' } }, // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment @@ -122,6 +115,7 @@ export default [ 'packages/website/src/**/*.{jsx,tsx}', ], plugins: { 'react-hooks': pluginReactHooks }, + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access rules: { ...pluginReactHooks.configs.recommended.rules }, }, // Don't enforce tsdoc syntax in JS files diff --git a/package.json b/package.json index f05511fa6..36232a66d 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "apollo3", "private": true, "description": "Monorepo containing Apollo front and back end code", + "type": "module", "workspaces": [ "packages/*" ], @@ -19,7 +20,7 @@ "devDependencies": { "@eslint/js": "^9.21.0", "@types/cross-spawn": "^6.0.6", - "@types/node": "^20.19.15", + "@types/node": "^24.10.9", "@types/semver": "^7", "@types/yargs": "^17.0.32", "@typescript-eslint/parser": "^8.25.0", diff --git a/packages/apollo-cli/README.md b/packages/apollo-cli/README.md index 18e82a90d..a55eff6a2 100644 --- a/packages/apollo-cli/README.md +++ b/packages/apollo-cli/README.md @@ -16,7 +16,7 @@ $ npm install -g @apollo-annotation/cli $ apollo COMMAND running command... $ apollo (--version) -@apollo-annotation/cli/0.3.11 linux-x64 node-v24.6.0 +@apollo-annotation/cli/0.3.11 linux-x64 node-v24.13.0 $ apollo --help [COMMAND] USAGE $ apollo COMMAND diff --git a/packages/apollo-cli/package.json b/packages/apollo-cli/package.json index 5b4d42be4..c82588e36 100644 --- a/packages/apollo-cli/package.json +++ b/packages/apollo-cli/package.json @@ -99,7 +99,7 @@ "@types/cross-spawn": "^6.0.6", "@types/inquirer": "^9.0.7", "@types/mocha": "^10", - "@types/node": "^20.19.15", + "@types/node": "^24.10.9", "babel-plugin-istanbul": "^6.1.1", "cross-spawn": "^7.0.3", "mocha": "^10.2.0", diff --git a/packages/apollo-cli/tsconfig.eslint.json b/packages/apollo-cli/tsconfig.eslint.json deleted file mode 100644 index d22466d83..000000000 --- a/packages/apollo-cli/tsconfig.eslint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["jest.config.cjs, babel.config.js"], -} diff --git a/packages/apollo-collaboration-server/package.json b/packages/apollo-collaboration-server/package.json index 8523372f8..b727d2ed1 100644 --- a/packages/apollo-collaboration-server/package.json +++ b/packages/apollo-collaboration-server/package.json @@ -98,7 +98,7 @@ "@types/express-session": "^1", "@types/jest": "^27.0.1", "@types/multer": "^1.4.7", - "@types/node": "^20.19.15", + "@types/node": "^24.10.9", "@types/node-fetch": "^2.6.2", "@types/passport-google-oauth20": "^2.0.11", "@types/passport-jwt": "^3.0.6", diff --git a/packages/apollo-collaboration-server/tsconfig.json b/packages/apollo-collaboration-server/tsconfig.json index fda356433..afcaa45d1 100644 --- a/packages/apollo-collaboration-server/tsconfig.json +++ b/packages/apollo-collaboration-server/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig-base.json", + "extends": "../../tsconfig", "compilerOptions": { "module": "commonjs", "lib": ["esnext"], @@ -15,8 +15,10 @@ "forceConsistentCasingInFileNames": false, "sourceMap": true, }, + "include": ["./src", "./test"], "references": [ { "path": "../apollo-common" }, + { "path": "../apollo-mst" }, { "path": "../apollo-schemas" }, { "path": "../apollo-shared" }, ], diff --git a/packages/apollo-common/package.json b/packages/apollo-common/package.json index 43182fca3..7ab0b795b 100644 --- a/packages/apollo-common/package.json +++ b/packages/apollo-common/package.json @@ -21,7 +21,7 @@ "@gmod/gff": "^2.0.0", "@nestjs/common": "^10.1.0", "@nestjs/core": "^10.1.0", - "@types/node": "^20.19.15", + "@types/node": "^24.10.9", "generic-filehandle": "^3.0.0", "mongoose": "^6.12.0", "typescript": "^5.5.3" diff --git a/packages/apollo-common/tsconfig.json b/packages/apollo-common/tsconfig.json index 9ea29de08..5de18f4c6 100644 --- a/packages/apollo-common/tsconfig.json +++ b/packages/apollo-common/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig-base.json", + "extends": "../../tsconfig", "compilerOptions": { "composite": true, "incremental": true, diff --git a/packages/apollo-mst/tsconfig.json b/packages/apollo-mst/tsconfig.json index ae9e5b6c4..12d710e9e 100644 --- a/packages/apollo-mst/tsconfig.json +++ b/packages/apollo-mst/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig-base.json", + "extends": "../../tsconfig", "compilerOptions": { "composite": true, "incremental": true, diff --git a/packages/apollo-schemas/package.json b/packages/apollo-schemas/package.json index 634026c4e..d5b19b13e 100644 --- a/packages/apollo-schemas/package.json +++ b/packages/apollo-schemas/package.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@apollo-annotation/mst": "workspace:^", - "@types/node": "^20.19.15", + "@types/node": "^24.10.9", "typescript": "^5.5.3" }, "publishConfig": { diff --git a/packages/apollo-schemas/tsconfig.json b/packages/apollo-schemas/tsconfig.json index ae9e5b6c4..12d710e9e 100644 --- a/packages/apollo-schemas/tsconfig.json +++ b/packages/apollo-schemas/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig-base.json", + "extends": "../../tsconfig", "compilerOptions": { "composite": true, "incremental": true, diff --git a/packages/apollo-shared/package.json b/packages/apollo-shared/package.json index bab5643bc..45cd03ec9 100644 --- a/packages/apollo-shared/package.json +++ b/packages/apollo-shared/package.json @@ -25,7 +25,7 @@ "@nestjs/common": "^10.1.0", "@nestjs/core": "^10.1.0", "@types/chai": "^4.3.19", - "@types/node": "^20.19.15", + "@types/node": "^24.10.9", "chai": "^5.1.1", "chai-exclude": "^3.0.0", "glob": "^11.0.0", diff --git a/packages/apollo-shared/tsconfig.json b/packages/apollo-shared/tsconfig.json index d786167aa..da86b6f26 100644 --- a/packages/apollo-shared/tsconfig.json +++ b/packages/apollo-shared/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig-base.json", + "extends": "../../tsconfig", "compilerOptions": { "composite": true, "incremental": true, diff --git a/packages/jbrowse-plugin-apollo/cypress.config.js b/packages/jbrowse-plugin-apollo/cypress.config.js index 149ceb4c1..ff4f9645f 100644 --- a/packages/jbrowse-plugin-apollo/cypress.config.js +++ b/packages/jbrowse-plugin-apollo/cypress.config.js @@ -5,7 +5,6 @@ const fs = require('node:fs') const { defineConfig } = require('cypress') -// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const getCompareSnapshotsPlugin = require('cypress-image-diff-js/plugin') const { configurePlugin } = require('cypress-mongodb') @@ -28,7 +27,6 @@ module.exports = defineConfig({ e2e: { baseUrl: 'http://localhost:8999', setupNodeEvents(on, config) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-call getCompareSnapshotsPlugin(on, config) configurePlugin(on) on('task', { diff --git a/packages/jbrowse-plugin-apollo/cypress/tsconfig.json b/packages/jbrowse-plugin-apollo/cypress/tsconfig.json index d7ad9fdaa..3c48941b1 100644 --- a/packages/jbrowse-plugin-apollo/cypress/tsconfig.json +++ b/packages/jbrowse-plugin-apollo/cypress/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "es5", - "lib": ["es5", "dom"], + "lib": ["es2022", "dom"], "types": ["cypress", "node"], "strict": true, "esModuleInterop": true, diff --git a/packages/jbrowse-plugin-apollo/package.json b/packages/jbrowse-plugin-apollo/package.json index 223c58163..c60454bec 100644 --- a/packages/jbrowse-plugin-apollo/package.json +++ b/packages/jbrowse-plugin-apollo/package.json @@ -79,7 +79,7 @@ "@mui/x-data-grid": "^8.0.0", "@types/autosuggest-highlight": "^3", "@types/file-saver": "^2", - "@types/node": "^20.19.15", + "@types/node": "^24.10.9", "@types/prop-types": "^15", "@types/react": "^18.3.4", "@types/react-dom": "^18", diff --git a/packages/jbrowse-plugin-apollo/tsconfig.eslint.json b/packages/jbrowse-plugin-apollo/tsconfig.eslint.json deleted file mode 100644 index 49e941452..000000000 --- a/packages/jbrowse-plugin-apollo/tsconfig.eslint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["jest.config.js", "jestSetup.js", "rollup.config.js"], -} diff --git a/packages/jbrowse-plugin-apollo/tsconfig.json b/packages/jbrowse-plugin-apollo/tsconfig.json index 8d0ad7652..9b541be3f 100644 --- a/packages/jbrowse-plugin-apollo/tsconfig.json +++ b/packages/jbrowse-plugin-apollo/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig-base.json", + "extends": "../../tsconfig", "compilerOptions": { "declaration": false, "target": "ES6", @@ -14,5 +14,6 @@ { "path": "../apollo-common" }, { "path": "../apollo-mst" }, { "path": "../apollo-shared" }, + { "path": "./tsconfig.node.json" }, ], } diff --git a/packages/jbrowse-plugin-apollo/tsconfig.node.json b/packages/jbrowse-plugin-apollo/tsconfig.node.json new file mode 100644 index 000000000..5be8c4960 --- /dev/null +++ b/packages/jbrowse-plugin-apollo/tsconfig.node.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.node", + "compilerOptions": { "noEmit": false, "outDir": "./conf" }, + "include": [ + "./*.js", + "./.*.js", + "./*.mjs", + "./.*.mjs", + "./*.cjs", + "./.*.cjs", + ], +} diff --git a/packages/website/package.json b/packages/website/package.json index 7e4a2c9d3..1e6df1ffb 100755 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -27,7 +27,7 @@ "@docusaurus/theme-classic": "^3.5.2", "@docusaurus/tsconfig": "^3.5.2", "@docusaurus/types": "^3.5.2", - "@types/node": "^20.19.15", + "@types/node": "^24.10.9", "@types/react": "^18.3.4", "typescript": "^5.5.3" } diff --git a/tsconfig-base.json b/tsconfig-base.json deleted file mode 100644 index fff121c6f..000000000 --- a/tsconfig-base.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - - /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, - "module": "esnext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, - "lib": [ - "dom", - "esnext", - ] /* Specify library files to be included in the compilation. */, - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, - "declaration": true /* Generates corresponding '.d.ts' file. */, - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - "sourceMap": true /* Generates corresponding '.map' file. */, - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - "importHelpers": true /* Import emit helpers from 'tslib'. */, - "downlevelIteration": true /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */, - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ - "strict": true /* Enable all strict type-checking options. */, - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, - "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, - // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ - - /* Module Resolution Options */ - "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "skipLibCheck": true /* Skip type checking of declaration files. */, - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, - }, -} diff --git a/tsconfig.json b/tsconfig.json index d6a0d0570..82067945c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,18 +1,75 @@ { - "extends": "./tsconfig-base.json", "compilerOptions": { - "types": ["@types/node"], - "noEmit": true, - "allowJs": true, + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, + "module": "esnext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, + "lib": [ + "dom", + "esnext", + ] /* Specify library files to be included in the compilation. */, + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, + "declaration": true /* Generates corresponding '.d.ts' file. */, + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + "sourceMap": true /* Generates corresponding '.map' file. */, + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + "importHelpers": true /* Import emit helpers from 'tslib'. */, + "downlevelIteration": true /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */, + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Strict Type-Checking Options */ + "strict": true /* Enable all strict type-checking options. */, + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, + "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, + // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ + + /* Module Resolution Options */ + "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + + /* Source Map Options */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + + /* Advanced Options */ + "skipLibCheck": true /* Skip type checking of declaration files. */, + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, }, - "include": [ - "./*.js", - "./.*.js", - "./*.mjs", - "./.*.mjs", - "./*.cjs", - "./.*.cjs", - "scripts/*.ts", - ".husky/*.js", - ], + "files": [], + "references": [{ "path": "./tsconfig.node.json" }], } diff --git a/tsconfig.node.json b/tsconfig.node.json new file mode 100644 index 000000000..f74810ed8 --- /dev/null +++ b/tsconfig.node.json @@ -0,0 +1,51 @@ +{ + // Visit https://aka.ms/tsconfig to read more about this file + "compilerOptions": { + // Environment Settings + // See also https://aka.ms/tsconfig/module + "module": "nodenext", + "target": "esnext", + // For nodejs: + "lib": ["esnext"], + "types": ["node"], + + // Other Outputs + "sourceMap": true, + "declaration": true, + "declarationMap": true, + + // Stricter Typechecking Options + "noUncheckedIndexedAccess": true, + "exactOptionalPropertyTypes": true, + + // Style Options + // "noImplicitReturns": true, + // "noImplicitOverride": true, + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noFallthroughCasesInSwitch": true, + // "noPropertyAccessFromIndexSignature": true, + + // Recommended Options + "strict": true, + "jsx": "react-jsx", + "verbatimModuleSyntax": true, + "isolatedModules": true, + "moduleDetection": "force", + "skipLibCheck": true, + + "composite": true, + "allowJs": true, + "noEmit": true, + }, + "include": [ + "./*.js", + "./.*.js", + "./*.mjs", + "./.*.mjs", + "./*.cjs", + "./.*.cjs", + "scripts/*.ts", + ".husky/*.{m,c,}js", + ], +} diff --git a/yarn.lock b/yarn.lock index f7a98680f..bea9e08f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -335,7 +335,7 @@ __metadata: "@types/cross-spawn": "npm:^6.0.6" "@types/inquirer": "npm:^9.0.7" "@types/mocha": "npm:^10" - "@types/node": "npm:^20.19.15" + "@types/node": "npm:^24.10.9" babel-plugin-istanbul: "npm:^6.1.1" bson: "npm:^6.3.0" cli-progress: "npm:^3.12.0" @@ -396,7 +396,7 @@ __metadata: "@types/express-session": "npm:^1" "@types/jest": "npm:^27.0.1" "@types/multer": "npm:^1.4.7" - "@types/node": "npm:^20.19.15" + "@types/node": "npm:^24.10.9" "@types/node-fetch": "npm:^2.6.2" "@types/passport-google-oauth20": "npm:^2.0.11" "@types/passport-jwt": "npm:^3.0.6" @@ -460,7 +460,7 @@ __metadata: "@jbrowse/core": "npm:^3.6.5" "@nestjs/common": "npm:^10.1.0" "@nestjs/core": "npm:^10.1.0" - "@types/node": "npm:^20.19.15" + "@types/node": "npm:^24.10.9" bson-objectid: "npm:^2.0.4" generic-filehandle: "npm:^3.0.0" mongoose: "npm:^6.12.0" @@ -502,7 +502,7 @@ __metadata: "@types/autosuggest-highlight": "npm:^3" "@types/file-saver": "npm:^2" "@types/jsonpath": "npm:^0.2.0" - "@types/node": "npm:^20.19.15" + "@types/node": "npm:^24.10.9" "@types/prop-types": "npm:^15" "@types/react": "npm:^18.3.4" "@types/react-dom": "npm:^18" @@ -578,7 +578,7 @@ __metadata: "@nestjs/common": "npm:^10.1.0" "@nestjs/core": "npm:^10.1.0" "@nestjs/mongoose": "npm:^10.0.0" - "@types/node": "npm:^20.19.15" + "@types/node": "npm:^24.10.9" mongoose: "npm:^6.12.0" reflect-metadata: "npm:^0.1.13" rxjs: "npm:^7.4.0" @@ -600,7 +600,7 @@ __metadata: "@nestjs/common": "npm:^10.1.0" "@nestjs/core": "npm:^10.1.0" "@types/chai": "npm:^4.3.19" - "@types/node": "npm:^20.19.15" + "@types/node": "npm:^24.10.9" bson-objectid: "npm:^2.0.4" chai: "npm:^5.1.1" chai-exclude: "npm:^3.0.0" @@ -641,7 +641,7 @@ __metadata: "@docusaurus/tsconfig": "npm:^3.5.2" "@docusaurus/types": "npm:^3.5.2" "@mdx-js/react": "npm:^3.0.0" - "@types/node": "npm:^20.19.15" + "@types/node": "npm:^24.10.9" "@types/react": "npm:^18.3.4" clsx: "npm:^1.1.1" prism-react-renderer: "npm:^2.3.0" @@ -10269,15 +10269,6 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^20.19.15": - version: 20.19.16 - resolution: "@types/node@npm:20.19.16" - dependencies: - undici-types: "npm:~6.21.0" - checksum: 10c0/434dfbe476ef28c72173042c28ca48d7ab668521db250674a5a2deb8e23d2d8b1087ae80928f0c59629b315c4980b6f575ed9621a137c8b4c7f454c551cbcee8 - languageName: node - linkType: hard - "@types/node@npm:^20.9.0": version: 20.10.5 resolution: "@types/node@npm:20.10.5" @@ -10287,6 +10278,15 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^24.10.9": + version: 24.10.9 + resolution: "@types/node@npm:24.10.9" + dependencies: + undici-types: "npm:~7.16.0" + checksum: 10c0/e9e436fcd2136bddb1bbe3271a89f4653910bcf6ee8047c4117f544c7905a106c039e2720ee48f28505ef2560e22fb9ead719f28bf5e075fdde0c1120e38e3b2 + languageName: node + linkType: hard + "@types/normalize-package-data@npm:^2.4.0": version: 2.4.2 resolution: "@types/normalize-package-data@npm:2.4.2" @@ -11786,7 +11786,7 @@ __metadata: dependencies: "@eslint/js": "npm:^9.21.0" "@types/cross-spawn": "npm:^6.0.6" - "@types/node": "npm:^20.19.15" + "@types/node": "npm:^24.10.9" "@types/semver": "npm:^7" "@types/yargs": "npm:^17.0.32" "@typescript-eslint/parser": "npm:^8.25.0" @@ -12588,11 +12588,11 @@ __metadata: linkType: hard "baseline-browser-mapping@npm:^2.8.9": - version: 2.8.15 - resolution: "baseline-browser-mapping@npm:2.8.15" + version: 2.9.18 + resolution: "baseline-browser-mapping@npm:2.9.18" bin: baseline-browser-mapping: dist/cli.js - checksum: 10c0/ec561bd72bdaecc22401f3b971fa3d9ace340c8b375d1eb07362abcba25e0d7b27a6e26a73b48f1df5ec5bcf429e3639958a9b9c77604a89ffcb727449d20ea6 + checksum: 10c0/869bdbb2784f8b1bc49b52d54ea48bf9ea6da8309195e3a0b3f4625197b8187a9b557b1d02f1b6b6dd51f163840a87db259e2b791eed35f0c5fddf3110c4cf28 languageName: node linkType: hard @@ -31325,10 +31325,10 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~6.21.0": - version: 6.21.0 - resolution: "undici-types@npm:6.21.0" - checksum: 10c0/c01ed51829b10aa72fc3ce64b747f8e74ae9b60eafa19a7b46ef624403508a54c526ffab06a14a26b3120d055e1104d7abe7c9017e83ced038ea5cf52f8d5e04 +"undici-types@npm:~7.16.0": + version: 7.16.0 + resolution: "undici-types@npm:7.16.0" + checksum: 10c0/3033e2f2b5c9f1504bdc5934646cb54e37ecaca0f9249c983f7b1fc2e87c6d18399ebb05dc7fd5419e02b2e915f734d872a65da2e3eeed1813951c427d33cc9a languageName: node linkType: hard From e8ba33185c03485f9063c6803f4be047310d6468 Mon Sep 17 00:00:00 2001 From: Garrett Stevens Date: Thu, 29 Jan 2026 00:23:10 +0000 Subject: [PATCH 02/23] Convert apollo-mst to esm --- packages/apollo-mst/package.json | 3 +- .../apollo-mst/src/AnnotationFeatureModel.ts | 2 +- packages/apollo-mst/src/ApolloAssembly.ts | 2 +- packages/apollo-mst/src/ApolloRefSeq.ts | 4 +- packages/apollo-mst/src/CheckResult.ts | 2 +- packages/apollo-mst/src/index.ts | 8 +- packages/apollo-mst/tsconfig.json | 6 -- tsconfig.json | 93 ++++++------------- 8 files changed, 40 insertions(+), 80 deletions(-) diff --git a/packages/apollo-mst/package.json b/packages/apollo-mst/package.json index 3e48cdb44..8b5ffecfe 100644 --- a/packages/apollo-mst/package.json +++ b/packages/apollo-mst/package.json @@ -1,7 +1,8 @@ { "name": "@apollo-annotation/mst", "version": "0.3.11", - "main": "./dist/index.js", + "type": "module", + "exports": "./dist/index.js", "scripts": { "build": "tsc" }, diff --git a/packages/apollo-mst/src/AnnotationFeatureModel.ts b/packages/apollo-mst/src/AnnotationFeatureModel.ts index cc7d38bf7..ebb18a87c 100644 --- a/packages/apollo-mst/src/AnnotationFeatureModel.ts +++ b/packages/apollo-mst/src/AnnotationFeatureModel.ts @@ -14,7 +14,7 @@ import { types, } from 'mobx-state-tree' -import { ApolloAssembly } from '.' +import { ApolloAssembly } from './index.js' const LateAnnotationFeature = types.late( (): IAnyModelType => AnnotationFeatureModel, diff --git a/packages/apollo-mst/src/ApolloAssembly.ts b/packages/apollo-mst/src/ApolloAssembly.ts index 980d4e17d..85a9ac3fe 100644 --- a/packages/apollo-mst/src/ApolloAssembly.ts +++ b/packages/apollo-mst/src/ApolloAssembly.ts @@ -1,6 +1,6 @@ import { type Instance, type SnapshotIn, types } from 'mobx-state-tree' -import { ApolloRefSeq } from './ApolloRefSeq' +import { ApolloRefSeq } from './ApolloRefSeq.js' export type BackendDriverType = | 'CollaborationServerDriver' diff --git a/packages/apollo-mst/src/ApolloRefSeq.ts b/packages/apollo-mst/src/ApolloRefSeq.ts index aea3e081a..6881eb337 100644 --- a/packages/apollo-mst/src/ApolloRefSeq.ts +++ b/packages/apollo-mst/src/ApolloRefSeq.ts @@ -10,7 +10,7 @@ import { type AnnotationFeature, AnnotationFeatureModel, type AnnotationFeatureSnapshot, -} from './AnnotationFeatureModel' +} from './AnnotationFeatureModel.js' export const Sequence = types.model({ start: types.number, @@ -100,7 +100,7 @@ export const ApolloRefSeq = types self.sequence.length === consolidatedSequences.length && self.sequence.every( (s, idx) => - s.start === consolidatedSequences[idx].start && + s.start === consolidatedSequences[idx]?.start && s.stop === consolidatedSequences[idx].stop, ) ) { diff --git a/packages/apollo-mst/src/CheckResult.ts b/packages/apollo-mst/src/CheckResult.ts index e2f541ca0..ae44e427a 100644 --- a/packages/apollo-mst/src/CheckResult.ts +++ b/packages/apollo-mst/src/CheckResult.ts @@ -1,6 +1,6 @@ import { type Instance, type SnapshotIn, types } from 'mobx-state-tree' -import { AnnotationFeatureModel } from './AnnotationFeatureModel' +import { AnnotationFeatureModel } from './AnnotationFeatureModel.js' export const CheckResult = types.model('CheckResult', { _id: types.identifier, diff --git a/packages/apollo-mst/src/index.ts b/packages/apollo-mst/src/index.ts index 1049dbd87..ca0a2678e 100644 --- a/packages/apollo-mst/src/index.ts +++ b/packages/apollo-mst/src/index.ts @@ -1,4 +1,4 @@ -export * from './AnnotationFeatureModel' -export * from './ApolloAssembly' -export * from './ApolloRefSeq' -export * from './CheckResult' +export * from './AnnotationFeatureModel.js' +export * from './ApolloAssembly.js' +export * from './ApolloRefSeq.js' +export * from './CheckResult.js' diff --git a/packages/apollo-mst/tsconfig.json b/packages/apollo-mst/tsconfig.json index 12d710e9e..cb1a09eae 100644 --- a/packages/apollo-mst/tsconfig.json +++ b/packages/apollo-mst/tsconfig.json @@ -5,13 +5,7 @@ "incremental": true, "outDir": "./dist", "rootDir": "./src", - "target": "ES2022", - "lib": ["ES2022", "DOM"], - "module": "CommonJS", "tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo", - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "strictPropertyInitialization": false, }, "include": ["./src"], } diff --git a/tsconfig.json b/tsconfig.json index 82067945c..8137bb4af 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,74 +1,39 @@ { "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ + // Environment Settings + // See also https://aka.ms/tsconfig/module + "module": "nodenext", + "target": "esnext", + "types": [], - /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, - "module": "esnext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, - "lib": [ - "dom", - "esnext", - ] /* Specify library files to be included in the compilation. */, - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, - "declaration": true /* Generates corresponding '.d.ts' file. */, - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - "sourceMap": true /* Generates corresponding '.map' file. */, - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - "importHelpers": true /* Import emit helpers from 'tslib'. */, - "downlevelIteration": true /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */, - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // Other Outputs + "sourceMap": true, + "declaration": true, + "declarationMap": true, - /* Strict Type-Checking Options */ - "strict": true /* Enable all strict type-checking options. */, - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + // Stricter Typechecking Options + "noUncheckedIndexedAccess": true, + // TODO: enable this and fix the problems it reveals + // "exactOptionalPropertyTypes": true, - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, - "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, - // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ + // Style Options + // "noImplicitReturns": true, + // "noImplicitOverride": true, + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noFallthroughCasesInSwitch": true, + // "noPropertyAccessFromIndexSignature": true, - /* Module Resolution Options */ - "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "skipLibCheck": true /* Skip type checking of declaration files. */, - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, + // Recommended Options + "strict": true, + "jsx": "react-jsx", + "verbatimModuleSyntax": true, + "isolatedModules": true, + // TODO: enable this one TypeScript version is updated + // "noUncheckedSideEffectImports": true, + "moduleDetection": "force", + "skipLibCheck": true, }, "files": [], "references": [{ "path": "./tsconfig.node.json" }], From a811f26d628c21114705c93d657a39451480739a Mon Sep 17 00:00:00 2001 From: Garrett Stevens Date: Thu, 29 Jan 2026 00:30:39 +0000 Subject: [PATCH 03/23] Convert apollo-schemas to esm --- packages/apollo-schemas/package.json | 3 ++- .../apollo-schemas/src/assembly.schema.ts | 2 +- packages/apollo-schemas/src/check.schema.ts | 2 +- .../apollo-schemas/src/checkResult.schema.ts | 6 ++++- packages/apollo-schemas/src/feature.schema.ts | 6 ++++- packages/apollo-schemas/src/index.ts | 24 +++++++++---------- packages/apollo-schemas/src/refSeq.schema.ts | 2 +- .../apollo-schemas/src/refSeqChunk.schema.ts | 2 +- packages/apollo-schemas/tsconfig.json | 3 --- 9 files changed, 28 insertions(+), 22 deletions(-) diff --git a/packages/apollo-schemas/package.json b/packages/apollo-schemas/package.json index d5b19b13e..e40e8e780 100644 --- a/packages/apollo-schemas/package.json +++ b/packages/apollo-schemas/package.json @@ -1,7 +1,8 @@ { "name": "@apollo-annotation/schemas", "version": "0.3.11", - "main": "./dist/index.js", + "type": "module", + "exports": "./dist/index.js", "scripts": { "build": "tsc" }, diff --git a/packages/apollo-schemas/src/assembly.schema.ts b/packages/apollo-schemas/src/assembly.schema.ts index 728d8d8b9..e5305317b 100644 --- a/packages/apollo-schemas/src/assembly.schema.ts +++ b/packages/apollo-schemas/src/assembly.schema.ts @@ -1,7 +1,7 @@ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose' import { Schema as MongooseSchema, Types } from 'mongoose' -import { File } from './file.schema' +import { File } from './file.schema.js' export type AssemblyDocument = Assembly & Document diff --git a/packages/apollo-schemas/src/check.schema.ts b/packages/apollo-schemas/src/check.schema.ts index 65ff29467..55da738b7 100644 --- a/packages/apollo-schemas/src/check.schema.ts +++ b/packages/apollo-schemas/src/check.schema.ts @@ -1,5 +1,5 @@ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose' -import { HydratedDocument, Types } from 'mongoose' +import { type HydratedDocument, Types } from 'mongoose' export interface CheckDocument extends HydratedDocument { createdAt: Date diff --git a/packages/apollo-schemas/src/checkResult.schema.ts b/packages/apollo-schemas/src/checkResult.schema.ts index f96b31418..d8adbb483 100644 --- a/packages/apollo-schemas/src/checkResult.schema.ts +++ b/packages/apollo-schemas/src/checkResult.schema.ts @@ -1,6 +1,10 @@ import { type CheckResultSnapshot } from '@apollo-annotation/mst' import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose' -import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose' +import { + type HydratedDocument, + Schema as MongooseSchema, + Types, +} from 'mongoose' export type CheckResultDocument = HydratedDocument diff --git a/packages/apollo-schemas/src/feature.schema.ts b/packages/apollo-schemas/src/feature.schema.ts index 2d3313410..ea75ab397 100644 --- a/packages/apollo-schemas/src/feature.schema.ts +++ b/packages/apollo-schemas/src/feature.schema.ts @@ -1,6 +1,10 @@ import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst' import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose' -import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose' +import { + type HydratedDocument, + Schema as MongooseSchema, + Types, +} from 'mongoose' export interface FeatureDocument extends HydratedDocument { createdAt?: Date diff --git a/packages/apollo-schemas/src/index.ts b/packages/apollo-schemas/src/index.ts index 9df3c46cf..139d9606f 100644 --- a/packages/apollo-schemas/src/index.ts +++ b/packages/apollo-schemas/src/index.ts @@ -1,12 +1,12 @@ -export * from './assembly.schema' -export * from './change.schema' -export * from './check.schema' -export * from './checkResult.schema' -export * from './counter.schema' -export * from './export.schema' -export * from './feature.schema' -export * from './file.schema' -export * from './refSeq.schema' -export * from './refSeqChunk.schema' -export * from './user.schema' -export * from './jbrowseConfig.schema' +export * from './assembly.schema.js' +export * from './change.schema.js' +export * from './check.schema.js' +export * from './checkResult.schema.js' +export * from './counter.schema.js' +export * from './export.schema.js' +export * from './feature.schema.js' +export * from './file.schema.js' +export * from './refSeq.schema.js' +export * from './refSeqChunk.schema.js' +export * from './user.schema.js' +export * from './jbrowseConfig.schema.js' diff --git a/packages/apollo-schemas/src/refSeq.schema.ts b/packages/apollo-schemas/src/refSeq.schema.ts index 0e8926e50..fb984ed14 100644 --- a/packages/apollo-schemas/src/refSeq.schema.ts +++ b/packages/apollo-schemas/src/refSeq.schema.ts @@ -1,7 +1,7 @@ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose' import { Document, Schema as MongooseSchema, Types } from 'mongoose' -import { Assembly } from './assembly.schema' +import { Assembly } from './assembly.schema.js' export type RefSeqDocument = RefSeq & Document diff --git a/packages/apollo-schemas/src/refSeqChunk.schema.ts b/packages/apollo-schemas/src/refSeqChunk.schema.ts index ff7cada55..913590c98 100644 --- a/packages/apollo-schemas/src/refSeqChunk.schema.ts +++ b/packages/apollo-schemas/src/refSeqChunk.schema.ts @@ -1,7 +1,7 @@ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose' import { Document, Schema as MongooseSchema } from 'mongoose' -import { RefSeq } from './refSeq.schema' +import { RefSeq } from './refSeq.schema.js' export type RefSeqChunkDocument = RefSeqChunk & Document diff --git a/packages/apollo-schemas/tsconfig.json b/packages/apollo-schemas/tsconfig.json index 12d710e9e..607300c34 100644 --- a/packages/apollo-schemas/tsconfig.json +++ b/packages/apollo-schemas/tsconfig.json @@ -5,9 +5,6 @@ "incremental": true, "outDir": "./dist", "rootDir": "./src", - "target": "ES2022", - "lib": ["ES2022", "DOM"], - "module": "CommonJS", "tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo", "experimentalDecorators": true, "emitDecoratorMetadata": true, From 5349336d414e400472b8f9a82ac6195090532a50 Mon Sep 17 00:00:00 2001 From: Garrett Stevens Date: Thu, 29 Jan 2026 02:23:09 +0000 Subject: [PATCH 04/23] Convert apollo-common to esm --- .../apollo-collaboration-server/package.json | 2 +- packages/apollo-common/package.json | 7 +- .../src/AssemblySpecificChange.ts | 4 +- packages/apollo-common/src/Change.ts | 4 +- .../apollo-common/src/ChangeTypeRegistry.ts | 2 +- packages/apollo-common/src/CheckRegistry.ts | 2 +- packages/apollo-common/src/FeatureChange.ts | 4 +- .../src/OperationTypeRegistry.ts | 2 +- packages/apollo-common/src/Validation.ts | 2 +- packages/apollo-common/src/declare.d.ts | 29 + packages/apollo-common/src/index.ts | 20 +- packages/apollo-common/tsconfig.json | 9 +- packages/apollo-mst/package.json | 2 +- packages/apollo-shared/package.json | 2 +- packages/jbrowse-plugin-apollo/package.json | 4 +- yarn.lock | 583 +++++++++++++++++- 16 files changed, 635 insertions(+), 43 deletions(-) create mode 100644 packages/apollo-common/src/declare.d.ts diff --git a/packages/apollo-collaboration-server/package.json b/packages/apollo-collaboration-server/package.json index b727d2ed1..10275e5e8 100644 --- a/packages/apollo-collaboration-server/package.json +++ b/packages/apollo-collaboration-server/package.json @@ -45,7 +45,7 @@ "@emotion/styled": "^11.10.6", "@gmod/gff": "^2.0.0", "@gmod/indexedfasta": "^2.0.4", - "@jbrowse/core": "^3.6.5", + "@jbrowse/core": "^4.1.1", "@mui/material": "^7.0.0", "@nestjs/common": "^10.1.0", "@nestjs/config": "^3.0.0", diff --git a/packages/apollo-common/package.json b/packages/apollo-common/package.json index 7ab0b795b..698d3bed9 100644 --- a/packages/apollo-common/package.json +++ b/packages/apollo-common/package.json @@ -6,13 +6,14 @@ "url": "https://github.com/GMOD/Apollo3.git", "directory": "packages/apollo-common" }, - "main": "./dist/index.js", + "type": "module", + "exports": "./dist/index.js", "scripts": { - "build": "tsc" + "build": "tsc --build" }, "dependencies": { "@apollo-annotation/schemas": "workspace:^", - "@jbrowse/core": "^3.6.5", + "@jbrowse/core": "^4.1.1", "bson-objectid": "^2.0.4", "tslib": "^2.3.1" }, diff --git a/packages/apollo-common/src/AssemblySpecificChange.ts b/packages/apollo-common/src/AssemblySpecificChange.ts index a167d95f6..4bb8b3437 100644 --- a/packages/apollo-common/src/AssemblySpecificChange.ts +++ b/packages/apollo-common/src/AssemblySpecificChange.ts @@ -7,7 +7,7 @@ import { type ChangeOptions, type SerializedChange, isChange, -} from './Change' +} from './Change.js' export interface SerializedAssemblySpecificChange extends SerializedChange { assembly: string @@ -42,7 +42,7 @@ export abstract class AssemblySpecificChange extends Change { attributes instanceof Map ? attributes.get(additionalId) : attributes?.[additionalId] - if (idValue) { + if (idValue?.[0]) { indexedIds.push(idValue[0]) } } diff --git a/packages/apollo-common/src/Change.ts b/packages/apollo-common/src/Change.ts index 7dbdfe76f..22037625a 100644 --- a/packages/apollo-common/src/Change.ts +++ b/packages/apollo-common/src/Change.ts @@ -10,13 +10,13 @@ import { } from '@apollo-annotation/mst' import { type AppRootModel, type Region } from '@jbrowse/core/util' -import { changeRegistry } from './ChangeTypeRegistry' +import { changeRegistry } from './ChangeTypeRegistry.js' import { type BackendDataStore, Operation, type OperationOptions, type SerializedOperation, -} from './Operation' +} from './Operation.js' export interface ClientDataStore { typeName: 'Client' diff --git a/packages/apollo-common/src/ChangeTypeRegistry.ts b/packages/apollo-common/src/ChangeTypeRegistry.ts index e6541a5c0..97d839a41 100644 --- a/packages/apollo-common/src/ChangeTypeRegistry.ts +++ b/packages/apollo-common/src/ChangeTypeRegistry.ts @@ -1,4 +1,4 @@ -import { type Change } from './Change' +import { type Change } from './Change.js' // eslint-disable-next-line @typescript-eslint/no-explicit-any type ChangeType = new (...args: any[]) => Change diff --git a/packages/apollo-common/src/CheckRegistry.ts b/packages/apollo-common/src/CheckRegistry.ts index 629afc750..25400ac39 100644 --- a/packages/apollo-common/src/CheckRegistry.ts +++ b/packages/apollo-common/src/CheckRegistry.ts @@ -1,4 +1,4 @@ -import { type Check } from './Check' +import { type Check } from './Check.js' class CheckRegistry { checks = new Map() diff --git a/packages/apollo-common/src/FeatureChange.ts b/packages/apollo-common/src/FeatureChange.ts index 78a710ef4..abc01387a 100644 --- a/packages/apollo-common/src/FeatureChange.ts +++ b/packages/apollo-common/src/FeatureChange.ts @@ -9,8 +9,8 @@ import { AssemblySpecificChange, type SerializedAssemblySpecificChange, isAssemblySpecificChange, -} from './AssemblySpecificChange' -import { type ChangeOptions } from './Change' +} from './AssemblySpecificChange.js' +import { type ChangeOptions } from './Change.js' export interface SerializedFeatureChange extends SerializedAssemblySpecificChange { diff --git a/packages/apollo-common/src/OperationTypeRegistry.ts b/packages/apollo-common/src/OperationTypeRegistry.ts index 50bb6bf0d..6db6ce675 100644 --- a/packages/apollo-common/src/OperationTypeRegistry.ts +++ b/packages/apollo-common/src/OperationTypeRegistry.ts @@ -1,4 +1,4 @@ -import { type Operation } from './Operation' +import { type Operation } from './Operation.js' // eslint-disable-next-line @typescript-eslint/no-explicit-any type OperationType = new (...args: any[]) => Operation diff --git a/packages/apollo-common/src/Validation.ts b/packages/apollo-common/src/Validation.ts index d761f3122..805e06461 100644 --- a/packages/apollo-common/src/Validation.ts +++ b/packages/apollo-common/src/Validation.ts @@ -4,7 +4,7 @@ import { type ExecutionContext } from '@nestjs/common' import { type Reflector } from '@nestjs/core' import { type ClientSession, type Model } from 'mongoose' -import { type Change, type ClientDataStore } from './Change' +import { type Change, type ClientDataStore } from './Change.js' export interface Context { context: ExecutionContext diff --git a/packages/apollo-common/src/declare.d.ts b/packages/apollo-common/src/declare.d.ts new file mode 100644 index 000000000..10b14280c --- /dev/null +++ b/packages/apollo-common/src/declare.d.ts @@ -0,0 +1,29 @@ +declare module 'bson-objectid' { + import { type Buffer } from 'node:buffer' + + export default ObjectID + + declare const ObjectID: ObjectIDCtor + + declare interface ObjectID { + readonly id: string + readonly str: string + + toHexString(): string + equals(other: ObjectID): boolean + getTimestamp(): Date + } + + declare interface ObjectIDCtor { + (hexStringOrIdStringOrArrayOrBuffer?: string | number[] | Buffer): ObjectID + + new ( + hexStringOrIdStringOrArrayOrBuffer?: string | number[] | Buffer, + ): ObjectID + + createFromTime(time: number): ObjectID + createFromHexString(hexString: string): ObjectID + isValid(hexStringOrObjectID: string | ObjectID): boolean + toString(): string + } +} diff --git a/packages/apollo-common/src/index.ts b/packages/apollo-common/src/index.ts index ba38067a0..5723da9ff 100644 --- a/packages/apollo-common/src/index.ts +++ b/packages/apollo-common/src/index.ts @@ -1,10 +1,10 @@ -export * from './ApolloPlugin' -export * from './AssemblySpecificChange' -export * from './Change' -export * from './ChangeTypeRegistry' -export * from './Check' -export * from './CheckRegistry' -export * from './FeatureChange' -export * from './Operation' -export * from './OperationTypeRegistry' -export * from './Validation' +export * from './ApolloPlugin.js' +export * from './AssemblySpecificChange.js' +export * from './Change.js' +export * from './ChangeTypeRegistry.js' +export * from './Check.js' +export * from './CheckRegistry.js' +export * from './FeatureChange.js' +export * from './Operation.js' +export * from './OperationTypeRegistry.js' +export * from './Validation.js' diff --git a/packages/apollo-common/tsconfig.json b/packages/apollo-common/tsconfig.json index 5de18f4c6..6b4ef94f8 100644 --- a/packages/apollo-common/tsconfig.json +++ b/packages/apollo-common/tsconfig.json @@ -5,13 +5,10 @@ "incremental": true, "outDir": "./dist", "rootDir": "./src", - "target": "ES2019", - "lib": ["ES2019", "DOM"], - "module": "CommonJS", "tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo", - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "strictPropertyInitialization": false, + // For nodejs: + "lib": ["esnext"], + "types": ["node"], }, "include": ["./src"], "references": [{ "path": "../apollo-schemas" }, { "path": "../apollo-mst" }], diff --git a/packages/apollo-mst/package.json b/packages/apollo-mst/package.json index 8b5ffecfe..726464e30 100644 --- a/packages/apollo-mst/package.json +++ b/packages/apollo-mst/package.json @@ -7,7 +7,7 @@ "build": "tsc" }, "dependencies": { - "@jbrowse/core": "^3.6.5", + "@jbrowse/core": "^4.1.1", "mobx": "^6.6.1", "mobx-state-tree": "^5.4.0", "react-dom": "^18.2.0", diff --git a/packages/apollo-shared/package.json b/packages/apollo-shared/package.json index 45cd03ec9..49d957f30 100644 --- a/packages/apollo-shared/package.json +++ b/packages/apollo-shared/package.json @@ -15,7 +15,7 @@ "@apollo-annotation/schemas": "workspace:^", "@gmod/gff": "^2.0.0", "@gmod/indexedfasta": "^2.0.4", - "@jbrowse/core": "^3.6.5", + "@jbrowse/core": "^4.1.1", "bson-objectid": "^2.0.4", "generic-filehandle": "^3.0.0", "jwt-decode": "^3.1.2", diff --git a/packages/jbrowse-plugin-apollo/package.json b/packages/jbrowse-plugin-apollo/package.json index c60454bec..a0bcea846 100644 --- a/packages/jbrowse-plugin-apollo/package.json +++ b/packages/jbrowse-plugin-apollo/package.json @@ -72,7 +72,7 @@ }, "devDependencies": { "@jbrowse/cli": "^3.6.5", - "@jbrowse/core": "^3.6.5", + "@jbrowse/core": "^4.1.1", "@jbrowse/development-tools": "^2.2.1", "@jest/globals": "^29.0.3", "@mui/material": "^7.0.0", @@ -110,7 +110,7 @@ "typescript": "^5.5.3" }, "peerDependencies": { - "@jbrowse/core": "^3.0.1", + "@jbrowse/core": "^4.1.1", "@mui/material": "^7.0.0", "mobx": "^6.6.1", "mobx-react": "^9.0.0", diff --git a/yarn.lock b/yarn.lock index bea9e08f0..08416a7c2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -376,7 +376,7 @@ __metadata: "@emotion/styled": "npm:^11.10.6" "@gmod/gff": "npm:^2.0.0" "@gmod/indexedfasta": "npm:^2.0.4" - "@jbrowse/core": "npm:^3.6.5" + "@jbrowse/core": "npm:^4.1.1" "@mui/material": "npm:^7.0.0" "@nestjs/cli": "npm:^10.1.10" "@nestjs/common": "npm:^10.1.0" @@ -457,7 +457,7 @@ __metadata: "@apollo-annotation/mst": "workspace:^" "@apollo-annotation/schemas": "workspace:^" "@gmod/gff": "npm:^2.0.0" - "@jbrowse/core": "npm:^3.6.5" + "@jbrowse/core": "npm:^4.1.1" "@nestjs/common": "npm:^10.1.0" "@nestjs/core": "npm:^10.1.0" "@types/node": "npm:^24.10.9" @@ -491,7 +491,7 @@ __metadata: "@emotion/styled": "npm:^11.10.6" "@gmod/gff": "npm:^2.0.0" "@jbrowse/cli": "npm:^3.6.5" - "@jbrowse/core": "npm:^3.6.5" + "@jbrowse/core": "npm:^4.1.1" "@jbrowse/development-tools": "npm:^2.2.1" "@jbrowse/plugin-authentication": "npm:^3.6.5" "@jbrowse/plugin-linear-genome-view": "npm:^3.6.5" @@ -543,7 +543,7 @@ __metadata: tss-react: "npm:^4.6.1" typescript: "npm:^5.5.3" peerDependencies: - "@jbrowse/core": ^3.0.1 + "@jbrowse/core": ^4.1.1 "@mui/material": ^7.0.0 mobx: ^6.6.1 mobx-react: ^9.0.0 @@ -560,7 +560,7 @@ __metadata: version: 0.0.0-use.local resolution: "@apollo-annotation/mst@workspace:packages/apollo-mst" dependencies: - "@jbrowse/core": "npm:^3.6.5" + "@jbrowse/core": "npm:^4.1.1" mobx: "npm:^6.6.1" mobx-state-tree: "npm:^5.4.0" react-dom: "npm:^18.2.0" @@ -596,7 +596,7 @@ __metadata: "@apollo-annotation/schemas": "workspace:^" "@gmod/gff": "npm:^2.0.0" "@gmod/indexedfasta": "npm:^2.0.4" - "@jbrowse/core": "npm:^3.6.5" + "@jbrowse/core": "npm:^4.1.1" "@nestjs/common": "npm:^10.1.0" "@nestjs/core": "npm:^10.1.0" "@types/chai": "npm:^4.3.19" @@ -4667,6 +4667,13 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.28.4": + version: 7.28.6 + resolution: "@babel/runtime@npm:7.28.6" + checksum: 10c0/358cf2429992ac1c466df1a21c1601d595c46930a13c1d4662fde908d44ee78ec3c183aaff513ecb01ef8c55c3624afe0309eeeb34715672dbfadb7feedb2c0d + languageName: node + linkType: hard + "@babel/template@npm:^7.22.15, @babel/template@npm:^7.22.5, @babel/template@npm:^7.3.3": version: 7.22.15 resolution: "@babel/template@npm:7.22.15" @@ -5503,6 +5510,25 @@ __metadata: languageName: node linkType: hard +"@emotion/babel-plugin@npm:^11.13.5": + version: 11.13.5 + resolution: "@emotion/babel-plugin@npm:11.13.5" + dependencies: + "@babel/helper-module-imports": "npm:^7.16.7" + "@babel/runtime": "npm:^7.18.3" + "@emotion/hash": "npm:^0.9.2" + "@emotion/memoize": "npm:^0.9.0" + "@emotion/serialize": "npm:^1.3.3" + babel-plugin-macros: "npm:^3.1.0" + convert-source-map: "npm:^1.5.0" + escape-string-regexp: "npm:^4.0.0" + find-root: "npm:^1.1.0" + source-map: "npm:^0.5.7" + stylis: "npm:4.2.0" + checksum: 10c0/8ccbfec7defd0e513cb8a1568fa179eac1e20c35fda18aed767f6c59ea7314363ebf2de3e9d2df66c8ad78928dc3dceeded84e6fa8059087cae5c280090aeeeb + languageName: node + linkType: hard + "@emotion/cache@npm:*, @emotion/cache@npm:^11.11.0": version: 11.11.0 resolution: "@emotion/cache@npm:11.11.0" @@ -5587,6 +5613,27 @@ __metadata: languageName: node linkType: hard +"@emotion/react@npm:^11.14.0": + version: 11.14.0 + resolution: "@emotion/react@npm:11.14.0" + dependencies: + "@babel/runtime": "npm:^7.18.3" + "@emotion/babel-plugin": "npm:^11.13.5" + "@emotion/cache": "npm:^11.14.0" + "@emotion/serialize": "npm:^1.3.3" + "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.2.0" + "@emotion/utils": "npm:^1.4.2" + "@emotion/weak-memoize": "npm:^0.4.0" + hoist-non-react-statics: "npm:^3.3.1" + peerDependencies: + react: ">=16.8.0" + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 10c0/d0864f571a9f99ec643420ef31fde09e2006d3943a6aba079980e4d5f6e9f9fecbcc54b8f617fe003c00092ff9d5241179149ffff2810cb05cf72b4620cfc031 + languageName: node + linkType: hard + "@emotion/serialize@npm:*, @emotion/serialize@npm:^1.1.2": version: 1.1.2 resolution: "@emotion/serialize@npm:1.1.2" @@ -5670,6 +5717,15 @@ __metadata: languageName: node linkType: hard +"@emotion/use-insertion-effect-with-fallbacks@npm:^1.2.0": + version: 1.2.0 + resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.2.0" + peerDependencies: + react: ">=16.8.0" + checksum: 10c0/074dbc92b96bdc09209871070076e3b0351b6b47efefa849a7d9c37ab142130767609ca1831da0055988974e3b895c1de7606e4c421fecaa27c3e56a2afd3b08 + languageName: node + linkType: hard + "@emotion/utils@npm:*, @emotion/utils@npm:^1.2.1": version: 1.2.1 resolution: "@emotion/utils@npm:1.2.1" @@ -5967,6 +6023,15 @@ __metadata: languageName: node linkType: hard +"@floating-ui/core@npm:^1.7.3": + version: 1.7.3 + resolution: "@floating-ui/core@npm:1.7.3" + dependencies: + "@floating-ui/utils": "npm:^0.2.10" + checksum: 10c0/edfc23800122d81df0df0fb780b7328ae6c5f00efbb55bd48ea340f4af8c5b3b121ceb4bb81220966ab0f87b443204d37105abdd93d94846468be3243984144c + languageName: node + linkType: hard + "@floating-ui/dom@npm:^1.0.0": version: 1.6.13 resolution: "@floating-ui/dom@npm:1.6.13" @@ -5987,6 +6052,16 @@ __metadata: languageName: node linkType: hard +"@floating-ui/dom@npm:^1.7.4": + version: 1.7.4 + resolution: "@floating-ui/dom@npm:1.7.4" + dependencies: + "@floating-ui/core": "npm:^1.7.3" + "@floating-ui/utils": "npm:^0.2.10" + checksum: 10c0/da6166c25f9b0729caa9f498685a73a0e28251613b35d27db8de8014bc9d045158a23c092b405321a3d67c2064909b6e2a7e6c1c9cc0f62967dca5779f5aef30 + languageName: node + linkType: hard + "@floating-ui/react-dom@npm:^2.0.2": version: 2.0.2 resolution: "@floating-ui/react-dom@npm:2.0.2" @@ -6011,6 +6086,18 @@ __metadata: languageName: node linkType: hard +"@floating-ui/react-dom@npm:^2.1.6": + version: 2.1.6 + resolution: "@floating-ui/react-dom@npm:2.1.6" + dependencies: + "@floating-ui/dom": "npm:^1.7.4" + peerDependencies: + react: ">=16.8.0" + react-dom: ">=16.8.0" + checksum: 10c0/6654834a8e73ecbdbc6cad2ad8f7abc698ac7c1800ded4d61113525c591c03d2e3b59d3cf9205859221465ea38c87af4f9e6e204703c5b7a7e85332d1eef2e18 + languageName: node + linkType: hard + "@floating-ui/react@npm:^0.27.0": version: 0.27.4 resolution: "@floating-ui/react@npm:0.27.4" @@ -6025,6 +6112,20 @@ __metadata: languageName: node linkType: hard +"@floating-ui/react@npm:^0.27.16": + version: 0.27.16 + resolution: "@floating-ui/react@npm:0.27.16" + dependencies: + "@floating-ui/react-dom": "npm:^2.1.6" + "@floating-ui/utils": "npm:^0.2.10" + tabbable: "npm:^6.0.0" + peerDependencies: + react: ">=17.0.0" + react-dom: ">=17.0.0" + checksum: 10c0/a026266d8875e69de1ac1e1a00588660c8ee299c1e7d067c5c5fd1d69a46fd10acff5dd6cb66c3fe40a3347b443234309ba95f5b33d49059d0cda121f558f566 + languageName: node + linkType: hard + "@floating-ui/utils@npm:^0.1.3": version: 0.1.6 resolution: "@floating-ui/utils@npm:0.1.6" @@ -6032,6 +6133,13 @@ __metadata: languageName: node linkType: hard +"@floating-ui/utils@npm:^0.2.10": + version: 0.2.10 + resolution: "@floating-ui/utils@npm:0.2.10" + checksum: 10c0/e9bc2a1730ede1ee25843937e911ab6e846a733a4488623cd353f94721b05ec2c9ec6437613a2ac9379a94c2fd40c797a2ba6fa1df2716f5ce4aa6ddb1cf9ea4 + languageName: node + linkType: hard + "@floating-ui/utils@npm:^0.2.9": version: 0.2.9 resolution: "@floating-ui/utils@npm:0.2.9" @@ -6046,7 +6154,7 @@ __metadata: languageName: node linkType: hard -"@gmod/abortable-promise-cache@npm:^3.0.1": +"@gmod/abortable-promise-cache@npm:^3.0.1, @gmod/abortable-promise-cache@npm:^3.0.4": version: 3.0.4 resolution: "@gmod/abortable-promise-cache@npm:3.0.4" checksum: 10c0/e25d32d5845a8a443caf787f1931f0b79a5e86c7d22d8b398d677120ef91a65fec7ffd90098e7248ee1176981ea36515737c7125d54f15ab40328ed42f099408 @@ -6075,6 +6183,16 @@ __metadata: languageName: node linkType: hard +"@gmod/bgzf-filehandle@npm:^6.0.12": + version: 6.0.12 + resolution: "@gmod/bgzf-filehandle@npm:6.0.12" + dependencies: + generic-filehandle2: "npm:^2.0.18" + pako-esm2: "npm:^2.0.2" + checksum: 10c0/b1114b8e4a30921ce34043d3dafe2b08ded0b8d91dae01fc98108e3ce361d713fcc6c50d8d639b08d41dde2626c3fe170aef0e7a531893bf6a536dcc7b7d7a72 + languageName: node + linkType: hard + "@gmod/gff@npm:^2.0.0": version: 2.0.0 resolution: "@gmod/gff@npm:2.0.0" @@ -6091,6 +6209,15 @@ __metadata: languageName: node linkType: hard +"@gmod/http-range-fetcher@npm:^5.0.7": + version: 5.0.7 + resolution: "@gmod/http-range-fetcher@npm:5.0.7" + dependencies: + "@jbrowse/quick-lru": "npm:^7.0.0" + checksum: 10c0/1c99bc55ad39edfcdbacab728ad33685c1e1020ca5057dfea4247d8b93bc87cb0c2894ed357f9ed579d6476a8c8f1bb4e31e2bca69ed934820c89b4148ff80d6 + languageName: node + linkType: hard + "@gmod/indexedfasta@npm:^2.0.4": version: 2.1.0 resolution: "@gmod/indexedfasta@npm:2.1.0" @@ -6344,6 +6471,51 @@ __metadata: languageName: node linkType: hard +"@jbrowse/core@npm:^4.1.1": + version: 4.1.1 + resolution: "@jbrowse/core@npm:4.1.1" + dependencies: + "@emotion/react": "npm:^11.14.0" + "@emotion/serialize": "npm:^1.3.3" + "@emotion/utils": "npm:^1.4.2" + "@floating-ui/react": "npm:^0.27.16" + "@gmod/abortable-promise-cache": "npm:^3.0.4" + "@gmod/bgzf-filehandle": "npm:^6.0.12" + "@gmod/http-range-fetcher": "npm:^5.0.7" + "@jbrowse/jexl": "npm:^3.0.1" + "@jbrowse/mobx-state-tree": "npm:^5.5.0" + "@jbrowse/quick-lru": "npm:^7.3.5" + "@leeoniya/ufuzzy": "npm:^1.0.19" + "@mui/icons-material": "npm:^7.3.7" + "@mui/material": "npm:^7.3.7" + "@mui/system": "npm:^7.3.7" + "@mui/types": "npm:^7.4.10" + "@mui/x-data-grid": "npm:^8.26.0" + "@types/file-saver-es": "npm:^2.0.3" + canvas-sequencer-ts: "npm:^3.1.3" + canvas2svg: "npm:^1.0.16" + copy-to-clipboard: "npm:^3.3.3" + deepmerge: "npm:^4.3.1" + detect-node: "npm:^2.1.0" + dompurify: "npm:^3.3.1" + escape-html: "npm:^1.0.3" + fast-deep-equal: "npm:^3.1.3" + file-saver-es: "npm:^2.0.5" + generic-filehandle2: "npm:^2.0.18" + idb: "npm:^8.0.3" + librpc-web-mod: "npm:^2.1.1" + mobx: "npm:^6.15.0" + mobx-react: "npm:^9.2.1" + react-draggable: "npm:^4.5.0" + rxjs: "npm:^7.8.2" + source-map-js: "npm:^1.2.1" + peerDependencies: + react: ">=18.0.0" + react-dom: ">=18.0.0" + checksum: 10c0/4a3293387ff4b48f8036711fdfb4ff5131770fdcde9090318dd519937b8a0091273c537b42bf4ab6c5e6ca21758d6c7012ba69ef0068c22f66c8760784759595 + languageName: node + linkType: hard + "@jbrowse/development-tools@npm:^2.2.1": version: 2.2.1 resolution: "@jbrowse/development-tools@npm:2.2.1" @@ -6378,6 +6550,22 @@ __metadata: languageName: node linkType: hard +"@jbrowse/jexl@npm:^3.0.1": + version: 3.0.1 + resolution: "@jbrowse/jexl@npm:3.0.1" + checksum: 10c0/1b2ac6deea99181e1739c7356f7d645931780549576f71d991e520a8ffa19a3cf9ac482583e9c7c26756fe3e084f3a8e7534c052fac9f4015d9ea25366db468c + languageName: node + linkType: hard + +"@jbrowse/mobx-state-tree@npm:^5.5.0": + version: 5.5.0 + resolution: "@jbrowse/mobx-state-tree@npm:5.5.0" + peerDependencies: + mobx: ^6.3.0 + checksum: 10c0/958983a95bd0e054f72f3e40c3dae9fe438333078441c481da358b290c7bb2abd3fd4e6ca6158ef107296ad889a6c3eb85c224b14c5d13d086a082a7e013f434 + languageName: node + linkType: hard + "@jbrowse/plugin-authentication@npm:^3.6.5": version: 3.6.5 resolution: "@jbrowse/plugin-authentication@npm:3.6.5" @@ -6418,6 +6606,13 @@ __metadata: languageName: node linkType: hard +"@jbrowse/quick-lru@npm:^7.0.0, @jbrowse/quick-lru@npm:^7.3.5": + version: 7.3.5 + resolution: "@jbrowse/quick-lru@npm:7.3.5" + checksum: 10c0/700c090a134c9baf92de2b046c4ed8daecdb9f6340865178d47c13567cb0f0881434ba6d4c89df17d4af9f361a50db1f55b93d19c997779fb5e370f3f5a2c62a + languageName: node + linkType: hard + "@jest/console@npm:^29.7.0": version: 29.7.0 resolution: "@jest/console@npm:29.7.0" @@ -6775,7 +6970,7 @@ __metadata: languageName: node linkType: hard -"@leeoniya/ufuzzy@npm:^1.0.18": +"@leeoniya/ufuzzy@npm:^1.0.18, @leeoniya/ufuzzy@npm:^1.0.19": version: 1.0.19 resolution: "@leeoniya/ufuzzy@npm:1.0.19" checksum: 10c0/a8d36a2672565d92a3ff41dff335b02bc3ee8c27974e7f680da9e19457702e8b39b0132ad5c480ee064acc9871f590672e23533c492ea68b20a0fb4c32a116c6 @@ -6910,6 +7105,13 @@ __metadata: languageName: node linkType: hard +"@mui/core-downloads-tracker@npm:^7.3.7": + version: 7.3.7 + resolution: "@mui/core-downloads-tracker@npm:7.3.7" + checksum: 10c0/a1352bb47e1d9dc8dad3c33f7f2f8e544806d7a2de40049a3f24cbde8c7a101b6d54fcd251bd0051ab55303ffef1355eb567c8cf5447918797ea0ca920b1a097 + languageName: node + linkType: hard + "@mui/icons-material@npm:^6.5.0": version: 6.5.0 resolution: "@mui/icons-material@npm:6.5.0" @@ -6942,6 +7144,22 @@ __metadata: languageName: node linkType: hard +"@mui/icons-material@npm:^7.3.7": + version: 7.3.7 + resolution: "@mui/icons-material@npm:7.3.7" + dependencies: + "@babel/runtime": "npm:^7.28.4" + peerDependencies: + "@mui/material": ^7.3.7 + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 10c0/902a2a942539ac577c0cc9dfce09bed383362eb9e68c8dc6dff179c377ec685b2ae7032baf9ef04ba4ab595302a13455ae2c24ea22fd0ed28768c3b20c62b210 + languageName: node + linkType: hard + "@mui/material@npm:^5.0.0": version: 5.14.13 resolution: "@mui/material@npm:5.14.13" @@ -7011,6 +7229,42 @@ __metadata: languageName: node linkType: hard +"@mui/material@npm:^7.3.7": + version: 7.3.7 + resolution: "@mui/material@npm:7.3.7" + dependencies: + "@babel/runtime": "npm:^7.28.4" + "@mui/core-downloads-tracker": "npm:^7.3.7" + "@mui/system": "npm:^7.3.7" + "@mui/types": "npm:^7.4.10" + "@mui/utils": "npm:^7.3.7" + "@popperjs/core": "npm:^2.11.8" + "@types/react-transition-group": "npm:^4.4.12" + clsx: "npm:^2.1.1" + csstype: "npm:^3.2.3" + prop-types: "npm:^15.8.1" + react-is: "npm:^19.2.3" + react-transition-group: "npm:^4.4.5" + peerDependencies: + "@emotion/react": ^11.5.0 + "@emotion/styled": ^11.3.0 + "@mui/material-pigment-css": ^7.3.7 + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true + "@mui/material-pigment-css": + optional: true + "@types/react": + optional: true + checksum: 10c0/e9355505d34cea112f9aef2498af415666b12a78985ec5a936918d14202ef10e7da7cce9d5480dca86af25e307424d93e6d72b04c78446b3fd70536cc5559c62 + languageName: node + linkType: hard + "@mui/private-theming@npm:^5.14.13": version: 5.14.13 resolution: "@mui/private-theming@npm:5.14.13" @@ -7045,6 +7299,23 @@ __metadata: languageName: node linkType: hard +"@mui/private-theming@npm:^7.3.7": + version: 7.3.7 + resolution: "@mui/private-theming@npm:7.3.7" + dependencies: + "@babel/runtime": "npm:^7.28.4" + "@mui/utils": "npm:^7.3.7" + prop-types: "npm:^15.8.1" + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 10c0/aa848bea257f0c4a6a8784ab71aa7189aa31a2a98f02628c783c956a25e759be71a65d7809688c6ac1835504d21e798123aeb3eeaedea1473a16337e60a5d50c + languageName: node + linkType: hard + "@mui/styled-engine@npm:^5.14.13": version: 5.14.13 resolution: "@mui/styled-engine@npm:5.14.13" @@ -7089,6 +7360,29 @@ __metadata: languageName: node linkType: hard +"@mui/styled-engine@npm:^7.3.7": + version: 7.3.7 + resolution: "@mui/styled-engine@npm:7.3.7" + dependencies: + "@babel/runtime": "npm:^7.28.4" + "@emotion/cache": "npm:^11.14.0" + "@emotion/serialize": "npm:^1.3.3" + "@emotion/sheet": "npm:^1.4.0" + csstype: "npm:^3.2.3" + prop-types: "npm:^15.8.1" + peerDependencies: + "@emotion/react": ^11.4.1 + "@emotion/styled": ^11.3.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true + checksum: 10c0/7350f45ea8314643ffc95430b9cc980d0a88d3144629af1deb2842c9aea62d34d8736dfa8197bb51e28785e56144b252fdbb7904c7800d69c547f479bca87805 + languageName: node + linkType: hard + "@mui/system@npm:^5.14.13": version: 5.14.13 resolution: "@mui/system@npm:5.14.13" @@ -7145,6 +7439,34 @@ __metadata: languageName: node linkType: hard +"@mui/system@npm:^7.3.7": + version: 7.3.7 + resolution: "@mui/system@npm:7.3.7" + dependencies: + "@babel/runtime": "npm:^7.28.4" + "@mui/private-theming": "npm:^7.3.7" + "@mui/styled-engine": "npm:^7.3.7" + "@mui/types": "npm:^7.4.10" + "@mui/utils": "npm:^7.3.7" + clsx: "npm:^2.1.1" + csstype: "npm:^3.2.3" + prop-types: "npm:^15.8.1" + peerDependencies: + "@emotion/react": ^11.5.0 + "@emotion/styled": ^11.3.0 + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true + "@types/react": + optional: true + checksum: 10c0/0b020d39812431e29ac20ebc0ce1317750d108633237a27f6fb595824eb1f979ffd283e8a89f2487ea1d658aee18c23d68226f6efa2bdfd621493a4aabcf1e74 + languageName: node + linkType: hard + "@mui/types@npm:^7.2.6": version: 7.2.6 resolution: "@mui/types@npm:7.2.6" @@ -7157,6 +7479,20 @@ __metadata: languageName: node linkType: hard +"@mui/types@npm:^7.4.10": + version: 7.4.10 + resolution: "@mui/types@npm:7.4.10" + dependencies: + "@babel/runtime": "npm:^7.28.4" + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 10c0/2e1e807795dcb6f5bdb62eb49068a7f4414299c62f55ceaaa05925a1d043799216150873c00c02f086fd631f7171c97ea416dc66c099c98649503ee3046dab3d + languageName: node + linkType: hard + "@mui/types@npm:^7.4.6": version: 7.4.6 resolution: "@mui/types@npm:7.4.6" @@ -7209,6 +7545,26 @@ __metadata: languageName: node linkType: hard +"@mui/utils@npm:^7.3.5, @mui/utils@npm:^7.3.7": + version: 7.3.7 + resolution: "@mui/utils@npm:7.3.7" + dependencies: + "@babel/runtime": "npm:^7.28.4" + "@mui/types": "npm:^7.4.10" + "@types/prop-types": "npm:^15.7.15" + clsx: "npm:^2.1.1" + prop-types: "npm:^15.8.1" + react-is: "npm:^19.2.3" + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 10c0/2732a01a24968c8fe73b1cf3c7afabffd8a5f13556f3f8078529eaf09d855a05cb7905421b733cb671f771406eb857f5dddb3b82166ecc2a3d0ab1a987954d08 + languageName: node + linkType: hard + "@mui/x-data-grid@npm:^8.0.0": version: 8.11.2 resolution: "@mui/x-data-grid@npm:8.11.2" @@ -7236,6 +7592,33 @@ __metadata: languageName: node linkType: hard +"@mui/x-data-grid@npm:^8.26.0": + version: 8.26.0 + resolution: "@mui/x-data-grid@npm:8.26.0" + dependencies: + "@babel/runtime": "npm:^7.28.4" + "@mui/utils": "npm:^7.3.5" + "@mui/x-internals": "npm:8.26.0" + "@mui/x-virtualizer": "npm:0.3.3" + clsx: "npm:^2.1.1" + prop-types: "npm:^15.8.1" + use-sync-external-store: "npm:^1.6.0" + peerDependencies: + "@emotion/react": ^11.9.0 + "@emotion/styled": ^11.8.1 + "@mui/material": ^5.15.14 || ^6.0.0 || ^7.0.0 + "@mui/system": ^5.15.14 || ^6.0.0 || ^7.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true + checksum: 10c0/f0197581052f24ee96149f3f03adbcb6de3d7f6fa420105a849fcf68228bced8702e045359063210f1cb7542007da0e8125a34d0d755decf6307d2e7213dd5e4 + languageName: node + linkType: hard + "@mui/x-internals@npm:8.11.2": version: 8.11.2 resolution: "@mui/x-internals@npm:8.11.2" @@ -7250,6 +7633,20 @@ __metadata: languageName: node linkType: hard +"@mui/x-internals@npm:8.26.0": + version: 8.26.0 + resolution: "@mui/x-internals@npm:8.26.0" + dependencies: + "@babel/runtime": "npm:^7.28.4" + "@mui/utils": "npm:^7.3.5" + reselect: "npm:^5.1.1" + use-sync-external-store: "npm:^1.6.0" + peerDependencies: + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + checksum: 10c0/819564e1b1c7626f5e237edd81f716a3871df1479f2e2e9fbef45a5963df21c510eca4931f6af726fdcd9dc643a019e44c5d61657865b389ef0a2ab5abb10d6c + languageName: node + linkType: hard + "@mui/x-virtualizer@npm:0.1.6": version: 0.1.6 resolution: "@mui/x-virtualizer@npm:0.1.6" @@ -7264,6 +7661,20 @@ __metadata: languageName: node linkType: hard +"@mui/x-virtualizer@npm:0.3.3": + version: 0.3.3 + resolution: "@mui/x-virtualizer@npm:0.3.3" + dependencies: + "@babel/runtime": "npm:^7.28.4" + "@mui/utils": "npm:^7.3.5" + "@mui/x-internals": "npm:8.26.0" + peerDependencies: + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0 + checksum: 10c0/b87bf7d9c52a720a2c3d055d4d2a667dce316d1ca3b5a2fbf561996de34cc0ef6051b39368351619bf717527e8ed85ed3bee34f3fa02b74d79f22659067cc491 + languageName: node + linkType: hard + "@napi-rs/wasm-runtime@npm:^0.2.11": version: 0.2.12 resolution: "@napi-rs/wasm-runtime@npm:0.2.12" @@ -9975,6 +10386,13 @@ __metadata: languageName: node linkType: hard +"@types/file-saver-es@npm:^2.0.3": + version: 2.0.3 + resolution: "@types/file-saver-es@npm:2.0.3" + checksum: 10c0/b90c32f98cfa9320e14119845b6fada47d1399f96f5a32999835de271e5a74398988378ca5c7a0b7d1e6fccfb1007b913fc3173ba574070136648e08b3c945d6 + languageName: node + linkType: hard + "@types/file-saver@npm:^2, @types/file-saver@npm:^2.0.1": version: 2.0.5 resolution: "@types/file-saver@npm:2.0.5" @@ -13430,6 +13848,13 @@ __metadata: languageName: node linkType: hard +"canvas-sequencer-ts@npm:^3.1.3": + version: 3.1.3 + resolution: "canvas-sequencer-ts@npm:3.1.3" + checksum: 10c0/d04339b844aa88ebc1e0aacf6480d1de4491d049bc21fc5c6af0a5c56c000025d7b1ec532d998f57136e6175f8ca7141fcfad1800b996f78d280bc110b593b62 + languageName: node + linkType: hard + "canvas-sequencer@npm:^3.1.0": version: 3.1.0 resolution: "canvas-sequencer@npm:3.1.0" @@ -14534,7 +14959,7 @@ __metadata: languageName: node linkType: hard -"copy-to-clipboard@npm:^3.3.1": +"copy-to-clipboard@npm:^3.3.1, copy-to-clipboard@npm:^3.3.3": version: 3.3.3 resolution: "copy-to-clipboard@npm:3.3.3" dependencies: @@ -14988,6 +15413,13 @@ __metadata: languageName: node linkType: hard +"csstype@npm:^3.2.3": + version: 3.2.3 + resolution: "csstype@npm:3.2.3" + checksum: 10c0/cd29c51e70fa822f1cecd8641a1445bed7063697469d35633b516e60fe8c1bde04b08f6c5b6022136bb669b64c63d4173af54864510fbb4ee23281801841a3ce + languageName: node + linkType: hard + "cypress-image-diff-html-report@npm:^2.2.0": version: 2.2.0 resolution: "cypress-image-diff-html-report@npm:2.2.0" @@ -15858,6 +16290,18 @@ __metadata: languageName: node linkType: hard +"dompurify@npm:^3.3.1": + version: 3.3.1 + resolution: "dompurify@npm:3.3.1" + dependencies: + "@types/trusted-types": "npm:^2.0.7" + dependenciesMeta: + "@types/trusted-types": + optional: true + checksum: 10c0/fa0a8c55a436ba0d54389195e3d2337e311f56de709a2fc9efc98dbbc7746fa53bb4b74b6ac043b77a279a8f2ebd8685f0ebaa6e58c9e32e92051d529bc0baf8 + languageName: node + linkType: hard + "domutils@npm:^2.5.2, domutils@npm:^2.8.0": version: 2.8.0 resolution: "domutils@npm:2.8.0" @@ -17826,6 +18270,13 @@ __metadata: languageName: node linkType: hard +"file-saver-es@npm:^2.0.5": + version: 2.0.5 + resolution: "file-saver-es@npm:2.0.5" + checksum: 10c0/ba72dc6d37cdc8d2951882bf37b8e5956fa6b1d218d4f7d74615be33ee651a81bcf3f5980b0a6d9c9c8094ed92aba5f2396554df953b20b1d77e7af9e920fd3e + languageName: node + linkType: hard + "file-saver@npm:^2.0.0, file-saver@npm:^2.0.5": version: 2.0.5 resolution: "file-saver@npm:2.0.5" @@ -18440,6 +18891,13 @@ __metadata: languageName: node linkType: hard +"generic-filehandle2@npm:^2.0.18": + version: 2.0.18 + resolution: "generic-filehandle2@npm:2.0.18" + checksum: 10c0/baffbe01ad89d0194aed5c083f150822b84e4c8c9eee491694e07db911177381c6eeeac2d79207c10841eb467fdf22939a4b433e7e5c9824a74601c14ac9b875 + languageName: node + linkType: hard + "generic-filehandle@npm:^3.0.0": version: 3.1.1 resolution: "generic-filehandle@npm:3.1.1" @@ -19785,6 +20243,13 @@ __metadata: languageName: node linkType: hard +"idb@npm:^8.0.3": + version: 8.0.3 + resolution: "idb@npm:8.0.3" + checksum: 10c0/421cd9a3281b7564528857031cc33fd9e95753f8191e483054cb25d1ceea7303a0d1462f4f69f5b41606f0f066156999e067478abf2460dfcf9cab80dae2a2b2 + languageName: node + linkType: hard + "ieee754@npm:^1.1.13, ieee754@npm:^1.2.1": version: 1.2.1 resolution: "ieee754@npm:1.2.1" @@ -22098,6 +22563,13 @@ __metadata: languageName: node linkType: hard +"librpc-web-mod@npm:^2.1.1": + version: 2.1.1 + resolution: "librpc-web-mod@npm:2.1.1" + checksum: 10c0/2f9383f5e1783b5e9ba0fee433454c4dac47fbf19304a37262aa2c7410c570ab50bcc1c990541cccfb6f45ac9304d8c4d87827aad5dc57e75d84134502179a09 + languageName: node + linkType: hard + "lilconfig@npm:3.0.0": version: 3.0.0 resolution: "lilconfig@npm:3.0.0" @@ -24056,6 +24528,23 @@ __metadata: languageName: node linkType: hard +"mobx-react-lite@npm:^4.1.1": + version: 4.1.1 + resolution: "mobx-react-lite@npm:4.1.1" + dependencies: + use-sync-external-store: "npm:^1.4.0" + peerDependencies: + mobx: ^6.9.0 + react: ^16.8.0 || ^17 || ^18 || ^19 + peerDependenciesMeta: + react-dom: + optional: true + react-native: + optional: true + checksum: 10c0/296b29487dc9fae7b7dd8eb39454d980fcfe59bf4c160ac911faa55469f9ebe2953661efca588f6d7929a2b071f234c7c4d717beaf5819d548be9b58c39874f1 + languageName: node + linkType: hard + "mobx-react@npm:^7.2.1": version: 7.6.0 resolution: "mobx-react@npm:7.6.0" @@ -24090,6 +24579,23 @@ __metadata: languageName: node linkType: hard +"mobx-react@npm:^9.2.1": + version: 9.2.1 + resolution: "mobx-react@npm:9.2.1" + dependencies: + mobx-react-lite: "npm:^4.1.1" + peerDependencies: + mobx: ^6.9.0 + react: ^16.8.0 || ^17 || ^18 || ^19 + peerDependenciesMeta: + react-dom: + optional: true + react-native: + optional: true + checksum: 10c0/5cf4b1625a9682f4a67eec1f13a5f5ca8a022c02df2cbb3f5809d4b45e47a09288644aac76b97c0b60253dd230826da9e78835411e054dd9a40cc62053cf4f49 + languageName: node + linkType: hard + "mobx-state-tree@npm:^5.0.0, mobx-state-tree@npm:^5.4.0": version: 5.4.2 resolution: "mobx-state-tree@npm:5.4.2" @@ -24106,6 +24612,13 @@ __metadata: languageName: node linkType: hard +"mobx@npm:^6.15.0": + version: 6.15.0 + resolution: "mobx@npm:6.15.0" + checksum: 10c0/afbfdc5659caac4ba620d1caca8eb471bbe56746403a8023ae402e27f9e04856394e1529ccf46feb7fdad0c6d695fa1972e8421e7fbfcb1cf453131739a12ac4 + languageName: node + linkType: hard + "mobx@npm:^6.6.1": version: 6.10.2 resolution: "mobx@npm:6.10.2" @@ -25617,6 +26130,13 @@ __metadata: languageName: node linkType: hard +"pako-esm2@npm:^2.0.2": + version: 2.0.2 + resolution: "pako-esm2@npm:2.0.2" + checksum: 10c0/1ef897e621f89131faf93eb572c85f318849d7e633f8e62e7a3a05949547747364feee099f0fc62d3caf494f23fd9f75ebb42083684c4a47e7ba3e2028ed2ef0 + languageName: node + linkType: hard + "pako@npm:^1.0.11": version: 1.0.11 resolution: "pako@npm:1.0.11" @@ -27208,6 +27728,19 @@ __metadata: languageName: node linkType: hard +"react-draggable@npm:^4.5.0": + version: 4.5.0 + resolution: "react-draggable@npm:4.5.0" + dependencies: + clsx: "npm:^2.1.1" + prop-types: "npm:^15.8.1" + peerDependencies: + react: ">= 16.3.0" + react-dom: ">= 16.3.0" + checksum: 10c0/6f7591fe450555218bf0d9e31984be02451bf3f678fb121f51ac0a0a645d01a1b5ea8248ef9afddcd24239028911fd88032194b9c00b30ad5ece76ea13397fc3 + languageName: node + linkType: hard + "react-error-overlay@npm:^6.0.11": version: 6.0.11 resolution: "react-error-overlay@npm:6.0.11" @@ -27279,6 +27812,13 @@ __metadata: languageName: node linkType: hard +"react-is@npm:^19.2.3": + version: 19.2.4 + resolution: "react-is@npm:19.2.4" + checksum: 10c0/477a7cfc900f24194606e315fa353856a3a13487ea8eca841678817cad4daef64339ea0d1e84e58459fc75dbe0d9ba00bb0cc626db3d07e0cf31edc64cb4fa37 + languageName: node + linkType: hard + "react-json-view-lite@npm:^1.2.0": version: 1.4.0 resolution: "react-json-view-lite@npm:1.4.0" @@ -28314,6 +28854,15 @@ __metadata: languageName: node linkType: hard +"rxjs@npm:^7.8.2": + version: 7.8.2 + resolution: "rxjs@npm:7.8.2" + dependencies: + tslib: "npm:^2.1.0" + checksum: 10c0/1fcd33d2066ada98ba8f21fcbbcaee9f0b271de1d38dc7f4e256bfbc6ffcdde68c8bfb69093de7eeb46f24b1fb820620bf0223706cff26b4ab99a7ff7b2e2c45 + languageName: node + linkType: hard + "safe-array-concat@npm:^1.0.1": version: 1.0.1 resolution: "safe-array-concat@npm:1.0.1" @@ -29320,6 +29869,13 @@ __metadata: languageName: node linkType: hard +"source-map-js@npm:^1.2.1": + version: 1.2.1 + resolution: "source-map-js@npm:1.2.1" + checksum: 10c0/7bda1fc4c197e3c6ff17de1b8b2c20e60af81b63a52cb32ec5a5d67a20a7d42651e2cb34ebe93833c5a2a084377e17455854fee3e21e7925c64a51b6a52b0faf + languageName: node + linkType: hard + "source-map-resolve@npm:^0.6.0": version: 0.6.0 resolution: "source-map-resolve@npm:0.6.0" @@ -31788,6 +32344,15 @@ __metadata: languageName: node linkType: hard +"use-sync-external-store@npm:^1.6.0": + version: 1.6.0 + resolution: "use-sync-external-store@npm:1.6.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + checksum: 10c0/35e1179f872a53227bdf8a827f7911da4c37c0f4091c29b76b1e32473d1670ebe7bcd880b808b7549ba9a5605c233350f800ffab963ee4a4ee346ee983b6019b + languageName: node + linkType: hard + "utf8-byte-length@npm:^1.0.1": version: 1.0.4 resolution: "utf8-byte-length@npm:1.0.4" From d8d9ed7c45250eb6e35e3d8dbb9718a96172ab1f Mon Sep 17 00:00:00 2001 From: Garrett Stevens Date: Thu, 29 Jan 2026 04:09:45 +0000 Subject: [PATCH 05/23] Convert apollo-shared to esm --- packages/apollo-shared/package.json | 3 +- .../src/Changes/AddAssemblyAliasesChange.ts | 4 +- .../AddAssemblyAndFeaturesFromFileChange.ts | 12 +-- .../Changes/AddAssemblyFromExternalChange.ts | 3 +- .../src/Changes/AddAssemblyFromFileChange.ts | 7 +- .../src/Changes/AddFeatureChange.ts | 3 +- .../src/Changes/AddFeaturesFromFileChange.ts | 9 +- .../src/Changes/AddRefSeqAliasesChange.ts | 3 + .../src/Changes/DeleteAssemblyChange.ts | 1 + .../src/Changes/DeleteFeatureChange.ts | 2 +- .../src/Changes/FromFileBaseChange.ts | 4 +- .../src/Changes/MergeExonsChange.ts | 6 +- .../src/Changes/MergeTranscriptsChange.ts | 6 +- .../src/Changes/SplitExonChange.ts | 4 +- .../src/Changes/UndoMergeExonsChange.ts | 2 +- .../src/Changes/UndoMergeTranscriptsChange.ts | 2 +- .../src/Changes/UndoSplitExonChange.ts | 4 +- packages/apollo-shared/src/Changes/index.ts | 92 +++++++++---------- packages/apollo-shared/src/Checks/CDSCheck.ts | 2 +- .../src/Checks/TranscriptCheck.ts | 2 +- packages/apollo-shared/src/Checks/index.ts | 4 +- packages/apollo-shared/src/Common/index.ts | 2 +- .../src/GFF3/annotationFeatureToGFF3.test.ts | 4 +- .../src/GFF3/gff3ToAnnotationFeature.test.ts | 4 +- .../src/GFF3/gff3ToAnnotationFeature.ts | 2 +- packages/apollo-shared/src/GFF3/index.ts | 6 +- .../apollo-shared/src/Operations/index.ts | 8 +- .../src/Validations/CoreValidation.ts | 6 +- .../src/Validations/ParentChildValidation.ts | 6 +- .../src/Validations/ValidationSet.ts | 2 +- .../apollo-shared/src/Validations/index.ts | 8 +- packages/apollo-shared/src/declare.d.ts | 58 ++++++++++++ packages/apollo-shared/src/index.ts | 16 ++-- packages/apollo-shared/tsconfig.json | 8 +- 34 files changed, 185 insertions(+), 120 deletions(-) create mode 100644 packages/apollo-shared/src/declare.d.ts diff --git a/packages/apollo-shared/package.json b/packages/apollo-shared/package.json index 49d957f30..0be115b28 100644 --- a/packages/apollo-shared/package.json +++ b/packages/apollo-shared/package.json @@ -1,7 +1,8 @@ { "name": "@apollo-annotation/shared", "version": "0.3.11", - "main": "./dist/index.js", + "type": "module", + "exports": "./dist/index.js", "scripts": { "build": "yarn clean && tsc --build", "clean": "rimraf dist", diff --git a/packages/apollo-shared/src/Changes/AddAssemblyAliasesChange.ts b/packages/apollo-shared/src/Changes/AddAssemblyAliasesChange.ts index 4a5a73d2e..9f59c8152 100644 --- a/packages/apollo-shared/src/Changes/AddAssemblyAliasesChange.ts +++ b/packages/apollo-shared/src/Changes/AddAssemblyAliasesChange.ts @@ -1,3 +1,6 @@ +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +/* eslint-disable @typescript-eslint/no-unsafe-call */ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ import { AssemblySpecificChange, type Change, @@ -30,7 +33,6 @@ export class AddAssemblyAliasesChange extends AssemblySpecificChange { if (!assembly) { throw new Error(`assembly ${this.assembly} not found`) } - // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access assembly.configuration.aliases.set(this.aliases) return Promise.resolve() } diff --git a/packages/apollo-shared/src/Changes/AddAssemblyAndFeaturesFromFileChange.ts b/packages/apollo-shared/src/Changes/AddAssemblyAndFeaturesFromFileChange.ts index 8716ab917..a6e4da918 100644 --- a/packages/apollo-shared/src/Changes/AddAssemblyAndFeaturesFromFileChange.ts +++ b/packages/apollo-shared/src/Changes/AddAssemblyAndFeaturesFromFileChange.ts @@ -1,3 +1,7 @@ +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +/* eslint-disable @typescript-eslint/no-unsafe-argument */ +/* eslint-disable @typescript-eslint/no-unsafe-call */ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/require-await */ import { @@ -7,9 +11,8 @@ import { type SerializedAssemblySpecificChange, type ServerDataStore, } from '@apollo-annotation/common' -import { type GFF3Feature } from '@gmod/gff' -import { FromFileBaseChange } from './FromFileBaseChange' +import { FromFileBaseChange } from './FromFileBaseChange.js' export interface SerializedAddAssemblyAndFeaturesFromFileChangeBase extends SerializedAssemblySpecificChange { @@ -116,10 +119,7 @@ export class AddAssemblyAndFeaturesFromFileChange extends FromFileBaseChange { filesService.getFileStream(fileDoc), { bufferSize }, ) - // @ts-expect-error type is wrong here - // eslint-disable-next-line @typescript-eslint/await-thenable - for await (const f of featureStream) { - const gff3Feature = f as GFF3Feature + for await (const gff3Feature of featureStream) { logger.verbose?.(`ENTRY=${JSON.stringify(gff3Feature)}`) // Add new feature into database await this.addFeatureIntoDb(gff3Feature, backend) diff --git a/packages/apollo-shared/src/Changes/AddAssemblyFromExternalChange.ts b/packages/apollo-shared/src/Changes/AddAssemblyFromExternalChange.ts index d5e9f9601..d013babf2 100644 --- a/packages/apollo-shared/src/Changes/AddAssemblyFromExternalChange.ts +++ b/packages/apollo-shared/src/Changes/AddAssemblyFromExternalChange.ts @@ -1,4 +1,5 @@ -/* eslint-disable @typescript-eslint/restrict-template-expressions */ +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unnecessary-condition */ /* eslint-disable @typescript-eslint/require-await */ diff --git a/packages/apollo-shared/src/Changes/AddAssemblyFromFileChange.ts b/packages/apollo-shared/src/Changes/AddAssemblyFromFileChange.ts index 40ac528d8..99f034c38 100644 --- a/packages/apollo-shared/src/Changes/AddAssemblyFromFileChange.ts +++ b/packages/apollo-shared/src/Changes/AddAssemblyFromFileChange.ts @@ -1,4 +1,7 @@ -/* eslint-disable @typescript-eslint/restrict-template-expressions */ +/* eslint-disable @typescript-eslint/no-unsafe-call */ +/* eslint-disable @typescript-eslint/no-unsafe-argument */ +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/require-await */ import { type ChangeOptions, @@ -9,7 +12,7 @@ import { } from '@apollo-annotation/common' import { BgzipIndexedFasta } from '@gmod/indexedfasta' -import { FromFileBaseChange } from './FromFileBaseChange' +import { FromFileBaseChange } from './FromFileBaseChange.js' export interface SerializedAddAssemblyFromFileChangeBase extends SerializedAssemblySpecificChange { diff --git a/packages/apollo-shared/src/Changes/AddFeatureChange.ts b/packages/apollo-shared/src/Changes/AddFeatureChange.ts index 814073749..40ecb8b1a 100644 --- a/packages/apollo-shared/src/Changes/AddFeatureChange.ts +++ b/packages/apollo-shared/src/Changes/AddFeatureChange.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/restrict-template-expressions */ /* eslint-disable @typescript-eslint/require-await */ /* eslint-disable @typescript-eslint/no-unnecessary-condition */ @@ -11,7 +12,7 @@ import { } from '@apollo-annotation/common' import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst' -import { DeleteFeatureChange } from './DeleteFeatureChange' +import { DeleteFeatureChange } from './DeleteFeatureChange.js' interface SerializedAddFeatureChangeBase extends SerializedFeatureChange { typeName: 'AddFeatureChange' diff --git a/packages/apollo-shared/src/Changes/AddFeaturesFromFileChange.ts b/packages/apollo-shared/src/Changes/AddFeaturesFromFileChange.ts index 0c0ac8e21..41c70d3f2 100644 --- a/packages/apollo-shared/src/Changes/AddFeaturesFromFileChange.ts +++ b/packages/apollo-shared/src/Changes/AddFeaturesFromFileChange.ts @@ -6,9 +6,8 @@ import { type SerializedAssemblySpecificChange, type ServerDataStore, } from '@apollo-annotation/common' -import { type GFF3Feature } from '@gmod/gff' -import { FromFileBaseChange } from './FromFileBaseChange' +import { FromFileBaseChange } from './FromFileBaseChange.js' export interface SerializedAddFeaturesFromFileChangeBase extends SerializedAssemblySpecificChange { @@ -96,11 +95,7 @@ export class AddFeaturesFromFileChange extends FromFileBaseChange { { bufferSize }, ) let featureCount = 0 - // @ts-expect-error type is wrong here - // eslint-disable-next-line @typescript-eslint/await-thenable - for await (const f of featureStream) { - const gff3Feature = f as GFF3Feature - + for await (const gff3Feature of featureStream) { // Add new feature into database // We cannot use Mongo 'session' / transaction here because Mongo has 16 MB limit for transaction await this.addFeatureIntoDb(gff3Feature, backend) diff --git a/packages/apollo-shared/src/Changes/AddRefSeqAliasesChange.ts b/packages/apollo-shared/src/Changes/AddRefSeqAliasesChange.ts index 12dd935ee..be870c96c 100644 --- a/packages/apollo-shared/src/Changes/AddRefSeqAliasesChange.ts +++ b/packages/apollo-shared/src/Changes/AddRefSeqAliasesChange.ts @@ -1,3 +1,6 @@ +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +/* eslint-disable @typescript-eslint/no-unsafe-call */ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ import { AssemblySpecificChange, type Change, diff --git a/packages/apollo-shared/src/Changes/DeleteAssemblyChange.ts b/packages/apollo-shared/src/Changes/DeleteAssemblyChange.ts index 0803acec0..0f5baa718 100644 --- a/packages/apollo-shared/src/Changes/DeleteAssemblyChange.ts +++ b/packages/apollo-shared/src/Changes/DeleteAssemblyChange.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unsafe-return */ /* eslint-disable @typescript-eslint/require-await */ /* eslint-disable @typescript-eslint/no-unnecessary-condition */ diff --git a/packages/apollo-shared/src/Changes/DeleteFeatureChange.ts b/packages/apollo-shared/src/Changes/DeleteFeatureChange.ts index 3beda2091..713b8b6f0 100644 --- a/packages/apollo-shared/src/Changes/DeleteFeatureChange.ts +++ b/packages/apollo-shared/src/Changes/DeleteFeatureChange.ts @@ -12,7 +12,7 @@ import { import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst' import { type Feature } from '@apollo-annotation/schemas' -import { AddFeatureChange } from './AddFeatureChange' +import { AddFeatureChange } from './AddFeatureChange.js' interface SerializedDeleteFeatureChangeBase extends SerializedFeatureChange { typeName: 'DeleteFeatureChange' diff --git a/packages/apollo-shared/src/Changes/FromFileBaseChange.ts b/packages/apollo-shared/src/Changes/FromFileBaseChange.ts index c74d52f89..d78adeb69 100644 --- a/packages/apollo-shared/src/Changes/FromFileBaseChange.ts +++ b/packages/apollo-shared/src/Changes/FromFileBaseChange.ts @@ -11,7 +11,7 @@ import { } from '@apollo-annotation/schemas' import { type GFF3Feature } from '@gmod/gff' -import { gff3ToAnnotationFeature } from '../GFF3' +import { gff3ToAnnotationFeature } from '../GFF3/index.js' export abstract class FromFileBaseChange extends AssemblySpecificChange { async addRefSeqIntoDb( @@ -37,8 +37,6 @@ export abstract class FromFileBaseChange extends AssemblySpecificChange { logger.debug?.('starting sequence stream') let lineCount = 0 const decoder = new TextDecoder() - // @ts-expect-error type is wrong here - // eslint-disable-next-line @typescript-eslint/await-thenable for await (const data of sequenceStream) { const chunk = decoder.decode(data) lastLineIsIncomplete = !chunk.endsWith('\n') diff --git a/packages/apollo-shared/src/Changes/MergeExonsChange.ts b/packages/apollo-shared/src/Changes/MergeExonsChange.ts index 639ee9a6f..742d2ea43 100644 --- a/packages/apollo-shared/src/Changes/MergeExonsChange.ts +++ b/packages/apollo-shared/src/Changes/MergeExonsChange.ts @@ -12,10 +12,10 @@ import { } from '@apollo-annotation/common' import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst' -import { attributesToRecords, stringifyAttributes } from '../util' +import { attributesToRecords, stringifyAttributes } from '../util.js' -import { findAndDeleteChildFeature } from './DeleteFeatureChange' -import { UndoMergeExonsChange } from './UndoMergeExonsChange' +import { findAndDeleteChildFeature } from './DeleteFeatureChange.js' +import { UndoMergeExonsChange } from './UndoMergeExonsChange.js' interface SerializedMergeExonsChangeBase extends SerializedFeatureChange { typeName: 'MergeExonsChange' diff --git a/packages/apollo-shared/src/Changes/MergeTranscriptsChange.ts b/packages/apollo-shared/src/Changes/MergeTranscriptsChange.ts index f74faba05..083f884bc 100644 --- a/packages/apollo-shared/src/Changes/MergeTranscriptsChange.ts +++ b/packages/apollo-shared/src/Changes/MergeTranscriptsChange.ts @@ -18,10 +18,10 @@ import { type Feature } from '@apollo-annotation/schemas' import { doesIntersect2 } from '@jbrowse/core/util' import { getSnapshot } from 'mobx-state-tree' -import { attributesToRecords, stringifyAttributes } from '../util' +import { attributesToRecords, stringifyAttributes } from '../util.js' -import { findAndDeleteChildFeature } from './DeleteFeatureChange' -import { UndoMergeTranscriptsChange } from './UndoMergeTranscriptsChange' +import { findAndDeleteChildFeature } from './DeleteFeatureChange.js' +import { UndoMergeTranscriptsChange } from './UndoMergeTranscriptsChange.js' interface SerializedMergeTranscriptsChangeBase extends SerializedFeatureChange { typeName: 'MergeTranscriptsChange' diff --git a/packages/apollo-shared/src/Changes/SplitExonChange.ts b/packages/apollo-shared/src/Changes/SplitExonChange.ts index c3a0772a4..bf14c49a3 100644 --- a/packages/apollo-shared/src/Changes/SplitExonChange.ts +++ b/packages/apollo-shared/src/Changes/SplitExonChange.ts @@ -11,8 +11,8 @@ import { } from '@apollo-annotation/common' import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst' -import { findAndDeleteChildFeature } from './DeleteFeatureChange' -import { UndoSplitExonChange } from './UndoSplitExonChange' +import { findAndDeleteChildFeature } from './DeleteFeatureChange.js' +import { UndoSplitExonChange } from './UndoSplitExonChange.js' interface SerializedSplitExonChangeBase extends SerializedFeatureChange { typeName: 'SplitExonChange' diff --git a/packages/apollo-shared/src/Changes/UndoMergeExonsChange.ts b/packages/apollo-shared/src/Changes/UndoMergeExonsChange.ts index 5e191cae6..389a36fde 100644 --- a/packages/apollo-shared/src/Changes/UndoMergeExonsChange.ts +++ b/packages/apollo-shared/src/Changes/UndoMergeExonsChange.ts @@ -10,7 +10,7 @@ import { } from '@apollo-annotation/common' import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst' -import { MergeExonsChange } from './MergeExonsChange' +import { MergeExonsChange } from './MergeExonsChange.js' interface SerializedUndoMergeExonsChangeBase extends SerializedFeatureChange { typeName: 'UndoMergeExonsChange' diff --git a/packages/apollo-shared/src/Changes/UndoMergeTranscriptsChange.ts b/packages/apollo-shared/src/Changes/UndoMergeTranscriptsChange.ts index 2332b8887..6a753393d 100644 --- a/packages/apollo-shared/src/Changes/UndoMergeTranscriptsChange.ts +++ b/packages/apollo-shared/src/Changes/UndoMergeTranscriptsChange.ts @@ -10,7 +10,7 @@ import { } from '@apollo-annotation/common' import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst' -import { MergeTranscriptsChange } from './MergeTranscriptsChange' +import { MergeTranscriptsChange } from './MergeTranscriptsChange.js' interface SerializedUndoMergeTranscriptsChangeBase extends SerializedFeatureChange { diff --git a/packages/apollo-shared/src/Changes/UndoSplitExonChange.ts b/packages/apollo-shared/src/Changes/UndoSplitExonChange.ts index a54b42907..30484d6b3 100644 --- a/packages/apollo-shared/src/Changes/UndoSplitExonChange.ts +++ b/packages/apollo-shared/src/Changes/UndoSplitExonChange.ts @@ -10,8 +10,8 @@ import { } from '@apollo-annotation/common' import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst' -import { findAndDeleteChildFeature } from './DeleteFeatureChange' -import { SplitExonChange } from './SplitExonChange' +import { findAndDeleteChildFeature } from './DeleteFeatureChange.js' +import { SplitExonChange } from './SplitExonChange.js' interface SerializedUndoSplitExonChangeBase extends SerializedFeatureChange { typeName: 'UndoSplitExonChange' diff --git a/packages/apollo-shared/src/Changes/index.ts b/packages/apollo-shared/src/Changes/index.ts index d04d0e82a..ac5ecf25d 100644 --- a/packages/apollo-shared/src/Changes/index.ts +++ b/packages/apollo-shared/src/Changes/index.ts @@ -1,26 +1,26 @@ -import { AddAssemblyAliasesChange } from './AddAssemblyAliasesChange' -import { AddAssemblyAndFeaturesFromFileChange } from './AddAssemblyAndFeaturesFromFileChange' -import { AddAssemblyFromExternalChange } from './AddAssemblyFromExternalChange' -import { AddAssemblyFromFileChange } from './AddAssemblyFromFileChange' -import { AddFeatureChange } from './AddFeatureChange' -import { AddFeaturesFromFileChange } from './AddFeaturesFromFileChange' -import { AddRefSeqAliasesChange } from './AddRefSeqAliasesChange' -import { DeleteAssemblyChange } from './DeleteAssemblyChange' -import { DeleteFeatureChange } from './DeleteFeatureChange' -import { DeleteUserChange } from './DeleteUserChange' -import { FeatureAttributeChange } from './FeatureAttributeChange' -import { ImportJBrowseConfigChange } from './ImportJBrowseConfigChange' -import { LocationEndChange } from './LocationEndChange' -import { LocationStartChange } from './LocationStartChange' -import { MergeExonsChange } from './MergeExonsChange' -import { MergeTranscriptsChange } from './MergeTranscriptsChange' -import { SplitExonChange } from './SplitExonChange' -import { StrandChange } from './StrandChange' -import { TypeChange } from './TypeChange' -import { UndoMergeExonsChange } from './UndoMergeExonsChange' -import { UndoMergeTranscriptsChange } from './UndoMergeTranscriptsChange' -import { UndoSplitExonChange } from './UndoSplitExonChange' -import { UserChange } from './UserChange' +import { AddAssemblyAliasesChange } from './AddAssemblyAliasesChange.js' +import { AddAssemblyAndFeaturesFromFileChange } from './AddAssemblyAndFeaturesFromFileChange.js' +import { AddAssemblyFromExternalChange } from './AddAssemblyFromExternalChange.js' +import { AddAssemblyFromFileChange } from './AddAssemblyFromFileChange.js' +import { AddFeatureChange } from './AddFeatureChange.js' +import { AddFeaturesFromFileChange } from './AddFeaturesFromFileChange.js' +import { AddRefSeqAliasesChange } from './AddRefSeqAliasesChange.js' +import { DeleteAssemblyChange } from './DeleteAssemblyChange.js' +import { DeleteFeatureChange } from './DeleteFeatureChange.js' +import { DeleteUserChange } from './DeleteUserChange.js' +import { FeatureAttributeChange } from './FeatureAttributeChange.js' +import { ImportJBrowseConfigChange } from './ImportJBrowseConfigChange.js' +import { LocationEndChange } from './LocationEndChange.js' +import { LocationStartChange } from './LocationStartChange.js' +import { MergeExonsChange } from './MergeExonsChange.js' +import { MergeTranscriptsChange } from './MergeTranscriptsChange.js' +import { SplitExonChange } from './SplitExonChange.js' +import { StrandChange } from './StrandChange.js' +import { TypeChange } from './TypeChange.js' +import { UndoMergeExonsChange } from './UndoMergeExonsChange.js' +import { UndoMergeTranscriptsChange } from './UndoMergeTranscriptsChange.js' +import { UndoSplitExonChange } from './UndoSplitExonChange.js' +import { UserChange } from './UserChange.js' export const changes = { AddAssemblyAndFeaturesFromFileChange, @@ -48,26 +48,26 @@ export const changes = { AddAssemblyAliasesChange, } -export * from './AddAssemblyAndFeaturesFromFileChange' -export * from './AddAssemblyFromFileChange' -export * from './AddAssemblyFromExternalChange' -export * from './AddFeatureChange' -export * from './AddFeaturesFromFileChange' -export * from './DeleteAssemblyChange' -export * from './DeleteFeatureChange' -export * from './DeleteUserChange' -export * from './FeatureAttributeChange' -export * from './ImportJBrowseConfigChange' -export * from './LocationEndChange' -export * from './LocationStartChange' -export * from './MergeExonsChange' -export * from './SplitExonChange' -export * from './MergeTranscriptsChange' -export * from './UndoMergeExonsChange' -export * from './UndoSplitExonChange' -export * from './UndoMergeTranscriptsChange' -export * from './StrandChange' -export * from './TypeChange' -export * from './UserChange' -export * from './AddRefSeqAliasesChange' -export * from './AddAssemblyAliasesChange' +export * from './AddAssemblyAndFeaturesFromFileChange.js' +export * from './AddAssemblyFromFileChange.js' +export * from './AddAssemblyFromExternalChange.js' +export * from './AddFeatureChange.js' +export * from './AddFeaturesFromFileChange.js' +export * from './DeleteAssemblyChange.js' +export * from './DeleteFeatureChange.js' +export * from './DeleteUserChange.js' +export * from './FeatureAttributeChange.js' +export * from './ImportJBrowseConfigChange.js' +export * from './LocationEndChange.js' +export * from './LocationStartChange.js' +export * from './MergeExonsChange.js' +export * from './SplitExonChange.js' +export * from './MergeTranscriptsChange.js' +export * from './UndoMergeExonsChange.js' +export * from './UndoSplitExonChange.js' +export * from './UndoMergeTranscriptsChange.js' +export * from './StrandChange.js' +export * from './TypeChange.js' +export * from './UserChange.js' +export * from './AddRefSeqAliasesChange.js' +export * from './AddAssemblyAliasesChange.js' diff --git a/packages/apollo-shared/src/Checks/CDSCheck.ts b/packages/apollo-shared/src/Checks/CDSCheck.ts index 1a929ddc2..3cbac2bfe 100644 --- a/packages/apollo-shared/src/Checks/CDSCheck.ts +++ b/packages/apollo-shared/src/Checks/CDSCheck.ts @@ -6,7 +6,7 @@ import { import { intersection2 } from '@jbrowse/core/util' import ObjectID from 'bson-objectid' -import { getPrintableId } from './util' +import { getPrintableId } from './util.js' enum STOP_CODONS { 'TAG', diff --git a/packages/apollo-shared/src/Checks/TranscriptCheck.ts b/packages/apollo-shared/src/Checks/TranscriptCheck.ts index dc569fa85..b3b1745c9 100644 --- a/packages/apollo-shared/src/Checks/TranscriptCheck.ts +++ b/packages/apollo-shared/src/Checks/TranscriptCheck.ts @@ -6,7 +6,7 @@ import { import { revcom } from '@jbrowse/core/util' import ObjectID from 'bson-objectid' -import { getPrintableId } from './util' +import { getPrintableId } from './util.js' interface SpliceSequence { fivePrimeSeq: string diff --git a/packages/apollo-shared/src/Checks/index.ts b/packages/apollo-shared/src/Checks/index.ts index 35fab0527..bd5aad505 100644 --- a/packages/apollo-shared/src/Checks/index.ts +++ b/packages/apollo-shared/src/Checks/index.ts @@ -1,2 +1,2 @@ -export * from './CDSCheck' -export * from './TranscriptCheck' +export * from './CDSCheck.js' +export * from './TranscriptCheck.js' diff --git a/packages/apollo-shared/src/Common/index.ts b/packages/apollo-shared/src/Common/index.ts index d6f93705a..3cfa14e55 100644 --- a/packages/apollo-shared/src/Common/index.ts +++ b/packages/apollo-shared/src/Common/index.ts @@ -1 +1 @@ -export * from './jwtPayload' +export * from './jwtPayload.js' diff --git a/packages/apollo-shared/src/GFF3/annotationFeatureToGFF3.test.ts b/packages/apollo-shared/src/GFF3/annotationFeatureToGFF3.test.ts index 630238c3c..e138bc2a1 100644 --- a/packages/apollo-shared/src/GFF3/annotationFeatureToGFF3.test.ts +++ b/packages/apollo-shared/src/GFF3/annotationFeatureToGFF3.test.ts @@ -7,8 +7,8 @@ import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst' import { formatSync } from '@gmod/gff' import { assert, expect } from 'chai' -import { annotationFeatureToGFF3 } from './annotationFeatureToGFF3' -import { readAnnotationFeatureSnapshot, testCases } from './testUtil' +import { annotationFeatureToGFF3 } from './annotationFeatureToGFF3.js' +import { readAnnotationFeatureSnapshot, testCases } from './testUtil.js' describe('Converts AnnotationFeatureSnapshot JSON to GFF3 when', () => { for (const testCase of testCases) { diff --git a/packages/apollo-shared/src/GFF3/gff3ToAnnotationFeature.test.ts b/packages/apollo-shared/src/GFF3/gff3ToAnnotationFeature.test.ts index ff4de8ab5..2b64c92fa 100644 --- a/packages/apollo-shared/src/GFF3/gff3ToAnnotationFeature.test.ts +++ b/packages/apollo-shared/src/GFF3/gff3ToAnnotationFeature.test.ts @@ -7,8 +7,8 @@ import { type GFF3Feature, parseStringSync } from '@gmod/gff' import { assert, use } from 'chai' import chaiExclude from 'chai-exclude' -import { gff3ToAnnotationFeature } from './gff3ToAnnotationFeature' -import { readAnnotationFeatureSnapshot, testCases } from './testUtil' +import { gff3ToAnnotationFeature } from './gff3ToAnnotationFeature.js' +import { readAnnotationFeatureSnapshot, testCases } from './testUtil.js' use(chaiExclude) diff --git a/packages/apollo-shared/src/GFF3/gff3ToAnnotationFeature.ts b/packages/apollo-shared/src/GFF3/gff3ToAnnotationFeature.ts index 1804dc669..fc4961391 100644 --- a/packages/apollo-shared/src/GFF3/gff3ToAnnotationFeature.ts +++ b/packages/apollo-shared/src/GFF3/gff3ToAnnotationFeature.ts @@ -3,7 +3,7 @@ import { type GFF3Feature, type GFF3FeatureLineWithRefs } from '@gmod/gff' import { doesIntersect2 } from '@jbrowse/core/util' import ObjectID from 'bson-objectid' -import { gffToInternal, isGFFReservedAttribute } from './gffReservedKeys' +import { gffToInternal, isGFFReservedAttribute } from './gffReservedKeys.js' export function gff3ToAnnotationFeature( gff3Feature: GFF3Feature, diff --git a/packages/apollo-shared/src/GFF3/index.ts b/packages/apollo-shared/src/GFF3/index.ts index 45cec9a92..9e8e08ec7 100644 --- a/packages/apollo-shared/src/GFF3/index.ts +++ b/packages/apollo-shared/src/GFF3/index.ts @@ -1,3 +1,3 @@ -export * from './annotationFeatureToGFF3' -export * from './gffReservedKeys' -export * from './gff3ToAnnotationFeature' +export * from './annotationFeatureToGFF3.js' +export * from './gffReservedKeys.js' +export * from './gff3ToAnnotationFeature.js' diff --git a/packages/apollo-shared/src/Operations/index.ts b/packages/apollo-shared/src/Operations/index.ts index 859d4346c..96e42e163 100644 --- a/packages/apollo-shared/src/Operations/index.ts +++ b/packages/apollo-shared/src/Operations/index.ts @@ -1,6 +1,6 @@ -import { GetAssembliesOperation } from './GetAssembliesOperation' -import { GetFeaturesOperation } from './GetFeaturesOperation' +import { GetAssembliesOperation } from './GetAssembliesOperation.js' +import { GetFeaturesOperation } from './GetFeaturesOperation.js' export const operations = { GetAssembliesOperation, GetFeaturesOperation } -export * from './GetAssembliesOperation' -export * from './GetFeaturesOperation' +export * from './GetAssembliesOperation.js' +export * from './GetFeaturesOperation.js' diff --git a/packages/apollo-shared/src/Validations/CoreValidation.ts b/packages/apollo-shared/src/Validations/CoreValidation.ts index e92e93767..1d5467852 100644 --- a/packages/apollo-shared/src/Validations/CoreValidation.ts +++ b/packages/apollo-shared/src/Validations/CoreValidation.ts @@ -1,10 +1,10 @@ /* eslint-disable @typescript-eslint/require-await */ import { type Change } from '@apollo-annotation/common' -import { type TypeChange } from '../Changes' +import { type TypeChange } from '../Changes/index.js' -import { Validation } from './Validation' -import soSequenceTypes from './soSequenceTypes' +import { Validation } from './Validation.js' +import soSequenceTypes from './soSequenceTypes.js' export function isTypeChange(thing: Change): thing is TypeChange { return 'oldType' in thing && 'newType' in thing diff --git a/packages/apollo-shared/src/Validations/ParentChildValidation.ts b/packages/apollo-shared/src/Validations/ParentChildValidation.ts index 670adb26f..afc7aabf8 100644 --- a/packages/apollo-shared/src/Validations/ParentChildValidation.ts +++ b/packages/apollo-shared/src/Validations/ParentChildValidation.ts @@ -9,10 +9,10 @@ import { type LocationStartChange, isLocationEndChange, isLocationStartChange, -} from '../Changes' -import { getPrintableId } from '../util' +} from '../Changes/index.js' +import { getPrintableId } from '../util.js' -import { Validation, type ValidationResult } from './Validation' +import { Validation, type ValidationResult } from './Validation.js' export class ParentChildValidation extends Validation { name = 'ParentChildValidation' as const diff --git a/packages/apollo-shared/src/Validations/ValidationSet.ts b/packages/apollo-shared/src/Validations/ValidationSet.ts index 5a0d62510..aaff41017 100644 --- a/packages/apollo-shared/src/Validations/ValidationSet.ts +++ b/packages/apollo-shared/src/Validations/ValidationSet.ts @@ -6,7 +6,7 @@ import { type Context, type Validation, type ValidationResult, -} from './Validation' +} from './Validation.js' export class ValidationResultSet { results: ValidationResult[] = [] diff --git a/packages/apollo-shared/src/Validations/index.ts b/packages/apollo-shared/src/Validations/index.ts index af1362d56..44916b7f9 100644 --- a/packages/apollo-shared/src/Validations/index.ts +++ b/packages/apollo-shared/src/Validations/index.ts @@ -1,4 +1,4 @@ -export * from './Validation' -export * from './ValidationSet' -export * from './CoreValidation' -export * from './ParentChildValidation' +export * from './Validation.js' +export * from './ValidationSet.js' +export * from './CoreValidation.js' +export * from './ParentChildValidation.js' diff --git a/packages/apollo-shared/src/declare.d.ts b/packages/apollo-shared/src/declare.d.ts new file mode 100644 index 000000000..efa84fc14 --- /dev/null +++ b/packages/apollo-shared/src/declare.d.ts @@ -0,0 +1,58 @@ +declare module 'bson-objectid' { + import { type Buffer } from 'node:buffer' + + export default ObjectID + + declare const ObjectID: ObjectIDCtor + + declare interface ObjectID { + readonly id: string + readonly str: string + + toHexString(): string + equals(other: ObjectID): boolean + getTimestamp(): Date + } + + declare interface ObjectIDCtor { + (hexStringOrIdStringOrArrayOrBuffer?: string | number[] | Buffer): ObjectID + + new ( + hexStringOrIdStringOrArrayOrBuffer?: string | number[] | Buffer, + ): ObjectID + + createFromTime(time: number): ObjectID + createFromHexString(hexString: string): ObjectID + isValid(hexStringOrObjectID: string | ObjectID): boolean + toString(): string + } +} + +declare module 'jwt-decode' { + export class InvalidTokenError extends Error {} + + export interface JwtDecodeOptions { + header?: boolean + } + + export interface JwtHeader { + type?: string + alg?: string + } + + export interface JwtPayload { + iss?: string + sub?: string + aud?: string[] | string + exp?: number + nbf?: number + iat?: number + jti?: string + } + + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters, @typescript-eslint/no-unnecessary-type-constraint + export default function jwtDecode( + token: string, + options?: JwtDecodeOptions, + ): T +} diff --git a/packages/apollo-shared/src/index.ts b/packages/apollo-shared/src/index.ts index 52381ad7a..aa18bbf15 100644 --- a/packages/apollo-shared/src/index.ts +++ b/packages/apollo-shared/src/index.ts @@ -1,8 +1,8 @@ -export * from './Changes' -export * from './Operations' -export * from './Validations' -export * from './Common' -export * from './Checks' -export * from './util' -export * from './Messages' -export * from './GFF3' +export * from './Changes/index.js' +export * from './Operations/index.js' +export * from './Validations/index.js' +export * from './Common/index.js' +export * from './Checks/index.js' +export * from './util.js' +export * from './Messages.js' +export * from './GFF3/index.js' diff --git a/packages/apollo-shared/tsconfig.json b/packages/apollo-shared/tsconfig.json index da86b6f26..21a09645c 100644 --- a/packages/apollo-shared/tsconfig.json +++ b/packages/apollo-shared/tsconfig.json @@ -5,10 +5,12 @@ "incremental": true, "outDir": "./dist", "rootDir": "./src", - "target": "ES2022", - "lib": ["ES2022", "DOM"], - "module": "CommonJS", "tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo", + // TODO: enable this and fix the problems it reveals + "noUncheckedIndexedAccess": false, + // For nodejs: + "lib": ["esnext"], + "types": ["node"], }, "include": ["./src"], "references": [ From 36bd834181daa64e6e869874b20bbcb4f0b26f14 Mon Sep 17 00:00:00 2001 From: Garrett Stevens Date: Thu, 29 Jan 2026 17:37:47 +0000 Subject: [PATCH 06/23] Update esm settings for apollo-cli --- packages/apollo-cli/README.md | 1255 ----------------------------- packages/apollo-cli/package.json | 3 +- packages/apollo-cli/tsconfig.json | 11 +- 3 files changed, 6 insertions(+), 1263 deletions(-) diff --git a/packages/apollo-cli/README.md b/packages/apollo-cli/README.md index a55eff6a2..0fc4741bc 100644 --- a/packages/apollo-cli/README.md +++ b/packages/apollo-cli/README.md @@ -29,972 +29,7 @@ USAGE -- [`apollo assembly add-from-fasta INPUT`](#apollo-assembly-add-from-fasta-input) -- [`apollo assembly add-from-gff INPUT-FILE`](#apollo-assembly-add-from-gff-input-file) -- [`apollo assembly check`](#apollo-assembly-check) -- [`apollo assembly delete`](#apollo-assembly-delete) -- [`apollo assembly get`](#apollo-assembly-get) -- [`apollo assembly sequence`](#apollo-assembly-sequence) -- [`apollo change get`](#apollo-change-get) -- [`apollo config [KEY] [VALUE]`](#apollo-config-key-value) -- [`apollo export gff3 ASSEMBLY`](#apollo-export-gff3-assembly) -- [`apollo feature add [FEATURE-JSON]`](#apollo-feature-add-feature-json) -- [`apollo feature add-child`](#apollo-feature-add-child) -- [`apollo feature check`](#apollo-feature-check) -- [`apollo feature copy`](#apollo-feature-copy) -- [`apollo feature delete`](#apollo-feature-delete) -- [`apollo feature edit`](#apollo-feature-edit) -- [`apollo feature edit-attribute`](#apollo-feature-edit-attribute) -- [`apollo feature edit-coords`](#apollo-feature-edit-coords) -- [`apollo feature edit-type`](#apollo-feature-edit-type) -- [`apollo feature get`](#apollo-feature-get) -- [`apollo feature get-id`](#apollo-feature-get-id) -- [`apollo feature get-indexed-id ID`](#apollo-feature-get-indexed-id-id) -- [`apollo feature import INPUT-FILE`](#apollo-feature-import-input-file) -- [`apollo feature search`](#apollo-feature-search) -- [`apollo file delete`](#apollo-file-delete) -- [`apollo file download`](#apollo-file-download) -- [`apollo file get`](#apollo-file-get) -- [`apollo file upload INPUT-FILE`](#apollo-file-upload-input-file) - [`apollo help [COMMANDS]`](#apollo-help-commands) -- [`apollo jbrowse desktop JBROWSEFILE`](#apollo-jbrowse-desktop-jbrowsefile) -- [`apollo jbrowse get-config`](#apollo-jbrowse-get-config) -- [`apollo jbrowse set-config INPUTFILE`](#apollo-jbrowse-set-config-inputfile) -- [`apollo login`](#apollo-login) -- [`apollo logout`](#apollo-logout) -- [`apollo refseq add-alias INPUT-FILE`](#apollo-refseq-add-alias-input-file) -- [`apollo refseq get`](#apollo-refseq-get) -- [`apollo status`](#apollo-status) -- [`apollo user get`](#apollo-user-get) - -## `apollo assembly add-from-fasta INPUT` - -Add a new assembly from fasta input - -``` -USAGE - $ apollo assembly add-from-fasta INPUT [--profile ] [--config-file ] [-a ] [-f] [-e] [--fai ] - [--gzi ] [-z | -d] - -ARGUMENTS - INPUT Input fasta file, local or remote, or id of a previously uploaded file. For local or remote files, it is - assumed the file is bgzip'd with `bgzip` and indexed with `samtools faidx`. The indexes are assumed to be at - .fai and .gzi unless the options --fai and --gzi are provided. A local file can be - uncompressed if the flag -e/--editable is set (but see below about using -e) - -FLAGS - -a, --assembly= Name for this assembly. Use the file name if omitted - -d, --decompressed For local file input: Override autodetection and instruct that input is decompressed - -e, --editable Instead of using indexed fasta lookup, the sequence is loaded into the Apollo database and - is editable. Use with caution, as editing the sequence often has unintended side effects. - -f, --force Delete existing assembly, if it exists - -z, --gzip For local file input: Override autodetection and instruct that input is gzip compressed - --config-file= Use this config file (mostly for testing) - --fai= Fasta index of the (not-editable) fasta file - --gzi= Gzi index of the (not-editable) fasta file - --profile= Use credentials from this profile - -DESCRIPTION - Add a new assembly from fasta input - - Add new assembly. The input fasta may be: - * A local file bgzip'd and indexed. It can be uncompressed if the -e/--editable is set (but see description of -e) - * An external fasta file bgzip'd and indexed - * The id of a file previously uploaded to Apollo - -EXAMPLES - From local file assuming indexes genome.gz.fai and genome.gz.gzi are present: - - $ apollo assembly add-from-fasta genome.fa.gz -a myAssembly - - Local file with editable sequence does not require compression and indexing: - - $ apollo assembly add-from-fasta genome.fa -a myAssembly - - From external source assuming there are also indexes https://.../genome.fa.gz.fai and https://.../genome.fa.gz.gzi: - - $ apollo assembly add-from-fasta https://.../genome.fa.gz -a myAssembly -``` - -_See code: -[src/commands/assembly/add-from-fasta.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/assembly/add-from-fasta.ts)_ - -## `apollo assembly add-from-gff INPUT-FILE` - -Add new assembly from gff or gft file - -``` -USAGE - $ apollo assembly add-from-gff INPUT-FILE [--profile ] [--config-file ] [-a ] [-o] [-f] - -ARGUMENTS - INPUT-FILE Input gff file - -FLAGS - -a, --assembly= Name for this assembly. Use the file name if omitted - -f, --force Delete existing assembly, if it exists - -o, --omit-features Do not import features, only upload the sequences - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Add new assembly from gff or gft file - - The gff file is expected to contain sequences as per gff specifications. Features are also imported by default. - -EXAMPLES - Import sequences and features: - - $ apollo assembly add-from-gff genome.gff -a myAssembly - - Import sequences only: - - $ apollo assembly add-from-gff genome.gff -a myAssembly -o -``` - -_See code: -[src/commands/assembly/add-from-gff.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/assembly/add-from-gff.ts)_ - -## `apollo assembly check` - -Add, view, or delete checks to assembly - -``` -USAGE - $ apollo assembly check [--profile ] [--config-file ] [-a ] [-c ] [-d] - -FLAGS - -a, --assembly= Manage checks in this assembly - -c, --check=... Add these check names or IDs. If unset, print the checks set for assembly - -d, --delete Delete (instead of adding) checks - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Add, view, or delete checks to assembly - - Manage checks, i.e. the rules ensuring features in an assembly are plausible. This command only sets the checks to - apply, to retrieve features flagged by these checks use `apollo feature check`. - -EXAMPLES - View available check types: - - $ apollo assembly check - - View checks set for assembly hg19: - - $ apollo assembly check -a hg19 - - Add checks to assembly: - - $ apollo assembly check -a hg19 -c CDSCheck - - Delete checks from assembly: - - $ apollo assembly check -a hg19 -c CDSCheck --delete -``` - -_See code: -[src/commands/assembly/check.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/assembly/check.ts)_ - -## `apollo assembly delete` - -Delete assemblies - -``` -USAGE - $ apollo assembly delete -a [--profile ] [--config-file ] [-v] - -FLAGS - -a, --assembly=... (required) Assembly names or IDs to delete - -v, --verbose Print to stdout the array of assemblies deleted - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Delete assemblies - - Assemblies to delete may be names or IDs - -EXAMPLES - Delete multiple assemblies using name or ID: - - $ apollo assembly delete -a mouse 6605826fbd0eee691f83e73f -``` - -_See code: -[src/commands/assembly/delete.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/assembly/delete.ts)_ - -## `apollo assembly get` - -Get available assemblies - -``` -USAGE - $ apollo assembly get [--profile ] [--config-file ] [-a ] - -FLAGS - -a, --assembly=... Get assemblies in this list of names or IDs - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Get available assemblies - - Print to stdout the list of assemblies in json format -``` - -_See code: -[src/commands/assembly/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/assembly/get.ts)_ - -## `apollo assembly sequence` - -Get reference sequence in fasta format - -``` -USAGE - $ apollo assembly sequence [--profile ] [--config-file ] [-a ] [-r ] [-s ] [-e - ] - -FLAGS - -a, --assembly= Find input reference sequence in this assembly - -e, --end= End coordinate - -r, --refseq= Reference sequence. If unset, get all sequences - -s, --start= [default: 1] Start coordinate (1-based) - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Get reference sequence in fasta format - - Return the reference sequence for a given assembly and coordinates - -EXAMPLES - Get all sequences in myAssembly: - - $ apollo assembly sequence -a myAssembly - - Get sequence in coordinates chr1:1..1000: - - $ apollo assembly sequence -a myAssembly -r chr1 -s 1 -e 1000 -``` - -_See code: -[src/commands/assembly/sequence.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/assembly/sequence.ts)_ - -## `apollo change get` - -Get list of changes - -``` -USAGE - $ apollo change get [--profile ] [--config-file ] [-a ] - -FLAGS - -a, --assembly=... Get changes only for these assembly names or IDs (but see description) - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Get list of changes - - Return the change log in json format. Note that when an assembly is deleted the link between common name and ID is - lost (it can still be recovered by inspecting the change log but at present this task is left to the user). In such - cases you need to use the assembly ID. -``` - -_See code: -[src/commands/change/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/change/get.ts)_ - -## `apollo config [KEY] [VALUE]` - -Get or set apollo configuration options - -``` -USAGE - $ apollo config [KEY] [VALUE] [--profile ] [---file ] [--get-config-file] - -ARGUMENTS - KEY Name of configuration parameter - VALUE Parameter value - -FLAGS - --config-file= Use this config file (mostly for testing) - --get-config-file Return the path to the config file and exit (this file may not exist yet) - --profile= Profile to create or edit - -DESCRIPTION - Get or set apollo configuration options - - Use this command to create or edit a user profile with credentials to access Apollo. Configuration options are: - - - address: - Address and port e.g http://localhost:3999 - - - accessType: - How to access Apollo. accessType is typically one of: google, microsoft, guest, root. Allowed types depend on your - Apollo setup - - - accessToken: - Access token. Usually inserted by `apollo login` - - - rootPassword: - Password for root account. Only set this for "root" access type - -EXAMPLES - Interactive setup: - - $ apollo config - - Setup with key/value pairs: - - $ apollo config --profile admin address http://localhost:3999 - - Get current address for default profile: - - $ apollo config address -``` - -_See code: -[src/commands/config.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/config.ts)_ - -## `apollo export gff3 ASSEMBLY` - -Export the annotations for an assembly to stdout as gff3 - -``` -USAGE - $ apollo export gff3 ASSEMBLY [--profile ] [--config-file ] [--include-fasta] - -ARGUMENTS - ASSEMBLY Export annotations for this assembly name or id - -FLAGS - --config-file= Use this config file (mostly for testing) - --include-fasta Include fasta sequence in output - --profile= Use credentials from this profile - -DESCRIPTION - Export the annotations for an assembly to stdout as gff3 - -EXAMPLES - Export annotations for myAssembly: - - $ apollo export gff3 myAssembly > out.gff3 -``` - -_See code: -[src/commands/export/gff3.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/export/gff3.ts)_ - -## `apollo feature add [FEATURE-JSON]` - -Add one or more features to Apollo - -``` -USAGE - $ apollo feature add [FEATURE-JSON] [--profile ] [--config-file ] [-a ] [-r -s - -e -t ] [-F ] - -ARGUMENTS - FEATURE-JSON Inline JSON describing the feature(s) to add. Can also be provided via stdin. - -FLAGS - -F, --feature-json-file= File with JSON describing the feature(s) to add - -a, --assembly= Name or ID of target assembly. Not required if refseq is unique in the database - -e, --max= End position in target reference sequence - -r, --refSeq= Name or ID of target reference sequence - -s, --min= Start position in target reference sequence - -t, --type= Type of child feature - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Add one or more features to Apollo - - A single simple feature can be added using the --min, --max, etc. flags. - - To add multiple features, features with more details, or features with children, you can pass in JSON via argument or - stdin or use the --feature-json-file options. - - -EXAMPLES - Add a single feature by specifying its location and type - - $ apollo feature add --assembly hg19 --refSeq chr3 --min 1000 --max 5000 --type remark - - Add a single feature from inline JSON - - $ apollo feature add \ - '{"assembly":"","refseq":"","min":1,"max":100,"type":""}' - - Add mutilple features from stdin JSON - - echo '[{"assembly":"","refseq":"","min":1,"max":100,"type":""},{" \ - assembly":"","refseq":"","min":101,"max":200,"type":""}]' | \ - apollo feature add - - Add a feature with children from inline JSON - - $ apollo feature add '{"assembly":"","refseq":"","min":1,"max":100,"type":"","children":[{"min":1,"max":50,"type":""}]}' -``` - -_See code: -[src/commands/feature/add.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/feature/add.ts)_ - -## `apollo feature add-child` - -Add a child feature (e.g. add an exon to an mRNA) - -``` -USAGE - $ apollo feature add-child -s -e -t [--profile ] [--config-file ] [-i ] - -FLAGS - -e, --end= (required) End coordinate of the child feature (1-based) - -i, --feature-id= [default: -] Add a child to this feature ID; use - to read it from stdin - -s, --start= (required) Start coordinate of the child feature (1-based) - -t, --type= (required) Type of child feature - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Add a child feature (e.g. add an exon to an mRNA) - - See the other commands under `apollo feature` to retrive the parent ID of interest and to populate the child feature - with attributes. - -EXAMPLES - Add an exon at genomic coordinates 10..20 to this feature ID: - - $ apollo feature add-child -i 660...73f -t exon -s 10 -e 20 -``` - -_See code: -[src/commands/feature/add-child.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/feature/add-child.ts)_ - -## `apollo feature check` - -Get check results - -``` -USAGE - $ apollo feature check [--profile ] [--config-file ] [-i ] [-a ] - -FLAGS - -a, --assembly= Get checks for this assembly - -i, --feature-id=... Get checks for these feature identifiers - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Get check results - - Use this command to view which features fail checks along with the reason for failing.Use `apollo assembly check` for - managing which checks should be applied to an assembly - -EXAMPLES - Get all check results in the database: - - $ apollo feature check - - Get check results for assembly hg19: - - $ apollo feature check -a hg19 -``` - -_See code: -[src/commands/feature/check.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/feature/check.ts)_ - -## `apollo feature copy` - -Copy a feature to another location - -``` -USAGE - $ apollo feature copy -r -s [--profile ] [--config-file ] [-i ] [-a ] - -FLAGS - -a, --assembly= Name or ID of target assembly. Not required if refseq is unique in the database - -i, --feature-id= [default: -] Feature ID to copy to; use - to read it from stdin - -r, --refseq= (required) Name or ID of target reference sequence - -s, --start= (required) Start position in target reference sequence - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Copy a feature to another location - - The feature may be copied to the same or to a different assembly. The destination reference sequence may be selected - by name only if unique in the database or by name and assembly or by identifier. - -EXAMPLES - Copy this feature ID to chr1:100 in assembly hg38: - - $ apollo feature copy -i 6605826fbd0eee691f83e73f -r chr1 -s 100 -a hg38 -``` - -_See code: -[src/commands/feature/copy.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/feature/copy.ts)_ - -## `apollo feature delete` - -Delete one or more features by ID - -``` -USAGE - $ apollo feature delete [--profile ] [--config-file ] [-i ] [-f] [-n] - -FLAGS - -f, --force Ignore non-existing features - -i, --feature-id=... [default: -] Feature IDs to delete - -n, --dry-run Only show what would be delete - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Delete one or more features by ID - - Note that deleting a child feature after deleting its parent will result in an error unless you set -f/--force. -``` - -_See code: -[src/commands/feature/delete.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/feature/delete.ts)_ - -## `apollo feature edit` - -Edit features using an appropiate json input - -``` -USAGE - $ apollo feature edit [--profile ] [--config-file ] [-j ] - -FLAGS - -j, --json-input= [default: -] Json string or json file or "-" to read json from stdin - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Edit features using an appropiate json input - - Edit a feature by submitting a json input with all the required attributes for Apollo to process it. This is a very - low level command which most users probably do not need. - - Input may be a json string or a json file and it may be an array of changes. This is an example input for editing - feature type: - - { - "typeName": "TypeChange", - "changedIds": [ - "6613f7d22c957525d631b1cc" - ], - "assembly": "6613f7d1360321540a11e5ed", - "featureId": "6613f7d22c957525d631b1cc", - "oldType": "BAC", - "newType": "G_quartet" - } - -EXAMPLES - Editing by passing a json to stdin: - - echo '{"typeName": ... "newType": "G_quartet"}' | apollo feature edit -j - -``` - -_See code: -[src/commands/feature/edit.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/feature/edit.ts)_ - -## `apollo feature edit-attribute` - -Add, edit, or view a feature attribute - -``` -USAGE - $ apollo feature edit-attribute -a [--profile ] [--config-file ] [-i ] [-v ] [-d] - -FLAGS - -a, --attribute= (required) Attribute key to add or edit - -d, --delete Delete this attribute - -i, --feature-id= [default: -] Feature ID to edit or "-" to read it from stdin - -v, --value=... New attribute value. Separated mutliple values by space to them as a list. If unset return - current value - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Add, edit, or view a feature attribute - - Be aware that there is no checking whether attributes names and values are valid. For example, you can create - non-unique ID attributes or you can set gene ontology terms to non-existing terms - -EXAMPLES - Add attribute "domains" with a list of values: - - $ apollo feature edit-attribute -i 66...3f -a domains -v ABC PLD - - Print values in "domains" as json array: - - $ apollo feature edit-attribute -i 66...3f -a domains - - Delete attribute "domains" - - $ apollo feature edit-attribute -i 66...3f -a domains -d -``` - -_See code: -[src/commands/feature/edit-attribute.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/feature/edit-attribute.ts)_ - -## `apollo feature edit-coords` - -Edit feature start and/or end coordinates - -``` -USAGE - $ apollo feature edit-coords [--profile ] [--config-file ] [-i ] [-s ] [-e ] - -FLAGS - -e, --end= New end coordinate (1-based) - -i, --feature-id= [default: -] Feature ID to edit or "-" to read it from stdin - -s, --start= New start coordinate (1-based) - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Edit feature start and/or end coordinates - - If editing a child feature that new coordinates must be within the parent's coordinates.To get the identifier of the - feature to edit consider using `apollo feature get` or `apollo feature search` - -EXAMPLES - Edit start and end: - - $ apollo feature edit-coords -i abc...xyz -s 10 -e 1000 - - Edit end and leave start as it is: - - $ apollo feature edit-coords -i abc...xyz -e 2000 -``` - -_See code: -[src/commands/feature/edit-coords.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/feature/edit-coords.ts)_ - -## `apollo feature edit-type` - -Edit or view feature type - -``` -USAGE - $ apollo feature edit-type [--profile ] [--config-file ] [-i ] [-t ] - -FLAGS - -i, --feature-id= [default: -] Feature ID to edit or "-" to read it from stdin - -t, --type= Assign feature to this type. If unset return the current type - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Edit or view feature type - - Feature type is column 3 in gff format.It must be a valid sequence ontology term although but the valifdity of the new - term is not checked. -``` - -_See code: -[src/commands/feature/edit-type.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/feature/edit-type.ts)_ - -## `apollo feature get` - -Get features in assembly, reference sequence or genomic window - -``` -USAGE - $ apollo feature get [--profile ] [--config-file ] [-a ] [-r ] [-s ] [-e - ] - -FLAGS - -a, --assembly= Find input reference sequence in this assembly - -e, --end= End coordinate - -r, --refseq= Reference sequence. If unset, query all sequences - -s, --start= [default: 1] Start coordinate (1-based) - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Get features in assembly, reference sequence or genomic window - -EXAMPLES - Get all features in myAssembly: - - $ apollo feature get -a myAssembly - - Get features intersecting chr1:1..1000. You can omit the assembly name if there are no other reference sequences - named chr1: - - $ apollo feature get -a myAssembly -r chr1 -s 1 -e 1000 -``` - -_See code: -[src/commands/feature/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/feature/get.ts)_ - -## `apollo feature get-id` - -Get features given their identifiers - -``` -USAGE - $ apollo feature get-id [--profile ] [--config-file ] [-i ] - -FLAGS - -i, --feature-id=... [default: -] Retrieves feature with these IDs. Use "-" to read IDs from stdin (one per - line) - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Get features given their identifiers - - Invalid identifiers or identifiers not found in the database will be silently ignored - -EXAMPLES - Get features for these identifiers: - - $ apollo feature get-id -i abc...zyz def...foo -``` - -_See code: -[src/commands/feature/get-id.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/feature/get-id.ts)_ - -## `apollo feature get-indexed-id ID` - -Get features given an indexed identifier - -``` -USAGE - $ apollo feature get-indexed-id ID [--profile ] [--config-file ] [-a ] [--topLevel] - -ARGUMENTS - ID Indexed identifier to search for - -FLAGS - -a, --assembly=... Assembly names or IDs to search; use "-" to read it from stdin. If omitted search all - assemblies - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - --topLevel Return the top-level parent of the feature instead of the feature itself - -DESCRIPTION - Get features given an indexed identifier - - Get features that match a given indexed identifier, such as the ID of a feature from an imported GFF3 file - -EXAMPLES - Get features for this indexed identifier: - - $ apollo feature get-indexed-id -i abc...zyz def...foo -``` - -_See code: -[src/commands/feature/get-indexed-id.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/feature/get-indexed-id.ts)_ - -## `apollo feature import INPUT-FILE` - -Import features from local gff file - -``` -USAGE - $ apollo feature import INPUT-FILE -a [--profile ] [--config-file ] [-d] - -ARGUMENTS - INPUT-FILE Input gff file - -FLAGS - -a, --assembly= (required) Import into this assembly name or assembly ID - -d, --delete-existing Delete existing features before importing - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Import features from local gff file - - By default, features are added to the existing ones. - -EXAMPLES - Delete features in myAssembly and then import features.gff3: - - $ apollo feature import features.gff3 -d -a myAssembly -``` - -_See code: -[src/commands/feature/import.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/feature/import.ts)_ - -## `apollo feature search` - -Free text search for feature in one or more assemblies - -``` -USAGE - $ apollo feature search -t [--profile ] [--config-file ] [-a ] - -FLAGS - -a, --assembly=... Assembly names or IDs to search; use "-" to read it from stdin. If omitted search all - assemblies - -t, --text= (required) Search for this text query - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Free text search for feature in one or more assemblies - - Return features matching a query string. This command searches only in: - - - Attribute *values* (not attribute names) - - Source field (which in fact is stored as an attribute) - - Feature type - - The search mode is: - - - Case insensitive - - Match only full words, but not necessarily the full value - - Common words are ignored. E.g. "the", "with" - - For example, given this feature: - - chr1 example SNP 10 30 0.987 . . "someKey=Fingerprint BAC with reads" - - Queries "bac" or "mRNA" return the feature. Instead these queries will NOT match: - - - "someKey" - - "with" - - "Finger" - - "chr1" - - "0.987" - -EXAMPLES - Search "bac" in these assemblies: - - $ apollo feature search -a mm9 mm10 -t bac -``` - -_See code: -[src/commands/feature/search.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/feature/search.ts)_ - -## `apollo file delete` - -Delete files from the Apollo server - -``` -USAGE - $ apollo file delete [--profile ] [--config-file ] [-i ] - -FLAGS - -i, --file-id=... [default: -] IDs of the files to delete - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Delete files from the Apollo server - - Deleted files are printed to stdout. See also `apollo file get` to list the files on the server - -EXAMPLES - Delete file multiple files: - - $ apollo file delete -i 123...abc xyz...789 -``` - -_See code: -[src/commands/file/delete.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/file/delete.ts)_ - -## `apollo file download` - -Download a file from the Apollo server - -``` -USAGE - $ apollo file download [--profile ] [--config-file ] [-i ] [-o ] - -FLAGS - -i, --file-id= [default: -] ID of the file to download - -o, --output= Write output to this file or "-" for stdout. Default to the name of the uploaded file. - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Download a file from the Apollo server - - See also `apollo file get` to list the files on the server - -EXAMPLES - Download file with id xyz - - $ apollo file download -i xyz -o genome.fa -``` - -_See code: -[src/commands/file/download.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/file/download.ts)_ - -## `apollo file get` - -Get list of files uploaded to the Apollo server - -``` -USAGE - $ apollo file get [--profile ] [--config-file ] [-i ] - -FLAGS - -i, --file-id=... Get files matching this IDs - --config-file= Use this config file (mostly for testing) - --profile= Use credentials from this profile - -DESCRIPTION - Get list of files uploaded to the Apollo server - - Print to stdout the list of files in json format - -EXAMPLES - Get files by id: - - $ apollo file get -i xyz abc -``` - -_See code: -[src/commands/file/get.ts](https://github.com/GMOD/Apollo3/blob/v0.3.11/packages/apollo-cli/src/commands/file/get.ts)_ - -## `apollo file upload INPUT-FILE` - -Upload a local file to the Apollo server - -``` -USAGE - $ apollo file upload INPUT-FILE [--profile ] [--config-file ] [-t - text/x-fasta|text/x-gff3|application/x-bgzip-fasta|text/x-fai|application/x-gzi] [-z | -d] - -ARGUMENTS - INPUT-FILE Local file to upload - -FLAGS - -d, --decompressed Override autodetection and instruct that input is decompressed - -t, --type=