netbox icon indicating copy to clipboard operation
netbox copied to clipboard

Upgrade yarn packages

Open arthanson opened this issue 1 year ago • 1 comments

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,
        ^

arthanson avatar Jun 24 '24 21:06 arthanson

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

marsteel avatar Jul 03 '24 16:07 marsteel

Hi did you find a way to fix this, if so how did you do it , ty so much

alejandrohg1 avatar Aug 13 '24 21:08 alejandrohg1

This will be addressed in #16245

jeremystretch avatar Aug 14 '24 20:08 jeremystretch