Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,26 @@
"@types/lodash": "^4.17.20",
"@types/react": "^18.0.26",
"@types/react-addons-linked-state-mixin": "^0.14.22",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"css-loader": "^6.7.1",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.8.0",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"css-loader": "^7.0.0",
"eslint": "^10.0.0",
"eslint-config-prettier": "^10.0.0",
Comment on lines 81 to 85
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, let's look at the package.json file around the specified lines
head -n 110 package.json | tail -n 40

Repository: deepnote/jupyterlab-deepnote

Length of output: 1398


🏁 Script executed:

# Also check if there are configuration files for the tools mentioned
fd -e "\.eslintrc|\.stylelintrc|jest\.config" .

Repository: deepnote/jupyterlab-deepnote

Length of output: 54


🏁 Script executed:

# Check if there's a git history showing what changed
git log --oneline -n 1 -- package.json

Repository: deepnote/jupyterlab-deepnote

Length of output: 115


🏁 Script executed:

# Check git diff to see what the actual changes were
git diff HEAD~1 package.json | head -n 100

Repository: deepnote/jupyterlab-deepnote

Length of output: 258


🏁 Script executed:

# Check for configuration files for the tools mentioned
find . -maxdepth 2 -type f \( -name ".eslintrc*" -o -name "eslint.config.*" -o -name ".stylelintrc*" -o -name "jest.config.*" -o -name "prettier.config.*" \)

Repository: deepnote/jupyterlab-deepnote

Length of output: 88


🏁 Script executed:

# Check if package-lock.json or yarn.lock exists to see lock status
ls -la package-lock.json yarn.lock 2>&1 | head -5

Repository: deepnote/jupyterlab-deepnote

Length of output: 197


🏁 Script executed:

# Check what scripts are available in package.json
grep -A 20 '"scripts":' package.json

Repository: deepnote/jupyterlab-deepnote

Length of output: 1640


🏁 Script executed:

# Check the jest.config.js to see if it needs updates
cat jest.config.js

Repository: deepnote/jupyterlab-deepnote

Length of output: 861


🏁 Script executed:

# Search for eslint configuration
find . -maxdepth 2 -type f -name "eslint.config.*" -o -name ".eslintrc*"

Repository: deepnote/jupyterlab-deepnote

Length of output: 54


🏁 Script executed:

# Check for eslint configuration - ESLint 9 uses eslint.config.js or .eslintrc
find . -maxdepth 2 -type f \( -name "eslint.config.js" -o -name ".eslintrc.js" -o -name ".eslintrc.json" -o -name ".eslintrc" \)

Repository: deepnote/jupyterlab-deepnote

Length of output: 54


🏁 Script executed:

# Check if there's a stylelint config
find . -maxdepth 2 -type f \( -name ".stylelintrc*" -o -name "stylelint.config.*" \)

Repository: deepnote/jupyterlab-deepnote

Length of output: 54


🏁 Script executed:

# Check the full scripts section to see if test exists
grep -A 30 '"scripts":' package.json | grep test

Repository: deepnote/jupyterlab-deepnote

Length of output: 106


🏁 Script executed:

# Check if there are any references to ESLint legacy config
grep -r "eslintConfig" . --include="*.json" --include="*.js" 2>/dev/null | head -5

Repository: deepnote/jupyterlab-deepnote

Length of output: 108


🏁 Script executed:

# Check the actual versions in node_modules to understand the state
grep -A 2 '"eslint"' package.json
grep -A 2 '"jest"' package.json

Repository: deepnote/jupyterlab-deepnote

Length of output: 426


🏁 Script executed:

# Check what's in the eslintConfig section of package.json
sed -n '/"eslintConfig"/,/^    }/p' package.json

Repository: deepnote/jupyterlab-deepnote

Length of output: 1507


🏁 Script executed:

# Check if ESLint 9 is looking for eslint.config.js specifically
grep -i "flat\|config" package.json | head -10

Repository: deepnote/jupyterlab-deepnote

Length of output: 441


ESLint 9 incompatibility: Project uses legacy eslintConfig format but ESLint 9 requires flat config.

Major version bumps (ESLint 8→9, Jest 29→30, TypeScript ESLint 6→8, stylelint 15→16) include breaking changes. ESLint 9 specifically requires either an eslint.config.js file or explicit legacy config support—the current eslintConfig in package.json will not work.

Before merge, either:

  1. Migrate to ESLint 9 flat config format (add eslint.config.js)
  2. Downgrade ESLint to ^8.x
  3. Configure ESLint 9 to use legacy config explicitly

Also verify Jest 30 compatibility and run npm run lint:check and npm run test to confirm pipeline passes.

🤖 Prompt for AI Agents
package.json lines 81-85: current bump to "eslint": "^9.0.0" is incompatible
with the legacy eslintConfig in package.json; either migrate to ESLint 9 flat
config, pin ESLint to v8, or enable legacy config support. Fix by one of three
actions: (A) create an eslint.config.js at repo root implementing the flat
config equivalent of your existing package.json eslintConfig and update
package.json scripts if needed; (B) revert the eslint dependency to a caret
range compatible with v8 (e.g. "^8.x") in package.json to keep the existing
legacy config; or (C) explicitly configure ESLint 9 to load the legacy config
(add the compatibility package/flag recommended in ESLint docs) and verify
package.json still works. After applying one of these, update package.json
dependency versions accordingly and run npm run lint:check and npm run test to
ensure pipeline compatibility.

"eslint-plugin-prettier": "^5.0.0",
"husky": "9.1.7",
"jest": "^29.2.0",
"jest": "^30.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Jest 30.0 breaking changes migration guide

💡 Result:

Here are the key breaking changes in Jest 30 and concise migration steps.

Quick install

  • npm install jest@^30.0.0. [1]

Major breaking changes (summary)

  • Dropped Node support: 14, 16, 19, 21 — run on a supported Node version (>=18/20 family as appropriate). [1][3]
  • TypeScript: minimum supported TS is 5.4 — upgrade your toolchain if needed. [1]
  • jsdom: jest-environment-jsdom upgraded (jsdom 21 → 26) — update any jsdom-specific expectations. [1]
  • Removed expect alias matchers — replace aliases with canonical names (there are autofixers in eslint-plugin-jest / Nx migrations). [1][6]
  • Asymmetric matcher behavior changed: objectContaining no longer matches arrays or non‑enumerable props; use arrayContaining, ArrayOf, or direct array asserts and adjust length checks. [2][4]
  • Non-enumerable object properties excluded from object matchers by default — adjust tests that relied on those. [1][2]
  • Snapshot printing changed — you may need to update snapshots. [1]
  • CLI/config rename: --testPathPattern → --testPathPatterns; globalsCleanupMode renamed to globalsCleanup; waitNextEventLoopTurnForUnhandledRejectionEvents → --waitForUnhandledRejections. [3]
  • .mts/.cts are supported by default — ensure loaders/build tools handle them correctly. [1]
  • Jest packages now bundle internals into single files and use "exports" (ESM wrappers) — any deep/undocumented internal imports will break; switch to public APIs or request an export. [2][5]
  • Promise handling: fixed false-positive failures for promises rejected then caught — review tests that relied on previous behavior. [1]

Concrete migration checklist

  1. Upgrade Node and TypeScript to minimum supported versions (Node: use a supported LTS; TS >= 5.4). [1]
  2. npm install jest@^30.0.0 and run your test suite to surface failures. [1]
  3. Replace removed matcher aliases (run eslint-plugin-jest autofix or use provided Nx migrations). [1][6]
  4. Update tests that used expect.objectContaining with arrays or length objects:
    • Use expect.arrayContaining([...]) or direct array comparisons, and use toHaveLength or .mock.calls checks for lengths. [4]
  5. Update snapshots (run tests with -u to update, review diffs). [1]
  6. Remove any deep imports into Jest internals; use public APIs or open a PR to expose needed APIs. [2][5]
  7. Update CLI flags/config names if you use renamed options. [3]
  8. Verify jsdom-dependent tests after the jsdom version bump. [1]
  9. Run full CI and fix any additional failures (promise handling, non-enumerable props, .mts/.cts issues). [1][2]

References

  • Jest 30 release blog (overview & breaking changes). [1]
  • Upgrading to Jest 30 / versioned migration docs (internals, bundling, exports). [2]
  • Jest GitHub releases / changelog (flags, rename summary). [3]
  • Example migration notes (Backstage/Nx examples for array/objectContaining and matcher alias fixes). [4][6]

If you want, I can: (a) produce a codemod to replace common alias matchers in your repo, (b) scan a package.json + a few test files and point out likely breakages, or (c) generate exact grep/sed commands to find deep imports and removed CLI flags. Which would you like?


Jest 30 upgrade requires migration work.

Jest 30 drops support for Node 14/16/19/21, requires TypeScript ≥5.4, and changes critical matcher behavior (e.g., objectContaining no longer matches arrays; expect alias matchers removed). Update tests for asymmetric matcher changes, review snapshots, and verify Node/TypeScript versions before upgrading.

🤖 Prompt for AI Agents
In package.json around line 88, the project bumps jest to ^30.0.0 which requires
migration work: ensure CI and local environments run a supported Node version
(upgrade project/engines to a supported Node, e.g., 18/20, and drop
14/16/19/21), upgrade TypeScript to >=5.4 and update tsconfig if needed, update
tests to handle Jest 30 asymmetric matcher changes (replace objectContaining
usages that relied on array-matching, adjust tests to use explicit array
matchers or transform expectations), remove any usages of removed expect alias
matchers and replace with supported matcher alternatives, review and update
snapshots where output changed, run the full test suite and fix any failing
tests, and update CI matrix and package.json devDependencies accordingly before
merging.

"lint-staged": "16.2.3",
"mkdirp": "^1.0.3",
"npm-run-all2": "^7.0.1",
"mkdirp": "^3.0.0",
"npm-run-all2": "^8.0.0",
"prettier": "^3.0.0",
"rimraf": "^5.0.1",
"source-map-loader": "^1.0.2",
"style-loader": "^3.3.1",
"stylelint": "^15.10.1",
"stylelint-config-recommended": "^13.0.0",
"stylelint-config-standard": "^34.0.0",
"rimraf": "^6.0.0",
"source-map-loader": "^5.0.0",
"style-loader": "^4.0.0",
"stylelint": "^17.0.0",
"stylelint-config-recommended": "^18.0.0",
"stylelint-config-standard": "^40.0.0",
"stylelint-csstree-validator": "^3.0.0",
"stylelint-prettier": "^4.0.0",
"stylelint-prettier": "^5.0.0",
Comment on lines +90 to +100
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

css-loader 7 breaking changes webpack compatibility

💡 Result:

css-loader v7 (7.0.0) breaking changes

  • CSS Modules export shape change (common “undefined styles” issue): when esModule: true (the default in modern setups), modules.namedExport effectively becomes true by default, so CSS Modules are exported as named exports instead of a default export. Migration:
    • Before: import styles from "./styles.module.css"
    • After: import * as styles from "./styles.module.css" [1]
  • modules.exportLocalsConvention default changes: if modules.namedExport is true and you don’t set it, exportLocalsConvention defaults to "as-is". [1]
  • Webpack minimum version bump: minimum supported webpack is 5.27.0 (so webpack 4 is not compatible). [1]
  • Node minimum version bump: minimum supported Node.js is 18.12.0. [1]

Webpack compatibility (what you need)

  • To use the latest css-loader (v7+), you need webpack 5 (and for v7.0.0 specifically, >= 5.27.0). [1][2]

If you want to keep the old default-import behavior

Set CSS Modules back to default exports:

// webpack rule
{
  loader: "css-loader",
  options: {
    modules: { namedExport: false }
  }
}

This restores import styles from "./styles.module.css" patterns. [1][3]

Sources:
[1] css-loader v7.0.0 release notes / breaking changes (GitHub releases mirror) (github.com)
[2] webpack docs: css-loader (webpack 5 required for latest) (webpack.js.org)
[3] StackOverflow example showing the v7 named export break + config workaround (stackoverflow.com)

Citations:


🌐 Web query:

stylelint 17 breaking changes migration guide

💡 Result:

Stylelint 17 (v17.0.0) breaking changes + migration checklist

Release: 17.0.0 (2026-01-15). (stylelint.io)

1) Runtime / packaging

  • Node.js requirement: Node >= 20.19.0 (18.x and older no longer supported). (stylelint.io)
  • CommonJS Node.js API removed (ESM-only). Migrate any consuming code/plugins to ESM (see the 16.x ESM guidance referenced from the v17 guide). (stylelint.io)

2) Node.js API output changes

  • stylelint.lint() result: output removed. If you relied on result.output for fixed code, use result.code (and use result.report for formatted problems). (stylelint.io)

3) CLI / formatter change

  • GitHub formatter removed. Use a community formatter such as @csstools/stylelint-formatter-github:
    • CLI: --custom-formatter @csstools/stylelint-formatter-github``
    • API: pass the imported formatter function instead of "github". (stylelint.io)

4) Config option removals

  • selector-class-pattern: resolveNestedSelectors removed (incompatible with standard CSS nesting). If you need SCSS-style concatenation, switch to scss/selector-class-pattern via the SCSS plugin/config, or remove the option and adjust your regex. (stylelint.io)
  • selector-max-id: checkContextFunctionalPseudoClasses removed (now default behavior); delete the option. (stylelint.io)

5) Autofix behavior change

  • --fix default mode is now strict (won’t fix when there are syntax errors). To restore old behavior: --fix=lax. Also, --fix=false is removed (omit --fix instead). (stylelint.io)

6) Plugin author change (reporting ranges)

  • report now errors on previously-deprecated ambiguous position arguments; plugins should provide a PostCSS node and consistent {index,endIndex} or {start,end} ranges. (stylelint.io)

7) Rule behavior changes (expect new/changed lint results)

Primarily around standard CSS nesting, specificity, and vendor prefixes:

  • selector-max-* rules: no longer “desugar” nesting or evaluate functional pseudo-classes separately; you may need to raise your max values. (stylelint.io)
  • *-specificity rules: specificity calculations now follow the CSS Nesting spec; adjust selector-max-specificity / expectations, or disable these rules for nonstandard nesting languages (SCSS/Less). (stylelint.io)
  • no-duplicate-selectors and selector-no-qualifying-type: now resolve selectors per standard nesting; may need disabling for SCSS/Less nesting behavior. (stylelint.io)
  • Many *-list rules: vendor-prefix and case handling made consistent; if you intended to include prefixes/case-insensitivity, use regex (often with /i). (stylelint.io)
  • property-no-vendor-prefix / value-no-vendor-prefix: ignore* options now match as-is, so include the prefixed forms you want to ignore. (stylelint.io)
  • declaration-property-max-values: now checks properties as-is; include prefixed properties in your config (e.g., regex for -webkit-). (stylelint.io)

Citations:


🌐 Web query:

style-loader 4 breaking changes webpack

💡 Result:

style-loader v4.0.0 (2024-04-08) breaking changes (re: webpack) are:

  • Requires webpack ≥ 5.27.0 (won’t work on older webpack 5 / webpack 4). [1]
  • Requires Node.js ≥ 18.12.0. [1]
  • insert option no longer accepts a function; it must be a CSS selector string or a path to a module (e.g. insert: require.resolve("./insert.js") exporting the function). [1]
  • styleTagTransform option no longer accepts a function; it must be a path to a module exporting the transform function (e.g. styleTagTransform: require.resolve("./style-tag-transform.js")). [1]

Sources: [1]


🏁 Script executed:

# Find webpack config, build config, and stylelint config files
find . -type f \( -name "webpack.config.*" -o -name ".stylelintrc*" -o -name "stylelint.config.*" -o -name "tsconfig.*" -o -name "babel.config.*" \) 2>/dev/null | head -20

Repository: deepnote/jupyterlab-deepnote

Length of output: 126


🏁 Script executed:

# Check the full package.json to understand dependencies and scripts
cat -n package.json | head -150

Repository: deepnote/jupyterlab-deepnote

Length of output: 6740


🏁 Script executed:

# Search for stylelint config
find . -type f -name ".stylelintrc*" -o -name "stylelint.config.*" 2>/dev/null

Repository: deepnote/jupyterlab-deepnote

Length of output: 54


🏁 Script executed:

# Check babel.config.js for CSS loader configuration
cat -n babel.config.js

Repository: deepnote/jupyterlab-deepnote

Length of output: 146


🏁 Script executed:

# Check if there's a webpack config or JupyterLab build config
ls -la | grep -E "webpack|jupyterlab" && find . -type f \( -name "pyproject.toml" -o -name "setup.py" \) 2>/dev/null

Repository: deepnote/jupyterlab-deepnote

Length of output: 171


🏁 Script executed:

# Check for stylelint config in pyproject.toml
cat -n pyproject.toml | head -100

Repository: deepnote/jupyterlab-deepnote

Length of output: 3386


🏁 Script executed:

# Check if there's a .stylelintrc.json or stylelint config in package.json
cat -n package.json | tail -100

Repository: deepnote/jupyterlab-deepnote

Length of output: 3631


🏁 Script executed:

# Search for CSS imports and how they're used
find src -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" \) 2>/dev/null | head -20

Repository: deepnote/jupyterlab-deepnote

Length of output: 642


🏁 Script executed:

# Check style directory for CSS files
find style -type f 2>/dev/null

Repository: deepnote/jupyterlab-deepnote

Length of output: 117


🏁 Script executed:

# Search for CSS/style imports
rg -t ts -t tsx "import.*\.css|import.*\.module\.css" src/ --no-heading -A 2 2>/dev/null | head -30

Repository: deepnote/jupyterlab-deepnote

Length of output: 54


🏁 Script executed:

# Check how styles are being imported/used
cat -n style/index.js

Repository: deepnote/jupyterlab-deepnote

Length of output: 99


🏁 Script executed:

# Check the style/index.css
cat -n style/index.css | head -50

Repository: deepnote/jupyterlab-deepnote

Length of output: 103


Document Node.js 20.19+ requirement; test build/lint with updated tools.

stylelint 17 requires Node ≥ 20.19.0 (vs. 18.12.0 for css-loader/style-loader). Add Node version constraint to pyproject.toml or CI. Also test that stylelint 17's new --fix strict mode (default) doesn't break existing fixes; use --fix=lax if needed. css-loader 7 and style-loader 4 require webpack 5.27.0+ (provided by @jupyterlab/builder); CSS imports use standard CSS (not modules), so named export changes don't apply. Other major bumps (rimraf 6, mkdirp 3, npm-run-all2 8, source-map-loader 5) are compatible. stylelint config has no deprecated v17 options.

🤖 Prompt for AI Agents
In `@package.json` around lines 90 - 100, Update project tooling to document and
enforce Node >=20.19.0 because stylelint@17 requires it: add a Node engine
constraint in pyproject.toml or CI config and update CI job(s) that run
lint/build to use Node 20.19+; run full build and lint in CI to verify
compatibility for upgraded deps listed in package.json (stylelint,
css-loader/style-loader, rimraf, mkdirp, npm-run-all2, source-map-loader). For
stylelint@17, test the default --fix behavior and, if existing automatic fixes
break, change lint invocation to use --fix=lax; for css-loader 7/style-loader 4
ensure webpack >=5.27.0 is available from `@jupyterlab/builder` or CI image and
confirm CSS imports remain as standard (not CSS modules) so named-export changes
aren’t needed.

"typescript": "~5.8.0",
"yjs": "^13.5.0"
},
Expand Down
Loading