Skip to content

Commit

Permalink
chore: OPTIC-990: Remove Stylus and supporting libraries (#6257)
Browse files Browse the repository at this point in the history
  • Loading branch information
yyassi-heartex authored Aug 27, 2024
1 parent 97c881d commit 79dd8eb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 43 deletions.
2 changes: 1 addition & 1 deletion web/libs/editor/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = {
"^konva": "konva/konva",
"^keymaster": "identity-obj-proxy",
"^react-konva-utils": "identity-obj-proxy",
"\\.(s[ac]ss|css|styl|svg|png|jpe?g)$": "identity-obj-proxy",
"\\.(s[ac]ss|css|svg|png|jpe?g)$": "identity-obj-proxy",
},
testPathIgnorePatterns: ["/node_modules/", "/e2e/"],
testRegex: "__tests__/.*.test.[tj]sx?",
Expand Down
2 changes: 0 additions & 2 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,6 @@
"sinon": "^17.0.1",
"source-map-loader": "^1.1.3",
"style-loader": "^3.3.3",
"stylus": "^0.59.0",
"stylus-loader": "^5.0.0",
"truncate-middle": "^1.0.6",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.2",
Expand Down
5 changes: 2 additions & 3 deletions web/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ module.exports = composePlugins(
});
}

if (rule.test.toString().match(/scss|sass|styl/) && !isCssModule) {
if (rule.test.toString().match(/scss|sass/) && !isCssModule) {
const r = rule.oneOf.filter((r) => {
// we don't need rules that don't have loaders
if (!r.use) return false;
Expand All @@ -163,7 +163,7 @@ module.exports = composePlugins(
if (testString.match(/module/)) return false;

// we only target pre-processors that has 'css-loader included'
return testString.match(/scss|sass|styl/) && r.use.some((u) => u.loader && u.loader.includes("css-loader"));
return testString.match(/scss|sass/) && r.use.some((u) => u.loader && u.loader.includes("css-loader"));
});

r.forEach((_r) => {
Expand Down Expand Up @@ -217,7 +217,6 @@ module.exports = composePlugins(
},
);

// update the stylus loader to include an import of a global file
return merge(config, {
devtool,
mode: process.env.NODE_ENV || "development",
Expand Down
40 changes: 3 additions & 37 deletions web/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16718,16 +16718,7 @@ string-length@^5.0.1:
char-regex "^2.0.0"
strip-ansi "^7.0.1"

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -16786,7 +16777,7 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand All @@ -16800,13 +16791,6 @@ strip-ansi@^3.0.0:
dependencies:
ansi-regex "^2.0.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^7.0.1:
version "7.1.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
Expand Down Expand Up @@ -16915,15 +16899,6 @@ stylehacks@^6.0.0:
browserslist "^4.21.4"
postcss-selector-parser "^6.0.4"

stylus-loader@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/stylus-loader/-/stylus-loader-5.0.0.tgz#d3f548887ab67808cc40d320079c44f8ffa3d9b8"
integrity sha512-1OaGgixTgC8IAaMCodZXg7XYsfP1qU0UzTHDyPaWACUh34j9geJL4iA583tFJDOtfNUOfDLaBpUywc5MicQ1aA==
dependencies:
fast-glob "^3.2.5"
klona "^2.0.4"
normalize-path "^3.0.0"

stylus-loader@^7.1.0:
version "7.1.3"
resolved "https://registry.yarnpkg.com/stylus-loader/-/stylus-loader-7.1.3.tgz#1fdfa0d34e8c05a569bc0902e1ecdb857d764964"
Expand Down Expand Up @@ -18177,7 +18152,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b"
integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -18195,15 +18170,6 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit 79dd8eb

Please sign in to comment.