netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Public demo: https://demo.netbox.dev
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.48k stars 2.52k forks source link

Upgrade yarn packages #16712

Open arthanson opened 1 month ago

arthanson commented 1 month ago

Proposed Changes

Update yarn js packages to latest (typescript, esbuild, eslint...) using yarn update --latest

Justification

from dev documentation (https://netboxlabs.com/docs/netbox/en/stable/development/web-ui/) it says to run yarn update --latest doing this currently breaks the build / validation. The update to typescript jumps a major version number and shows validation errors in tom-select:

node_modules/tom-select/src/vanilla.ts:100:39 - error TS1536: Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '\x09' instead.

100    _classes = _classes.trim().split(/[\11\12\14\15\40]/);
                                          ~~~

node_modules/tom-select/src/vanilla.ts:100:42 - error TS1536: Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '\x0a' instead.

100    _classes = _classes.trim().split(/[\11\12\14\15\40]/);
                                             ~~~

node_modules/tom-select/src/vanilla.ts:100:45 - error TS1536: Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '\x0c' instead.

100    _classes = _classes.trim().split(/[\11\12\14\15\40]/);

While update to eslint shows errors:

(node:84956) ESLintIgnoreWarning: The ".eslintignore" file is no longer supported. Switch to using the "ignores" property in "eslint.config.js": https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files
(Use `node --trace-warnings ...` to show where the warning was created)

Oops! Something went wrong! :(

ESLint: 9.5.0

/Users/arthurhanson/dev/work/netbox/netbox/project-static/.eslintrc:2
  "root": true,
        ^
marsteel commented 3 weeks ago

Yes, There is also a security finding https://security.snyk.io/package/npm/braces/3.0.2 Bump braces from 3.0.2 to 3.0.3 in /netbox/project-static #1