diff --git a/examples/react-tailwindcss/package.json b/examples/react-tailwindcss/package.json new file mode 100644 index 000000000..8e66bd7c9 --- /dev/null +++ b/examples/react-tailwindcss/package.json @@ -0,0 +1,41 @@ +{ + "name": "examples_packem_react_tailwindcss", + "version": "1.0.0", + "private": true, + "type": "module", + "exports": [ + "./dist/index.mjs", + "./dist/index.cjs" + ], + "main": "./dist/index.cjs", + "module": "./dist/index.mjs", + "files": [ + "./dist" + ], + "scripts": { + "build": "packem build", + "clean": "rimraf node_modules dist" + }, + "dependencies": { + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@types/react": "^18.3.10", + "@types/react-dom": "^18.3.0", + "@visulima/packem": "workspace:*", + "autoprefixer": "^10.4.20", + "esbuild": "^0.24.0", + "postcss": "^8.4.47", + "postcss-load-config": "^6.0.1", + "postcss-modules": "6.0.0", + "postcss-modules-extract-imports": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.5", + "postcss-modules-scope": "^3.2.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "rimraf": "^6.0.1", + "tailwindcss": "^3.4.13", + "typescript": "^5.6.2" + } +} diff --git a/examples/react-tailwindcss/packem.config.ts b/examples/react-tailwindcss/packem.config.ts new file mode 100644 index 000000000..39fc740b6 --- /dev/null +++ b/examples/react-tailwindcss/packem.config.ts @@ -0,0 +1,13 @@ +import { defineConfig } from "@visulima/packem/config"; +import transformer from "@visulima/packem/transformer/esbuild"; + +// eslint-disable-next-line import/no-unused-modules +export default defineConfig({ + transformer, + fileCache: false, + rollup: { + style: { + mode: "extract", + }, + }, +}); diff --git a/examples/react-tailwindcss/postcss.config.js b/examples/react-tailwindcss/postcss.config.js new file mode 100644 index 000000000..2e7af2b7f --- /dev/null +++ b/examples/react-tailwindcss/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/examples/react-tailwindcss/src/index.tsx b/examples/react-tailwindcss/src/index.tsx new file mode 100644 index 000000000..e37ea8d18 --- /dev/null +++ b/examples/react-tailwindcss/src/index.tsx @@ -0,0 +1,11 @@ +import "./styles.css"; + +const Container = () => { + return ( +
+

Hello World

+
+ ); +}; + +export default Container; diff --git a/examples/react-tailwindcss/src/styles.css b/examples/react-tailwindcss/src/styles.css new file mode 100644 index 000000000..b5c61c956 --- /dev/null +++ b/examples/react-tailwindcss/src/styles.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/examples/react-tailwindcss/tailwind.config.js b/examples/react-tailwindcss/tailwind.config.js new file mode 100644 index 000000000..bfb04855a --- /dev/null +++ b/examples/react-tailwindcss/tailwind.config.js @@ -0,0 +1,9 @@ +/** @type {import('tailwindcss').Config} */ +export default { + content: ["./src/**/*.{js,jsx,ts,tsx}"], + theme: { + extend: {}, + }, + plugins: [], +} + diff --git a/packages/rollup-plugin-styles/tsconfig.json b/examples/react-tailwindcss/tsconfig.json similarity index 58% rename from packages/rollup-plugin-styles/tsconfig.json rename to examples/react-tailwindcss/tsconfig.json index f0ee80dc2..55c78d600 100644 --- a/packages/rollup-plugin-styles/tsconfig.json +++ b/examples/react-tailwindcss/tsconfig.json @@ -1,8 +1,9 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "extends": "../../tsconfig.base.json", "include": ["src/**/*", "*.d.ts"], "compilerOptions": { - "moduleResolution": "bundler" + "baseUrl": ".", + "jsx": "react-jsx", + "moduleResolution": "bundler", } } diff --git a/examples/react-tsx-css/package.json b/examples/react-tsx-css/package.json index 6faec4faf..4fdc11399 100644 --- a/examples/react-tsx-css/package.json +++ b/examples/react-tsx-css/package.json @@ -3,6 +3,10 @@ "version": "1.0.0", "private": true, "type": "module", + "exports": [ + "./dist/index.cjs", + "./dist/index.mjs" + ], "main": "./dist/index.cjs", "module": "./dist/index.mjs", "files": [ diff --git a/packages/packem/LICENSE.md b/packages/packem/LICENSE.md index 80b763a8d..bdef59d91 100644 --- a/packages/packem/LICENSE.md +++ b/packages/packem/LICENSE.md @@ -27,6 +27,23 @@ The published @visulima/packem artifact additionally contains code with the foll MIT # Bundled dependencies: +## decode-uri-component +License: MIT +By: Sam Verschueren +Repository: SamVerschueren/decode-uri-component + +> The MIT License (MIT) +> +> Copyright (c) 2017, Sam Verschueren (github.com/SamVerschueren) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + ## estree-walker License: MIT By: Rich Harris @@ -40,6 +57,119 @@ Repository: https://github.com/Rich-Harris/estree-walker > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +--------------------------------------- + +## eventemitter3 +License: MIT +By: Arnout Kazemier +Repository: git://github.com/primus/eventemitter3.git + +> The MIT License (MIT) +> +> Copyright (c) 2014 Arnout Kazemier +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## filter-obj +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/filter-obj + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## p-queue +License: MIT +Repository: sindresorhus/p-queue + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## p-timeout +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/p-timeout + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## query-string +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/query-string + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## split-on-first +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/split-on-first + +> MIT License +> +> Copyright (c) Sindre Sorhus (https://sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/packages/packem/package.json b/packages/packem/package.json index 5f80f40f1..2877329fb 100644 --- a/packages/packem/package.json +++ b/packages/packem/package.json @@ -138,6 +138,56 @@ "default": "./dist/rollup/plugins/sucrase/index.cjs" } }, + "./runtime/inject-css": { + "import": { + "types": "./dist/rollup/plugins/styles/runtime/inject-css.d.mts", + "default": "./dist/rollup/plugins/styles/runtime/inject-css.mjs" + }, + "require": { + "types": "./dist/rollup/plugins/styles/runtime/inject-css.d.cts", + "default": "./dist/rollup/plugins/styles/runtime/inject-css.cjs" + } + }, + "./style/loader/less": { + "require": { + "types": "./dist/rollup/plugins/styles/loaders/less/index.d.cts", + "default": "./dist/rollup/plugins/styles/loaders/less/index.cjs" + }, + "import": { + "types": "./dist/rollup/plugins/styles/loaders/less/index.d.mts", + "default": "./dist/rollup/plugins/styles/loaders/less/index.mjs" + } + }, + "./style/loader/postcss": { + "require": { + "types": "./dist/rollup/plugins/styles/loaders/postcss/index.d.cts", + "default": "./dist/rollup/plugins/styles/loaders/postcss/index.cjs" + }, + "import": { + "types": "./dist/rollup/plugins/styles/loaders/postcss/index.d.mts", + "default": "./dist/rollup/plugins/styles/loaders/postcss/index.mjs" + } + }, + "./style/loader/sass": { + "require": { + "types": "./dist/rollup/plugins/styles/loaders/sass/index.d.cts", + "default": "./dist/rollup/plugins/styles/loaders/sass/index.cjs" + }, + "import": { + "types": "./dist/rollup/plugins/styles/loaders/sass/index.d.mts", + "default": "./dist/rollup/plugins/styles/loaders/sass/index.mjs" + } + }, + "./style/loader/stylus": { + "require": { + "types": "./dist/rollup/plugins/styles/loaders/stylus.d.cts", + "default": "./dist/rollup/plugins/styles/loaders/stylus.cjs" + }, + "import": { + "types": "./dist/rollup/plugins/styles/loaders/stylus.d.mts", + "default": "./dist/rollup/plugins/styles/loaders/stylus.mjs" + } + }, "./package.json": "./package.json" }, "main": "dist/create-bundler.cjs", @@ -168,6 +218,21 @@ ], "transformer/sucrase": [ "./dist/rollup/plugins/sucrase/index.d.ts" + ], + "runtime/inject-css": [ + "./dist/rollup/plugins/styles/runtime/inject-css.d.ts" + ], + "style/loader/less": [ + "./dist/rollup/plugins/styles/loaders/less/index.d.ts" + ], + "style/loader/postcss": [ + "./dist/rollup/plugins/styles/loaders/postcss/index.d.ts" + ], + "style/loader/sass": [ + "./dist/rollup/plugins/styles/loaders/sass/index.d.ts" + ], + "style/loader/stylus": [ + "./dist/rollup/plugins/styles/loaders/stylus.d.ts" ] } }, @@ -221,6 +286,7 @@ "@visulima/pail": "2.1.9", "@visulima/path": "1.0.9", "@visulima/tsconfig": "1.0.14", + "cssnano": "7.0.6", "defu": "6.1.4", "es-module-lexer": "1.5.4", "fastest-levenshtein": "1.0.16", @@ -229,14 +295,18 @@ "is-glob": "4.0.3", "jiti": "2.0.0", "magic-string": "0.30.11", + "mime-types": "2.1.35", "mlly": "1.7.1", "oxc-parser": "0.30.5", + "resolve": "2.0.0-next.5", + "resolve.exports": "2.0.2", "rollup": "4.22.5", "rollup-plugin-dts": "6.1.1", "rollup-plugin-license": "3.5.3", "rollup-plugin-polyfill-node": "0.13.0", "rollup-plugin-visualizer": "5.12.0", "semver": "7.6.3", + "source-map-js": "1.2.1", "tinyglobby": "0.2.6", "typedoc": "0.26.7", "typedoc-plugin-markdown": "4.2.8", @@ -258,10 +328,16 @@ "@types/glob": "^8.1.0", "@types/glob-parent": "^5.1.3", "@types/is-glob": "^4.0.4", + "@types/less": "3.0.6", + "@types/mime-types": "^2.1.4", "@types/node": "18.19.50", + "@types/node-sass": "^4.11.7", "@types/react": "^18.3.10", "@types/react-dom": "^18.3.0", + "@types/resolve": "^1.20.6", "@types/semver": "^7.5.8", + "@types/stylus": "^0.48.43", + "@types/uglifycss": "^0.0.11", "@vitest/coverage-v8": "^2.1.1", "@vitest/ui": "^2.1.1", "conventional-changelog-conventionalcommits": "8.0.0", @@ -277,14 +353,30 @@ "eslint-plugin-vitest-globals": "^1.5.0", "estree-walker": "^3.0.3", "execa": "^9.4.0", + "icss-utils": "^5.1.0", + "less": "^4.2.0", + "node-sass": "^9.0.0", "oxc-transform": "^0.30.5", + "p-queue": "^8.0.1", + "postcss": "^8.4.47", + "postcss-load-config": "^6.0.1", + "postcss-modules": "6.0.0", + "postcss-modules-extract-imports": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.5", + "postcss-modules-scope": "^3.2.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", "prettier": "^3.3.3", + "query-string": "^9.1.0", "react": "^18.3.1", "react-dom": "^18.3.1", "rimraf": "^6.0.1", + "rollup": "^4.22.5", + "sass": "^1.79.4", "secretlint": "8.2.4", "semantic-release": "^24.1.2", "sort-package-json": "^2.10.1", + "stylus": "^0.63.0", "sucrase": "^3.35.0", "tempy": "^3.1.0", "ts-essentials": "^10.0.2", @@ -294,7 +386,20 @@ "peerDependencies": { "@swc/core": "^1.5.7", "esbuild": "^0.20.2 || ^0.21.3", + "icss-utils": "^5.1.0", + "less": "^4.2.0", + "node-sass": "^9.0.0", "oxc-transform": "^0.20.0", + "postcss": "^8.4.38", + "postcss-load-config": "^6.0.1", + "postcss-modules": "^6.0.0", + "postcss-modules-extract-imports": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.5", + "postcss-modules-scope": "^3.2.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "sass": "^1.43.4", + "stylus": "^0.63.0", "sucrase": "^3.35.0", "typescript": "^4.5 || ^5.0" }, @@ -305,9 +410,48 @@ "esbuild": { "optional": true }, + "icss-utils": { + "optional": true + }, + "less": { + "optional": true + }, + "node-sass": { + "optional": true + }, "oxc-transform": { "optional": true }, + "postcss": { + "optional": true + }, + "postcss-load-config": { + "optional": true + }, + "postcss-modules": { + "optional": true + }, + "postcss-modules-extract-imports": { + "optional": true + }, + "postcss-modules-local-by-default": { + "optional": true + }, + "postcss-modules-scope": { + "optional": true + }, + "postcss-modules-values": { + "optional": true + }, + "postcss-value-parser": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, "sucrase": { "optional": true }, diff --git a/packages/packem/packem.config.ts b/packages/packem/packem.config.ts index 7a6b8101a..d2207c698 100644 --- a/packages/packem/packem.config.ts +++ b/packages/packem/packem.config.ts @@ -5,6 +5,7 @@ import isolatedDeclarationTransformer from "./src/rollup/plugins/typescript/isol // eslint-disable-next-line import/no-unused-modules export default defineConfig({ cjsInterop: true, + externals: ["stylus", "less", "sass", "node-sass", "postcss", "rollup"], fileCache: true, isolatedDeclarationTransformer, rollup: { diff --git a/packages/packem/src/constants.ts b/packages/packem/src/constants.ts index 303e38134..971a202fe 100644 --- a/packages/packem/src/constants.ts +++ b/packages/packem/src/constants.ts @@ -5,7 +5,7 @@ export const DEFAULT_EXTENSIONS: string[] = [".mjs", ".js", ".json", ".node", ". export const DEFAULT_LOADERS: Record = { ".aac": "file", ".cjs": "js", - ".css": "file", + // ".css": "file", ".cts": "ts", ".eot": "file", ".flac": "file", diff --git a/packages/packem/src/create-bundler.ts b/packages/packem/src/create-bundler.ts index 24c0f6cb7..f0571d6e1 100644 --- a/packages/packem/src/create-bundler.ts +++ b/packages/packem/src/create-bundler.ts @@ -210,7 +210,7 @@ const generateOptions = ( preserveDynamicImports: true, raw: { exclude: EXCLUDE_REGEXP, - include: [/\.(md|txt|css|htm|html|data)$/], + include: [/\.(md|txt|htm|html|data)$/], }, replace: { /** diff --git a/packages/packem/src/rollup/get-rollup-options.ts b/packages/packem/src/rollup/get-rollup-options.ts index e9fe9292b..419162cec 100644 --- a/packages/packem/src/rollup/get-rollup-options.ts +++ b/packages/packem/src/rollup/get-rollup-options.ts @@ -39,6 +39,7 @@ import cachingPlugin from "./plugins/plugin-cache"; import prependDirectivePlugin from "./plugins/prepend-directives"; import preserveDirectivesPlugin from "./plugins/preserve-directives"; import { rawPlugin } from "./plugins/raw"; +import stylesPlugin from "./plugins/styles"; import resolveFileUrlPlugin from "./plugins/resolve-file-url"; import type { ShebangOptions } from "./plugins/shebang"; import { removeShebangPlugin, shebangPlugin } from "./plugins/shebang"; @@ -461,6 +462,8 @@ export const getRollupOptions = async (context: BuildContext, fileCache: FileCac context.options.rollup.isolatedDeclarations, ), + context.options.rollup.style && stylesPlugin(context.options.rollup.style), + context.options.transformer(getTransformerConfig(context.options.transformerName, context)), cachingPlugin( diff --git a/packages/rollup-plugin-styles/src/index.ts b/packages/packem/src/rollup/plugins/styles/index.ts similarity index 91% rename from packages/rollup-plugin-styles/src/index.ts rename to packages/packem/src/rollup/plugins/styles/index.ts index 0bbfc08fc..e2d688221 100644 --- a/packages/rollup-plugin-styles/src/index.ts +++ b/packages/packem/src/rollup/plugins/styles/index.ts @@ -6,20 +6,19 @@ import type { OutputAsset, OutputChunk, Plugin } from "rollup"; import Loaders from "./loaders"; import type { Extracted, LoaderContext } from "./loaders/types"; -import type { ExtractedData, Options, PostCSSLoaderOptions } from "./types"; +import type { ExtractedData, PostCSSLoaderOptions, StyleOptions } from "./types"; import concat from "./utils/concat"; import { ensurePCSSOption, ensurePCSSPlugins, ensureUseOption, inferHandlerOption, inferModeOption, inferOption, inferSourceMapOption } from "./utils/options"; import { humanlizePath, isAbsolutePath, isRelativePath, normalizePath } from "./utils/path"; import { mm } from "./utils/sourcemap"; // eslint-disable-next-line sonarjs/cognitive-complexity -export default (options: Options = {}): Plugin => { +export default (options: StyleOptions = {}): Plugin => { const isIncluded = createFilter(options.include, options.exclude); const sourceMap = inferSourceMapOption(options.sourceMap); const loaderOptions: PostCSSLoaderOptions = { ...inferModeOption(options.mode), - autoModules: options.autoModules ?? false, config: inferOption(options.config, {}), dts: options.dts ?? false, @@ -76,6 +75,7 @@ export default (options: Options = {}): Plugin => { do { const imports: string[] = []; + for (const id of current) { if (traversed.has(id)) { // eslint-disable-next-line no-continue @@ -100,6 +100,7 @@ export default (options: Options = {}): Plugin => { current = imports; } while (current.some((id) => !loaders.isSupported(id))); + ids.push(...current); } @@ -120,7 +121,7 @@ export default (options: Options = {}): Plugin => { return; } - const dir = options_.dir ?? path.dirname(options_.file!); + const directory = options_.dir ?? path.dirname(options_.file!); const chunks = Object.values(bundle).filter((c): c is OutputChunk => c.type === "chunk"); const manual = chunks.filter((c) => !c.facadeModuleId); const emitted = options_.preserveModules ? chunks : chunks.filter((c) => c.isEntry || c.isDynamicEntry); @@ -132,11 +133,11 @@ export default (options: Options = {}): Plugin => { typeof loaderOptions.extract === "string" ? normalizePath(loaderOptions.extract).replace(/^\.[/\\]/, "") : normalizePath(`${name}.css`); if (isAbsolutePath(fileName)) { - this.error(["Extraction path must be relative to the output directory,", `which is ${humanlizePath(dir)}`].join("\n")); + this.error(["Extraction path must be relative to the output directory,", `which is ${humanlizePath(directory)}`].join("\n")); } if (isRelativePath(fileName)) { - this.error(["Extraction path must be nested inside output directory,", `which is ${humanlizePath(dir)}`].join("\n")); + this.error(["Extraction path must be nested inside output directory,", `which is ${humanlizePath(directory)}`].join("\n")); } const entries = extracted.filter((e) => ids.includes(e.id)).sort((a, b) => ids.lastIndexOf(a.id) - ids.lastIndexOf(b.id)); @@ -146,7 +147,7 @@ export default (options: Options = {}): Plugin => { return { css: result.css, map: mm(result.map.toString()) - .relative(path.dirname(path.resolve(dir, fileName))) + .relative(path.dirname(path.resolve(directory, fileName))) .toString(), name: fileName, }; @@ -159,6 +160,7 @@ export default (options: Options = {}): Plugin => { if (options_.preserveModules) { const { dir, name } = path.parse(chunk.fileName); + return dir ? `${dir}/${name}` : name; } @@ -175,6 +177,7 @@ export default (options: Options = {}): Plugin => { do { const imports: string[] = []; + for (const id of current) { if (traversed.has(id)) { continue; @@ -205,6 +208,7 @@ export default (options: Options = {}): Plugin => { }; const moved: string[] = []; + if (typeof loaderOptions.extract === "string") { const ids: string[] = []; @@ -320,13 +324,13 @@ export default (options: Options = {}): Plugin => { }); if (sourceMap.inline) { - map.modify((m) => sourceMap.transform?.(m, normalizePath(dir, fileName))); + map.modify((m) => sourceMap.transform?.(m, normalizePath(directory, fileName))); (bundle[fileName] as OutputAsset).source += map.toCommentData(); } else { const mapFileName = `${fileName}.map`; - map.modify((m) => sourceMap.transform?.(m, normalizePath(dir, mapFileName))); + map.modify((m) => sourceMap.transform?.(m, normalizePath(directory, mapFileName))); this.emitFile({ fileName: mapFileName, source: map.toString(), type: "asset" }); @@ -338,7 +342,7 @@ export default (options: Options = {}): Plugin => { } }, - name: "styles", + name: "packem:styles", async transform(code, id) { if (!isIncluded(id) || !loaders.isSupported(id)) { @@ -350,17 +354,6 @@ export default (options: Options = {}): Plugin => { return null; } - // Check if file was already processed into JS - // by other instance(s) of this or other plugin(s) - try { - this.parse(code, {}); // If it doesn't throw... - this.warn(`Skipping processed file ${humanlizePath(id)}`); - - return null; - } catch { - // Was not already processed, continuing - } - if (typeof options.onImport === "function") { options.onImport(code, id); } @@ -375,7 +368,7 @@ export default (options: Options = {}): Plugin => { warn: this.warn.bind(this), }; - const res = await loaders.process({ code }, context); + const result = await loaders.process({ code }, context); for (const dep of context.deps) { this.addWatchFile(dep); @@ -385,17 +378,17 @@ export default (options: Options = {}): Plugin => { this.emitFile({ fileName, source, type: "asset" }); } - if (res.extracted) { - const { id } = res.extracted; + if (result.extracted) { + const { id } = result.extracted; extracted = extracted.filter((e) => e.id !== id); - extracted.push(res.extracted); + extracted.push(result.extracted); } return { - code: res.code, - map: sourceMap && res.map ? res.map : { mappings: "" as const }, - moduleSideEffects: res.extracted ? true : null, + code: result.code, + map: sourceMap && result.map ? result.map : { mappings: "" as const }, + moduleSideEffects: result.extracted ? true : null, }; }, }; diff --git a/packages/rollup-plugin-styles/src/loaders/index.ts b/packages/packem/src/rollup/plugins/styles/loaders/index.ts similarity index 88% rename from packages/rollup-plugin-styles/src/loaders/index.ts rename to packages/packem/src/rollup/plugins/styles/loaders/index.ts index a18853f9e..a4e9a1bed 100644 --- a/packages/rollup-plugin-styles/src/loaders/index.ts +++ b/packages/packem/src/rollup/plugins/styles/loaders/index.ts @@ -22,7 +22,7 @@ function matchFile(file: string, condition: Loader["test"]): boolean { // This queue makes sure one thread is always available, // which is necessary for some cases // ex.: https://github.com/sass/node-sass/issues/857 -const threadPoolSize = process.env.UV_THREADPOOL_SIZE ? Number.parseInt(process.env.UV_THREADPOOL_SIZE) : 4; // default `libuv` threadpool size +const threadPoolSize = process.env.UV_THREADPOOL_SIZE ? Number.parseInt(process.env.UV_THREADPOOL_SIZE, 10) : 4; // default `libuv` threadpool size /** Options for {@link Loaders} class */ interface LoadersOptions { @@ -43,7 +43,7 @@ export default class Loaders { private workQueue?: PQueue; - constructor(options: LoadersOptions) { + public constructor(options: LoadersOptions) { this.use = new Map(options.use.reverse()); this.test = (file): boolean => options.extensions.some((extension) => file.toLowerCase().endsWith(extension)); this.add(postcssLoader, sourcemapLoader, sassLoader, lessLoader, stylusLoader); @@ -53,7 +53,7 @@ export default class Loaders { } } - add>(...loaders: Loader[]): void { + public add>(...loaders: Loader[]): void { for (const loader of loaders) { if (!this.use.has(loader.name)) { continue; @@ -63,7 +63,7 @@ export default class Loaders { } } - isSupported(file: string): boolean { + public isSupported(file: string): boolean { if (this.test(file)) { return true; } @@ -77,7 +77,7 @@ export default class Loaders { return false; } - async process(payload: Payload, context: LoaderContext): Promise { + public async process(payload: Payload, context: LoaderContext): Promise { if (!this.workQueue) { const { default: pQueue } = await import("p-queue"); diff --git a/packages/rollup-plugin-styles/src/loaders/less/importer.ts b/packages/packem/src/rollup/plugins/styles/loaders/less/importer.ts similarity index 100% rename from packages/rollup-plugin-styles/src/loaders/less/importer.ts rename to packages/packem/src/rollup/plugins/styles/loaders/less/importer.ts diff --git a/packages/rollup-plugin-styles/src/loaders/less/index.ts b/packages/packem/src/rollup/plugins/styles/loaders/less/index.ts similarity index 94% rename from packages/rollup-plugin-styles/src/loaders/less/index.ts rename to packages/packem/src/rollup/plugins/styles/loaders/less/index.ts index 3635a3f7a..6c19c7977 100644 --- a/packages/rollup-plugin-styles/src/loaders/less/index.ts +++ b/packages/packem/src/rollup/plugins/styles/loaders/less/index.ts @@ -30,7 +30,6 @@ const loader: Loader = { const deps = result.imports; - // eslint-disable-next-line no-loops/no-loops,no-restricted-syntax for (const dep of deps) { this.deps.add(normalizePath(dep)); } @@ -41,7 +40,6 @@ const loader: Loader = { test: /\.less$/i, }; - export interface LESSLoaderOptions extends Record, Less.Options {} export default loader; diff --git a/packages/packem/src/rollup/plugins/styles/loaders/postcss/common.ts b/packages/packem/src/rollup/plugins/styles/loaders/postcss/common.ts new file mode 100644 index 000000000..64ae2d6aa --- /dev/null +++ b/packages/packem/src/rollup/plugins/styles/loaders/postcss/common.ts @@ -0,0 +1,6 @@ +// eslint-disable-next-line security/detect-unsafe-regex,@typescript-eslint/no-inferrable-types +export const hashRe: RegExp = /\[hash(?::(\d+))?\]/; +// eslint-disable-next-line @typescript-eslint/no-inferrable-types +export const firstExtRe: RegExp = /(? = (options = {}) => { replaceSymbols(css, imports); - // eslint-disable-next-line no-loops/no-loops,no-restricted-syntax for (const [k, v] of Object.entries(icssExports)) { result.messages.push({ export: { [k]: replaceValueSymbols(v, imports) }, diff --git a/packages/rollup-plugin-styles/src/loaders/postcss/icss/load.ts b/packages/packem/src/rollup/plugins/styles/loaders/postcss/icss/load.ts similarity index 93% rename from packages/rollup-plugin-styles/src/loaders/postcss/icss/load.ts rename to packages/packem/src/rollup/plugins/styles/loaders/postcss/icss/load.ts index 3dc2cb2a9..9fc9d91a6 100644 --- a/packages/rollup-plugin-styles/src/loaders/postcss/icss/load.ts +++ b/packages/packem/src/rollup/plugins/styles/loaders/postcss/icss/load.ts @@ -5,8 +5,6 @@ import type Processor from "postcss/lib/processor"; import { resolveAsync } from "../../../utils/resolve"; -export type Load = (url: string, file: string, extensions: string[], processor: Processor, options?: ProcessOptions) => Promise>; - const load: Load = async (url, file, extensions, processor, options_) => { const options = { basedirs: [dirname(file)], caller: "ICSS loader", extensions }; const from = await resolveAsync([url, `./${url}`], options); @@ -15,7 +13,6 @@ const load: Load = async (url, file, extensions, processor, options_) => { const exports: Record = {}; - // eslint-disable-next-line no-loops/no-loops,no-restricted-syntax for (const message of messages) { if (message.type !== "icss") { // eslint-disable-next-line no-continue @@ -28,4 +25,6 @@ const load: Load = async (url, file, extensions, processor, options_) => { return exports; }; +export type Load = (url: string, file: string, extensions: string[], processor: Processor, options?: ProcessOptions) => Promise>; + export default load; diff --git a/packages/rollup-plugin-styles/src/loaders/postcss/icss/resolve.ts b/packages/packem/src/rollup/plugins/styles/loaders/postcss/icss/resolve.ts similarity index 75% rename from packages/rollup-plugin-styles/src/loaders/postcss/icss/resolve.ts rename to packages/packem/src/rollup/plugins/styles/loaders/postcss/icss/resolve.ts index 364dfc9e3..d8cd432f0 100644 --- a/packages/rollup-plugin-styles/src/loaders/postcss/icss/resolve.ts +++ b/packages/packem/src/rollup/plugins/styles/loaders/postcss/icss/resolve.ts @@ -4,25 +4,26 @@ import type Processor from "postcss/lib/processor"; import type { Load } from "./load"; -export default async function ( +const resolve = async ( icssImports: CSSImports, load: Load, file: string, extensions: string[], processor: Processor, options?: ProcessOptions, -): Promise> { +): Promise> => { const imports: Record = {}; - // eslint-disable-next-line no-loops/no-loops,no-restricted-syntax for await (const [url, values] of Object.entries(icssImports)) { const exports = await load(url, file, extensions, processor, options); - // eslint-disable-next-line no-loops/no-loops,no-restricted-syntax for (const [k, v] of Object.entries(values)) { + // eslint-disable-next-line security/detect-object-injection imports[k] = exports[v]; } } return imports; -} +}; + +export default resolve; diff --git a/packages/rollup-plugin-styles/src/loaders/postcss/import/index.ts b/packages/packem/src/rollup/plugins/styles/loaders/postcss/import/index.ts similarity index 100% rename from packages/rollup-plugin-styles/src/loaders/postcss/import/index.ts rename to packages/packem/src/rollup/plugins/styles/loaders/postcss/import/index.ts diff --git a/packages/rollup-plugin-styles/src/loaders/postcss/import/resolve.ts b/packages/packem/src/rollup/plugins/styles/loaders/postcss/import/resolve.ts similarity index 100% rename from packages/rollup-plugin-styles/src/loaders/postcss/import/resolve.ts rename to packages/packem/src/rollup/plugins/styles/loaders/postcss/import/resolve.ts diff --git a/packages/rollup-plugin-styles/src/loaders/postcss/index.ts b/packages/packem/src/rollup/plugins/styles/loaders/postcss/index.ts similarity index 91% rename from packages/rollup-plugin-styles/src/loaders/postcss/index.ts rename to packages/packem/src/rollup/plugins/styles/loaders/postcss/index.ts index 012831881..4d4932023 100644 --- a/packages/rollup-plugin-styles/src/loaders/postcss/index.ts +++ b/packages/packem/src/rollup/plugins/styles/loaders/postcss/index.ts @@ -167,8 +167,9 @@ const loader: Loader = { const saferId = (id: string): string => safeId(id, basename(this.id)); const modulesVariableName = saferId("modules"); - const output = [`export var ${cssVariableName} = ${JSON.stringify(res.css)};`]; - const dts = [`export var ${cssVariableName}: string;`]; + const output = [`var ${cssVariableName} = ${JSON.stringify(res.css)};`]; + const dts = [`var ${cssVariableName}: string;`]; + const outputExports = [cssVariableName]; if (options.namedExports) { const getClassName = typeof options.namedExports === "function" ? options.namedExports : getClassNameDefault; @@ -182,21 +183,24 @@ const loader: Loader = { const fmt = JSON.stringify(modulesExports[name]); - output.push(`export var ${newName} = ${fmt};`); + output.push(`var ${newName} = ${fmt};`); if (options.dts) { - dts.push(`export var ${newName}: ${fmt};`); + dts.push(`var ${newName}: ${fmt};`); } + + outputExports.push(newName); } } if (options.extract) { + // eslint-disable-next-line no-param-reassign extracted = { css: res.css, id: this.id, map }; } if (options.inject) { if (typeof options.inject === "function") { - output.push(options.inject(cssVariableName, this.id), `var ${modulesVariableName} = ${JSON.stringify(modulesExports)};`); + output.push(options.inject(cssVariableName, this.id, output), `var ${modulesVariableName} = ${JSON.stringify(modulesExports)};`); } else { const { treeshakeable, ...injectorOptions } = typeof options.inject === "object" ? options.inject : ({} as InjectOptions); @@ -204,7 +208,7 @@ const loader: Loader = { const injectorCall = `${injectorName}(${cssVariableName},${JSON.stringify(injectorOptions)});`; if (!injectorId) { - injectorId = await resolveAsync(["./inject-css"], { basedirs: [join(testing ? process.cwd() : baseDirectory, "runtime")] }); + injectorId = await resolveAsync(["./runtime/inject-css"], { basedirs: [join(testing ? process.cwd() : join(baseDirectory, ".."))] }); injectorId = `"${normalizePath(injectorId)}"`; } @@ -244,7 +248,8 @@ const loader: Loader = { const defaultExport = `export default ${supportModules ? modulesVariableName : cssVariableName};`; - output.push(defaultExport); + const namedExport = `export {\n ${outputExports.filter(Boolean).join(",\n ")}\n};`; + output.push(defaultExport, namedExport); if (options.dts && isAccessibleSync(this.id)) { if (supportModules) @@ -257,7 +262,7 @@ const loader: Loader = { `declare const ${modulesVariableName}: ModulesExports;`, ); - dts.push(defaultExport); + dts.push(defaultExport, namedExport); writeFileSync(`${this.id}.d.ts`, dts.filter(Boolean).join("\n")); } diff --git a/packages/rollup-plugin-styles/src/loaders/postcss/modules/generate.ts b/packages/packem/src/rollup/plugins/styles/loaders/postcss/modules/generate.ts similarity index 100% rename from packages/rollup-plugin-styles/src/loaders/postcss/modules/generate.ts rename to packages/packem/src/rollup/plugins/styles/loaders/postcss/modules/generate.ts diff --git a/packages/rollup-plugin-styles/src/loaders/postcss/modules/index.ts b/packages/packem/src/rollup/plugins/styles/loaders/postcss/modules/index.ts similarity index 100% rename from packages/rollup-plugin-styles/src/loaders/postcss/modules/index.ts rename to packages/packem/src/rollup/plugins/styles/loaders/postcss/modules/index.ts diff --git a/packages/rollup-plugin-styles/src/loaders/postcss/noop.ts b/packages/packem/src/rollup/plugins/styles/loaders/postcss/noop.ts similarity index 100% rename from packages/rollup-plugin-styles/src/loaders/postcss/noop.ts rename to packages/packem/src/rollup/plugins/styles/loaders/postcss/noop.ts diff --git a/packages/rollup-plugin-styles/src/loaders/postcss/url/generate.ts b/packages/packem/src/rollup/plugins/styles/loaders/postcss/url/generate.ts similarity index 100% rename from packages/rollup-plugin-styles/src/loaders/postcss/url/generate.ts rename to packages/packem/src/rollup/plugins/styles/loaders/postcss/url/generate.ts diff --git a/packages/rollup-plugin-styles/src/loaders/postcss/url/index.ts b/packages/packem/src/rollup/plugins/styles/loaders/postcss/url/index.ts similarity index 87% rename from packages/rollup-plugin-styles/src/loaders/postcss/url/index.ts rename to packages/packem/src/rollup/plugins/styles/loaders/postcss/url/index.ts index 4f5f4c415..7f39b8f16 100644 --- a/packages/rollup-plugin-styles/src/loaders/postcss/url/index.ts +++ b/packages/packem/src/rollup/plugins/styles/loaders/postcss/url/index.ts @@ -15,6 +15,8 @@ import { isDeclWithUrl, walkUrls } from "./utils"; const name = "styles-url"; const placeholderHashDefault = "assets/[name]-[hash][extname]"; const placeholderNoHashDefault = "assets/[name][extname]"; +const defaultpublicPath = "./"; +const defaultAssetDir = "."; /** URL handler options */ export interface UrlOptions { @@ -29,7 +31,7 @@ export interface UrlOptions { * which is not included into resulting URL * @default "." */ - assetDir?: string; + assetDir?: string | ((original: string, resolved: string, file: string) => string); /** * Enable/disable name generation with hash for outputted CSS assets * or provide your own placeholder with the following blocks: @@ -51,7 +53,7 @@ export interface UrlOptions { * Public Path for URLs in CSS files * @default "./" */ - publicPath?: string; + publicPath?: string | ((original: string, resolved: string, file: string) => string); /** * Provide custom resolver for URLs * in place of the default one @@ -62,8 +64,8 @@ export interface UrlOptions { // eslint-disable-next-line sonarjs/cognitive-complexity const plugin: PluginCreator = (options = {}) => { const inline = options.inline ?? false; - const publicPath = options.publicPath ?? "./"; - const assetDirectory = options.assetDir ?? "."; + const publicPath = options.publicPath ?? defaultpublicPath; + const assetDirectory = options.assetDir ?? defaultAssetDir; const resolve = options.resolve ?? resolveDefault; const alias = options.alias ?? {}; const placeholder = (options.hash ?? true) ? (typeof options.hash === "string" ? options.hash : placeholderHashDefault) : placeholderNoHashDefault; @@ -75,7 +77,8 @@ const plugin: PluginCreator = (options = {}) => { } const { file } = css.source.input; - const map = mm(css.source.input.map.text).resolve(dirname(file)).toConsumer(); + + const map = mm(css.source.input.map?.text).resolve(dirname(file)).toConsumer(); const urlList: { basedirs: Set; @@ -95,7 +98,7 @@ const plugin: PluginCreator = (options = {}) => { const parsed = valueParser(decl.value); walkUrls(parsed, (url, node) => { // Resolve aliases - // eslint-disable-next-line no-loops/no-loops,no-restricted-syntax + for (const [from, to] of Object.entries(alias)) { if (url !== from && !url.startsWith(`${from}/`)) { // eslint-disable-next-line no-continue @@ -120,7 +123,9 @@ const plugin: PluginCreator = (options = {}) => { // Skip Web URLs if (!isAbsolutePath(url)) { try { + // eslint-disable-next-line no-new new URL(url); + return; } catch { // Is not a Web URL, continuing @@ -154,10 +159,9 @@ const plugin: PluginCreator = (options = {}) => { const usedNames = new Map(); - // eslint-disable-next-line no-loops/no-loops,no-restricted-syntax for await (const { basedirs, decl, node, parsed, url } of urlList) { let resolved: UrlFile | undefined; - // eslint-disable-next-line no-loops/no-loops,no-restricted-syntax + for await (const basedir of basedirs) { try { if (!resolved) { @@ -194,21 +198,26 @@ const plugin: PluginCreator = (options = {}) => { // Avoid file overrides const hasExtension = firstExtensionRe.test(unsafeTo); - // eslint-disable-next-line no-loops/no-loops for (let index = 1; usedNames.has(to) && usedNames.get(to) !== from; index++) { to = hasExtension ? unsafeTo.replace(firstExtensionRe, `${index}$1`) : `${unsafeTo}${index}`; } usedNames.set(to, from); + const resolvedPublicPath = + typeof publicPath === "string" + ? publicPath + (/[/\\]$/.test(publicPath) ? "" : "/") + basename(to) + : `${defaultpublicPath}${basename(to)}`; + node.type = "string"; - node.value = publicPath + (/[/\\]$/.test(publicPath) ? "" : "/") + basename(to); + node.value = typeof publicPath === "function" ? publicPath(node.value, resolvedPublicPath, file) : resolvedPublicPath; if (urlQuery) { node.value += urlQuery; } - to = normalizePath(assetDirectory, to); + to = normalizePath(typeof assetDirectory === "string" ? assetDirectory : defaultAssetDir, to); + to = typeof assetDirectory === "function" ? assetDirectory(from, to, file) : to; result.messages.push({ plugin: name, source, to, type: "asset" }); } diff --git a/packages/rollup-plugin-styles/src/loaders/postcss/url/inline.ts b/packages/packem/src/rollup/plugins/styles/loaders/postcss/url/inline.ts similarity index 100% rename from packages/rollup-plugin-styles/src/loaders/postcss/url/inline.ts rename to packages/packem/src/rollup/plugins/styles/loaders/postcss/url/inline.ts diff --git a/packages/rollup-plugin-styles/src/loaders/postcss/url/resolve.ts b/packages/packem/src/rollup/plugins/styles/loaders/postcss/url/resolve.ts similarity index 100% rename from packages/rollup-plugin-styles/src/loaders/postcss/url/resolve.ts rename to packages/packem/src/rollup/plugins/styles/loaders/postcss/url/resolve.ts diff --git a/packages/rollup-plugin-styles/src/loaders/postcss/url/utils.ts b/packages/packem/src/rollup/plugins/styles/loaders/postcss/url/utils.ts similarity index 95% rename from packages/rollup-plugin-styles/src/loaders/postcss/url/utils.ts rename to packages/packem/src/rollup/plugins/styles/loaders/postcss/url/utils.ts index 0971eb1c7..d09fca6fe 100644 --- a/packages/rollup-plugin-styles/src/loaders/postcss/url/utils.ts +++ b/packages/packem/src/rollup/plugins/styles/loaders/postcss/url/utils.ts @@ -25,7 +25,6 @@ export const walkUrls = (parsed: ParsedValue, callback: (url: string, node?: Nod } if (imageSetFunctionRe.test(node.value)) { - // eslint-disable-next-line no-loops/no-loops,no-restricted-syntax for (const nNode of node.nodes) { if (nNode.type === "string") { callback(nNode.value.replaceAll(/^\s+|\s+$/g, ""), nNode); diff --git a/packages/rollup-plugin-styles/src/loaders/sass/importer.ts b/packages/packem/src/rollup/plugins/styles/loaders/sass/importer.ts similarity index 100% rename from packages/rollup-plugin-styles/src/loaders/sass/importer.ts rename to packages/packem/src/rollup/plugins/styles/loaders/sass/importer.ts diff --git a/packages/rollup-plugin-styles/src/loaders/sass/index.ts b/packages/packem/src/rollup/plugins/styles/loaders/sass/index.ts similarity index 95% rename from packages/rollup-plugin-styles/src/loaders/sass/index.ts rename to packages/packem/src/rollup/plugins/styles/loaders/sass/index.ts index 6c73fda07..e6b0f25e2 100644 --- a/packages/rollup-plugin-styles/src/loaders/sass/index.ts +++ b/packages/packem/src/rollup/plugins/styles/loaders/sass/index.ts @@ -31,7 +31,6 @@ const loader: Loader = { } const render = async (options: sass.Options): Promise => - // eslint-disable-next-line compat/compat await new Promise((resolve, reject) => { if (sync) { resolve(sass.renderSync(options)); @@ -66,7 +65,6 @@ const loader: Loader = { const deps = result.stats.includedFiles; - // eslint-disable-next-line no-loops/no-loops,no-restricted-syntax for (const dep of deps) { this.deps.add(normalizePath(dep)); } diff --git a/packages/rollup-plugin-styles/src/loaders/sass/load.ts b/packages/packem/src/rollup/plugins/styles/loaders/sass/load.ts similarity index 90% rename from packages/rollup-plugin-styles/src/loaders/sass/load.ts rename to packages/packem/src/rollup/plugins/styles/loaders/sass/load.ts index cc23d9350..f8b507fbc 100644 --- a/packages/rollup-plugin-styles/src/loaders/sass/load.ts +++ b/packages/packem/src/rollup/plugins/styles/loaders/sass/load.ts @@ -3,7 +3,7 @@ import arrayFmt from "../../utils/array-fmt"; const ids = ["sass", "node-sass"]; const idsFmt = arrayFmt(ids); -export default async function (impl?: string): Promise<[sass.Sass, string]> { +const load = async (impl?: string): Promise<[sass.Sass, string]> => { // Loading provided implementation if (impl) { return await import(impl) @@ -30,4 +30,6 @@ export default async function (impl?: string): Promise<[sass.Sass, string]> { } throw new Error(`You need to install ${idsFmt} package in order to process Sass files`); -} +}; + +export default load; diff --git a/packages/rollup-plugin-styles/src/loaders/sourcemap.ts b/packages/packem/src/rollup/plugins/styles/loaders/sourcemap.ts similarity index 100% rename from packages/rollup-plugin-styles/src/loaders/sourcemap.ts rename to packages/packem/src/rollup/plugins/styles/loaders/sourcemap.ts diff --git a/packages/rollup-plugin-styles/src/loaders/stylus.ts b/packages/packem/src/rollup/plugins/styles/loaders/stylus.ts similarity index 100% rename from packages/rollup-plugin-styles/src/loaders/stylus.ts rename to packages/packem/src/rollup/plugins/styles/loaders/stylus.ts diff --git a/packages/rollup-plugin-styles/src/loaders/types.ts b/packages/packem/src/rollup/plugins/styles/loaders/types.ts similarity index 96% rename from packages/rollup-plugin-styles/src/loaders/types.ts rename to packages/packem/src/rollup/plugins/styles/loaders/types.ts index 72a76e5e7..1f69ee27a 100644 --- a/packages/rollup-plugin-styles/src/loaders/types.ts +++ b/packages/packem/src/rollup/plugins/styles/loaders/types.ts @@ -38,7 +38,7 @@ export interface LoaderContext> { /** [Plugin's context](https://rollupjs.org/guide/en#plugin-context) */ readonly plugin: PluginContext; /** @see {@link Options.sourceMap} */ - readonly sourceMap: false | (SourceMapOptions & { inline: boolean }); + readonly sourceMap: false | ({ inline: boolean } & SourceMapOptions); /** [Function for emitting a warning](https://rollupjs.org/guide/en/#thiswarnwarning-string--rollupwarning-position-number---column-number-line-number---void) */ readonly warn: PluginContext["warn"]; } diff --git a/packages/rollup-plugin-styles/src/runtime/inject-css.js b/packages/packem/src/rollup/plugins/styles/runtime/inject-css.ts similarity index 81% rename from packages/rollup-plugin-styles/src/runtime/inject-css.js rename to packages/packem/src/rollup/plugins/styles/runtime/inject-css.ts index 62e15ad8e..601fe5e62 100644 --- a/packages/rollup-plugin-styles/src/runtime/inject-css.js +++ b/packages/packem/src/rollup/plugins/styles/runtime/inject-css.ts @@ -1,7 +1,7 @@ /** @type {HTMLElement[]} */ -const containers = []; +const containers: any[] = []; /** @type {{prepend:HTMLStyleElement,append:HTMLStyleElement}[]} */ -const styleTags = []; +const styleTags: Record[] = []; /** * @param {string} css @@ -12,7 +12,15 @@ const styleTags = []; * @param {Record} [options.attributes] * @returns {void} */ -export default function (css, options) { +export default ( + css: string, + options: { + attributes?: Record; + container?: string; + prepend?: boolean; + singleTag?: boolean; + }, +): void => { if (!css || typeof document === "undefined") { return; } @@ -22,13 +30,14 @@ export default function (css, options) { const container = typeof options.container === "string" ? document.querySelector(options.container) : document.querySelectorAll("head")[0]; - function createStyleTag() { + const createStyleTag = () => { const styleTag = document.createElement("style"); styleTag.setAttribute("type", "text/css"); if (options.attributes) { const k = Object.keys(options.attributes); + for (const element of k) { styleTag.setAttribute(element, options.attributes[element]); } @@ -43,7 +52,7 @@ export default function (css, options) { container.insertAdjacentElement(pos, styleTag); return styleTag; - } + }; /** @type {HTMLStyleElement} */ let styleTag; @@ -53,10 +62,11 @@ export default function (css, options) { if (id === -1) { id = containers.push(container) - 1; + styleTags[id] = {}; } - styleTag = styleTags[id] && styleTags[id][position] ? styleTags[id][position] : (styleTags[id][position] = createStyleTag()); + styleTag = styleTags[id]?.[position] ? styleTags[id][position] : (styleTags[id][position] = createStyleTag()); } else { styleTag = createStyleTag(); } @@ -71,4 +81,4 @@ export default function (css, options) { } else { styleTag.append(document.createTextNode(css)); } -} +}; diff --git a/packages/rollup-plugin-styles/src/types.ts b/packages/packem/src/rollup/plugins/styles/types.ts similarity index 84% rename from packages/rollup-plugin-styles/src/types.ts rename to packages/packem/src/rollup/plugins/styles/types.ts index e40a9c9ef..2a87037d1 100644 --- a/packages/rollup-plugin-styles/src/types.ts +++ b/packages/packem/src/rollup/plugins/styles/types.ts @@ -22,46 +22,46 @@ export interface PostCSSConfigLoaderOptions { /** Options for PostCSS loader */ export interface PostCSSLoaderOptions extends Record { - /** @see {@link Options.autoModules} */ - autoModules: NonNullable; - /** @see {@link Options.config} */ - config: Exclude; - /** @see {@link Options.dts} */ - dts: NonNullable; - /** @see {@link Options.mode} */ + /** @see {@link StyleOptions.autoModules} */ + autoModules: NonNullable; + /** @see {@link StyleOptions.config} */ + config: Exclude; + /** @see {@link StyleOptions.dts} */ + dts: NonNullable; + /** @see {@link StyleOptions.mode} */ emit: boolean; - /** @see {@link Options.extensions} */ - extensions: NonNullable; + /** @see {@link StyleOptions.extensions} */ + extensions: NonNullable; - /** @see {@link Options.mode} */ + /** @see {@link StyleOptions.mode} */ extract: boolean | string; - /** @see {@link Options.import} */ - import: Exclude; - /** @see {@link Options.mode} */ - inject: InjectOptions | boolean | ((varname: string, id: string) => string); + /** @see {@link StyleOptions.import} */ + import: Exclude; + /** @see {@link StyleOptions.mode} */ + inject: InjectOptions | boolean | ((varname: string, id: string, output: string[]) => string); - /** @see {@link Options.minimize} */ - minimize: Exclude; - /** @see {@link Options.modules} */ - modules: Exclude; - /** @see {@link Options.namedExports} */ - namedExports: NonNullable; + /** @see {@link StyleOptions.minimize} */ + minimize: Exclude; + /** @see {@link StyleOptions.modules} */ + modules: Exclude; + /** @see {@link StyleOptions.namedExports} */ + namedExports: NonNullable; /** Options for PostCSS processor */ postcss: { - /** @see {@link Options.parser} */ + /** @see {@link StyleOptions.parser} */ parser?: postcss.Parser; - /** @see {@link Options.plugins} */ + /** @see {@link StyleOptions.plugins} */ plugins?: postcss.AcceptedPlugin[]; - /** @see {@link Options.stringifier} */ + /** @see {@link StyleOptions.stringifier} */ stringifier?: postcss.Stringifier; - /** @see {@link Options.syntax} */ + /** @see {@link StyleOptions.syntax} */ syntax?: postcss.Syntax; }; - /** @see {@link Options.to} */ - to: Options["to"]; + /** @see {@link StyleOptions.to} */ + to: StyleOptions["to"]; - /** @see {@link Options.url} */ - url: Exclude; + /** @see {@link StyleOptions.url} */ + url: Exclude; } /** CSS data for extraction */ @@ -107,7 +107,7 @@ export interface InjectOptions { } /** `rollup-plugin-styles`'s full option list */ -export interface Options { +export interface StyleOptions { /** * Aliases for URL and import paths * - ex.: `{"foo":"bar"}` diff --git a/packages/rollup-plugin-styles/src/types/icss-utils.d.ts b/packages/packem/src/rollup/plugins/styles/types/icss-utils.d.ts similarity index 100% rename from packages/rollup-plugin-styles/src/types/icss-utils.d.ts rename to packages/packem/src/rollup/plugins/styles/types/icss-utils.d.ts diff --git a/packages/rollup-plugin-styles/src/types/postcss-modules.d.ts b/packages/packem/src/rollup/plugins/styles/types/postcss-modules.d.ts similarity index 100% rename from packages/rollup-plugin-styles/src/types/postcss-modules.d.ts rename to packages/packem/src/rollup/plugins/styles/types/postcss-modules.d.ts diff --git a/packages/rollup-plugin-styles/src/types/sass.d.ts b/packages/packem/src/rollup/plugins/styles/types/sass.d.ts similarity index 100% rename from packages/rollup-plugin-styles/src/types/sass.d.ts rename to packages/packem/src/rollup/plugins/styles/types/sass.d.ts diff --git a/packages/rollup-plugin-styles/src/types/stylus.d.ts b/packages/packem/src/rollup/plugins/styles/types/stylus.d.ts similarity index 100% rename from packages/rollup-plugin-styles/src/types/stylus.d.ts rename to packages/packem/src/rollup/plugins/styles/types/stylus.d.ts diff --git a/packages/rollup-plugin-styles/src/utils/array-fmt.ts b/packages/packem/src/rollup/plugins/styles/utils/array-fmt.ts similarity index 100% rename from packages/rollup-plugin-styles/src/utils/array-fmt.ts rename to packages/packem/src/rollup/plugins/styles/utils/array-fmt.ts diff --git a/packages/rollup-plugin-styles/src/utils/concat.ts b/packages/packem/src/rollup/plugins/styles/utils/concat.ts similarity index 92% rename from packages/rollup-plugin-styles/src/utils/concat.ts rename to packages/packem/src/rollup/plugins/styles/utils/concat.ts index da143ce4d..426b6ac42 100644 --- a/packages/rollup-plugin-styles/src/utils/concat.ts +++ b/packages/packem/src/rollup/plugins/styles/utils/concat.ts @@ -8,7 +8,7 @@ interface Concatenated { map: SourceMapGenerator; } -export default async function (extracted: Extracted[]): Promise { +const concat = async (extracted: Extracted[]): Promise => { const sm = new SourceMapGenerator({ file: "" }); const content = []; @@ -53,4 +53,6 @@ export default async function (extracted: Extracted[]): Promise { css: content.join("\n"), map: sm, }; -} +}; + +export default concat; diff --git a/packages/rollup-plugin-styles/src/utils/hasher.ts b/packages/packem/src/rollup/plugins/styles/utils/hasher.ts similarity index 100% rename from packages/rollup-plugin-styles/src/utils/hasher.ts rename to packages/packem/src/rollup/plugins/styles/utils/hasher.ts diff --git a/packages/rollup-plugin-styles/src/utils/load-module.ts b/packages/packem/src/rollup/plugins/styles/utils/load-module.ts similarity index 100% rename from packages/rollup-plugin-styles/src/utils/load-module.ts rename to packages/packem/src/rollup/plugins/styles/utils/load-module.ts diff --git a/packages/rollup-plugin-styles/src/utils/options.ts b/packages/packem/src/rollup/plugins/styles/utils/options.ts similarity index 82% rename from packages/rollup-plugin-styles/src/utils/options.ts rename to packages/packem/src/rollup/plugins/styles/utils/options.ts index 68f54055b..fd432022c 100644 --- a/packages/rollup-plugin-styles/src/utils/options.ts +++ b/packages/packem/src/rollup/plugins/styles/utils/options.ts @@ -1,7 +1,7 @@ import type { Result } from "postcss-load-config"; import type { LoaderContext } from "../loaders/types"; -import type { Options, PostCSSLoaderOptions } from "../types"; +import type { PostCSSLoaderOptions, StyleOptions } from "../types"; import arrayFmt from "./array-fmt"; import loadModule from "./load-module"; @@ -25,7 +25,7 @@ interface Mode { const modes = ["inject", "extract", "emit"]; const modesFmt = arrayFmt(modes); -export function inferModeOption(mode: Options["mode"]): Mode { +export function inferModeOption(mode: StyleOptions["mode"]): Mode { const m = Array.isArray(mode) ? mode : ([mode] as const); if (m[0] && !modes.includes(m[0])) { @@ -39,7 +39,7 @@ export function inferModeOption(mode: Options["mode"]): Mode { }; } -export function inferSourceMapOption(sourceMap: Options["sourceMap"]): LoaderContext["sourceMap"] { +export const inferSourceMapOption = (sourceMap: StyleOptions["sourceMap"]): LoaderContext["sourceMap"] => { const sm = Array.isArray(sourceMap) ? sourceMap : ([sourceMap] as const); if (!sm[0]) { @@ -47,9 +47,9 @@ export function inferSourceMapOption(sourceMap: Options["sourceMap"]): LoaderCon } return { content: true, ...sm[1], inline: sm[0] === "inline" }; -} +}; -export function inferHandlerOption }>(option: T | boolean | undefined, alias: T["alias"]): T | false { +export const inferHandlerOption = }>(option: T | boolean | undefined, alias: T["alias"]): T | false => { const opt = inferOption(option, {} as T); if (alias && typeof opt === "object" && !opt.alias) { @@ -57,9 +57,9 @@ export function inferHandlerOption }> } return opt; -} +}; -export function ensureUseOption(options: Options): [string, Record][] { +export const ensureUseOption = (options: StyleOptions): [string, Record][] => { const all: Record]> = { less: ["less", options.less ?? {}], sass: ["sass", options.sass ?? {}], @@ -79,13 +79,13 @@ export function ensureUseOption(options: Options): [string, Record(option: T | string, type: PCSSOption): T { +export const ensurePCSSOption = (option: T | string, type: PCSSOption): T => { if (typeof option !== "string") { return option; } @@ -97,9 +97,9 @@ export function ensurePCSSOption(option: T | string, type: PCSSOption): T { } return module as T; -} +}; -export const ensurePCSSPlugins = (plugins: Options["plugins"]): Result["plugins"] => { +export const ensurePCSSPlugins = (plugins: StyleOptions["plugins"]): Result["plugins"] => { if (plugins === undefined) { return []; } diff --git a/packages/rollup-plugin-styles/src/utils/path.ts b/packages/packem/src/rollup/plugins/styles/utils/path.ts similarity index 100% rename from packages/rollup-plugin-styles/src/utils/path.ts rename to packages/packem/src/rollup/plugins/styles/utils/path.ts diff --git a/packages/rollup-plugin-styles/src/utils/resolve.ts b/packages/packem/src/rollup/plugins/styles/utils/resolve.ts similarity index 62% rename from packages/rollup-plugin-styles/src/utils/resolve.ts rename to packages/packem/src/rollup/plugins/styles/utils/resolve.ts index e1e0ab7f8..d9db56825 100644 --- a/packages/rollup-plugin-styles/src/utils/resolve.ts +++ b/packages/packem/src/rollup/plugins/styles/utils/resolve.ts @@ -1,29 +1,16 @@ import path from "node:path"; import { fileURLToPath } from "node:url"; -import type { AsyncOpts, PackageJSON, SyncOpts } from "resolve"; -import resolver from "resolve"; +import type { PackageJSON } from "resolve"; import { legacy as resolveFields, resolve as resolveExports } from "resolve.exports"; +import internalResolveAsync from "resolve/async"; +import internalResolveSync from "resolve/sync"; import arrayFmt from "./array-fmt"; const baseDirectory = path.dirname(fileURLToPath(import.meta.url)); -type Package = PackageJSON; -type PackageFilterFunction = (package_: Package, pkgfile: string) => Package; - -export interface ResolveOptions { - /** directories to begin resolving from (defaults to `[__dirname]`) */ - basedirs?: string[]; - /** name of the caller for error message (default to `Resolver`) */ - caller?: string; - /** array of file extensions to search in order (defaults to `[".mjs", ".js", ".cjs", ".json"]`) */ - extensions?: ReadonlyArray | string; - /** transform the parsed `package.json` contents before looking at the "main" field */ - packageFilter?: PackageFilterFunction; - /** don't resolve `basedirs` to real path before resolving. (defaults to `true`) */ - preserveSymlinks?: boolean; -} +type PackageFilterFunction = (package_: PackageJSON, pkgfile: string) => PackageJSON; interface ResolveDefaultOptions { basedirs: ReadonlyArray; @@ -40,18 +27,21 @@ interface PackageFilterBuilderOptions { type PackageFilterBuilderFunction = (options?: PackageFilterBuilderOptions) => PackageFilterFunction; +// eslint-disable-next-line import/exports-last export const packageFilterBuilder: PackageFilterBuilderFunction = (options = {}) => { const conditions = options.conditions ?? ["style", "import", "require"]; const fields = options.fields ?? ["style", "module", "main"]; - return (package_) => { + + return (packageJson: PackageJSON) => { // Check `exports` fields try { - const resolvedExport = resolveExports(package_, ".", { conditions, unsafe: true }); + const resolvedExport = resolveExports(packageJson, ".", { conditions, unsafe: true }); if (typeof resolvedExport === "string") { - package_.main = resolvedExport; + // eslint-disable-next-line no-param-reassign + packageJson.main = resolvedExport; - return package_; + return packageJson; } } catch { /* noop */ @@ -59,17 +49,18 @@ export const packageFilterBuilder: PackageFilterBuilderFunction = (options = {}) // Check independent fields try { - const resolvedField = resolveFields(package_, { browser: false, fields }); + const resolvedField = resolveFields(packageJson, { browser: false, fields }); + if (typeof resolvedField === "string") { - package_.main = resolvedField; + packageJson.main = resolvedField; - return package_; + return packageJson; } } catch { /* noop */ } - return package_; + return packageJson; }; }; @@ -81,18 +72,24 @@ const defaultOptions: ResolveDefaultOptions = { preserveSymlinks: true, }; -const resolverAsync = async (id: string, options: AsyncOpts = {}): Promise => - // eslint-disable-next-line compat/compat - await new Promise((resolve) => { - resolver(id, options, (_, res) => resolve(res)); - }); - -export async function resolveAsync(ids: string[], userOptions: ResolveOptions): Promise { +export const resolveAsync = async (ids: string[], userOptions: ResolveOptions): Promise => { const options = { ...defaultOptions, ...userOptions }; + for await (const basedir of options.basedirs) { const options_ = { ...options, basedir, basedirs: undefined, caller: undefined }; + for await (const id of ids) { - const resolved = await resolverAsync(id, options_); + const resolved = await new Promise((resolve, reject) => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + internalResolveAsync(id, options_, (error: any, result: PromiseLike | string) => { + if (error) { + // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors + reject(error); + } else { + resolve(result); + } + }); + }); if (resolved) { return resolved; @@ -101,30 +98,39 @@ export async function resolveAsync(ids: string[], userOptions: ResolveOptions): } throw new Error(`${options.caller} could not resolve ${arrayFmt(ids)}`); -} - -const resolverSync = (id: string, options: SyncOpts = {}): string | undefined => { - try { - return resolver.sync(id, options); - } catch { - return undefined; - } }; -export function resolveSync(ids: string[], userOptions: ResolveOptions): string { +export const resolveSync = (ids: string[], userOptions: ResolveOptions): string => { const options = { ...defaultOptions, ...userOptions }; for (const basedir of options.basedirs) { const options_ = { ...options, basedir, basedirs: undefined, caller: undefined }; for (const id of ids) { - const resolved = resolverSync(id, options_); - - if (resolved) { - return resolved; + try { + const resolved = internalResolveSync(id, options_); + + if (resolved) { + return resolved; + } + } catch { + /* noop */ } } } throw new Error(`${options.caller} could not resolve ${arrayFmt(ids)}`); +}; + +export interface ResolveOptions { + /** directories to begin resolving from (defaults to `[__dirname]`) */ + basedirs?: string[]; + /** name of the caller for error message (default to `Resolver`) */ + caller?: string; + /** array of file extensions to search in order (defaults to `[".mjs", ".js", ".cjs", ".json"]`) */ + extensions?: ReadonlyArray | string; + /** transform the parsed `package.json` contents before looking at the "main" field */ + packageFilter?: PackageFilterFunction; + /** don't resolve `basedirs` to real path before resolving. (defaults to `true`) */ + preserveSymlinks?: boolean; } diff --git a/packages/rollup-plugin-styles/src/utils/safe-id.ts b/packages/packem/src/rollup/plugins/styles/utils/safe-id.ts similarity index 100% rename from packages/rollup-plugin-styles/src/utils/safe-id.ts rename to packages/packem/src/rollup/plugins/styles/utils/safe-id.ts diff --git a/packages/rollup-plugin-styles/src/utils/sourcemap.ts b/packages/packem/src/rollup/plugins/styles/utils/sourcemap.ts similarity index 76% rename from packages/rollup-plugin-styles/src/utils/sourcemap.ts rename to packages/packem/src/rollup/plugins/styles/utils/sourcemap.ts index 7e5ebcd6b..a00d2aea3 100644 --- a/packages/rollup-plugin-styles/src/utils/sourcemap.ts +++ b/packages/packem/src/rollup/plugins/styles/utils/sourcemap.ts @@ -6,42 +6,14 @@ import { SourceMapConsumer } from "source-map-js"; import { dataURIRe } from "../loaders/postcss/common"; import { isAbsolutePath, normalizePath, relativePath, resolvePath } from "./path"; +// eslint-disable-next-line regexp/no-misleading-capturing-group,regexp/no-super-linear-backtracking const mapBlockRe = /(?:\n|\r\n)?\/\*[#*@]+\s*sourceMappingURL\s*=\s*(\S+)\s*\*+\//g; const mapLineRe = /(?:\n|\r\n)?\/\/[#@]+\s*sourceMappingURL\s*=\s*(\S+)\s*?$/gm; -export async function getMap(code: string, id?: string): Promise { - const [, data] = mapBlockRe.exec(code) ?? mapLineRe.exec(code) ?? []; - - if (!data) { - return; - } - - const [, uriMap] = dataURIRe.exec(data) ?? []; - - if (uriMap) { - return Buffer.from(uriMap, "base64").toString(); - } - - if (!id) { - throw new Error("Extracted map detected, but no ID is provided"); - } - - const mapFileName = resolve(dirname(id), data); - const exists = isAccessibleSync(mapFileName); - - if (!exists) { - return; - } - - return readFileSync(mapFileName); -} - -export const stripMap = (code: string): string => code.replaceAll(mapBlockRe, "").replaceAll(mapLineRe, ""); - class MapModifier { private readonly map?: RawSourceMap; - constructor(map?: RawSourceMap | string) { + public constructor(map?: RawSourceMap | string) { if (typeof map === "string") { try { this.map = JSON.parse(map) as RawSourceMap; @@ -53,7 +25,7 @@ class MapModifier { } } - modify(f: (m: RawSourceMap) => void): this { + public modify(f: (m: RawSourceMap) => void): this { if (!this.map) { return this; } @@ -63,7 +35,7 @@ class MapModifier { return this; } - modifySources(op: (source: string) => string): this { + public modifySources(op: (source: string) => string): this { if (!this.map) { return this; } @@ -75,35 +47,35 @@ class MapModifier { return this; } - resolve(dir = process.cwd()): this { + public resolve(directory: string = process.cwd()): this { return this.modifySources((source) => { if (source === "") { return source; } - return resolvePath(dir, source); + return resolvePath(directory, source); }); } - relative(dir = process.cwd()): this { + public relative(directory: string = process.cwd()): this { return this.modifySources((source) => { if (source === "") { return source; } if (isAbsolutePath(source)) { - return relativePath(dir, source); + return relativePath(directory, source); } return normalizePath(source); }); } - toObject(): RawSourceMap | undefined { + public toObject(): RawSourceMap | undefined { return this.map; } - toString(): string | undefined { + public toString(): string | undefined { if (!this.map) { return this.map; } @@ -111,7 +83,7 @@ class MapModifier { return JSON.stringify(this.map); } - toConsumer(): SourceMapConsumer | undefined { + public toConsumer(): SourceMapConsumer | undefined { if (!this.map) { return this.map; } @@ -119,7 +91,7 @@ class MapModifier { return new SourceMapConsumer(this.map); } - toCommentData(): string { + public toCommentData(): string { const map = this.toString(); if (!map) { @@ -131,7 +103,7 @@ class MapModifier { return `\n/*# sourceMappingURL=data:application/json;base64,${sourceMapData} */`; } - toCommentFile(fileName: string): string { + public toCommentFile(fileName: string): string { if (!this.map) { return ""; } @@ -140,4 +112,33 @@ class MapModifier { } } +export const getMap = async (code: string, id?: string): Promise => { + const [, data] = mapBlockRe.exec(code) ?? mapLineRe.exec(code) ?? []; + + if (!data) { + return undefined; + } + + const [, uriMap] = dataURIRe.exec(data) ?? []; + + if (uriMap) { + return Buffer.from(uriMap, "base64").toString(); + } + + if (!id) { + throw new Error("Extracted map detected, but no ID is provided"); + } + + const mapFileName = resolve(dirname(id), data); + const exists = isAccessibleSync(mapFileName); + + if (!exists) { + return undefined; + } + + return readFileSync(mapFileName); +}; + +export const stripMap = (code: string): string => code.replaceAll(mapBlockRe, "").replaceAll(mapLineRe, ""); + export const mm = (map?: RawSourceMap | string): MapModifier => new MapModifier(map); diff --git a/packages/rollup-plugin-styles/src/utils/url.ts b/packages/packem/src/rollup/plugins/styles/utils/url.ts similarity index 100% rename from packages/rollup-plugin-styles/src/utils/url.ts rename to packages/packem/src/rollup/plugins/styles/utils/url.ts diff --git a/packages/packem/src/types.ts b/packages/packem/src/types.ts index 6a3fced41..ec3209f17 100644 --- a/packages/packem/src/types.ts +++ b/packages/packem/src/types.ts @@ -26,6 +26,7 @@ import type { LicenseOptions } from "./rollup/plugins/license"; import type { Node10CompatibilityOptions } from "./rollup/plugins/node10-compatibility-plugin"; import type { RawLoaderOptions } from "./rollup/plugins/raw"; import type { ShebangOptions } from "./rollup/plugins/shebang"; +import type { StyleOptions } from "./rollup/plugins/styles/types"; import type { SucrasePluginConfig } from "./rollup/plugins/sucrase/types"; import type { SwcPluginConfig } from "./rollup/plugins/swc/types"; import type { PatchTypesOptions } from "./rollup/plugins/typescript/patch-typescript-types"; @@ -128,6 +129,7 @@ export interface RollupBuildOptions { resolve: RollupNodeResolveOptions | false; shebang?: Partial | false; shim?: EsmShimCjsSyntaxOptions | false; + style?: StyleOptions | false, sucrase?: SucrasePluginConfig | false; swc?: SwcPluginConfig | false; treeshake?: RollupOptions["treeshake"]; diff --git a/packages/rollup-plugin-styles/.eslintignore b/packages/rollup-plugin-styles/.eslintignore deleted file mode 100644 index 7815f821c..000000000 --- a/packages/rollup-plugin-styles/.eslintignore +++ /dev/null @@ -1,15 +0,0 @@ -dist -node_modules -coverage - -__fixtures__ -__docs__ - -vitest.config.ts -.prettierrc.cjs -packem.config.ts -.secretlintrc.cjs -tsconfig.eslint.json - -README.md - diff --git a/packages/rollup-plugin-styles/.eslintrc.cjs b/packages/rollup-plugin-styles/.eslintrc.cjs deleted file mode 100644 index 9c2fe8feb..000000000 --- a/packages/rollup-plugin-styles/.eslintrc.cjs +++ /dev/null @@ -1,90 +0,0 @@ -/** @ts-check */ -// eslint-disable-next-line import/no-commonjs,import/no-unused-modules -const { defineConfig } = require("@anolilab/eslint-config/define-config"); -// eslint-disable-next-line import/no-commonjs -const globals = require("@anolilab/eslint-config/globals"); - -/// -/// -/// -/// -/// - -/** @type {import('eslint').Linter.Config} */ -module.exports = defineConfig({ - env: { - // Your environments (which contains several predefined global variables) - // Most environments are loaded automatically if our rules are added - }, - extends: ["@anolilab/eslint-config", "@anolilab/eslint-config/typescript-type-checking"], - globals: { - ...globals.es2021, - // Your global variables (setting to false means it's not allowed to be reassigned) - // myGlobal: false - }, - ignorePatterns: ["!**/*"], - overrides: [ - { - files: ["*.ts", "*.tsx", "*.mts", "*.cts", "*.js", "*.jsx"], - // Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting - parserOptions: {}, - rules: {}, - }, - { - files: ["*.ts", "*.tsx", "*.mts", "*.cts"], - // Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting - parserOptions: {}, - rules: { - "@typescript-eslint/no-unsafe-argument": "off", - "@typescript-eslint/no-unsafe-assignment": "off", - "@typescript-eslint/no-unsafe-call": "off", - "@typescript-eslint/no-unsafe-member-access": "off", - "@typescript-eslint/no-unsafe-return": "off", - "prefer-template": "off", - }, - }, - { - files: ["*.js", "*.jsx"], - rules: {}, - }, - { - files: ["*.mdx"], - rules: { - "jsx-a11y/anchor-has-content": "off", - // @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/917 - "jsx-a11y/heading-has-content": "off", - }, - }, - { - files: ["src/index.ts"], - rules: { - "import/no-unused-modules": "off", - }, - }, - { - files: ["__docs__/**"], - rules: { - "import/no-unresolved": "off", - "import/no-unused-modules": "off", - "no-console": "off", - "no-undef": "off", - "no-unused-vars": "off", - "unicorn/prefer-top-level-await": "off", - }, - }, - { - files: ["__tests__/**"], - rules: { - "import/no-unused-modules": "off", - }, - }, - ], - parserOptions: { - ecmaVersion: 2021, - project: "./tsconfig.eslint.json", - sourceType: "module", - }, - // Report unused `eslint-disable` comments. - reportUnusedDisableDirectives: true, - root: true, -}); diff --git a/packages/rollup-plugin-styles/.npmignore b/packages/rollup-plugin-styles/.npmignore deleted file mode 100644 index ff4abfc4d..000000000 --- a/packages/rollup-plugin-styles/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -package-lock.json - -src -__tests__ -__stories__ -__fixtures__ -.rpt2_cache -fixup.sh -.releaserc.json diff --git a/packages/rollup-plugin-styles/.prettierignore b/packages/rollup-plugin-styles/.prettierignore deleted file mode 100644 index ebf52909d..000000000 --- a/packages/rollup-plugin-styles/.prettierignore +++ /dev/null @@ -1,9 +0,0 @@ -.gitkeep -.env* -*.ico -*.lock -dist -CHANGELOG.md -coverage -node_modules -.eslintcache diff --git a/packages/rollup-plugin-styles/.prettierrc.cjs b/packages/rollup-plugin-styles/.prettierrc.cjs deleted file mode 100644 index 32f893c08..000000000 --- a/packages/rollup-plugin-styles/.prettierrc.cjs +++ /dev/null @@ -1,5 +0,0 @@ -const config = require("@anolilab/prettier-config"); - -module.exports = { - ...config, -}; diff --git a/packages/rollup-plugin-styles/.releaserc.json b/packages/rollup-plugin-styles/.releaserc.json deleted file mode 100644 index da2ae9344..000000000 --- a/packages/rollup-plugin-styles/.releaserc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "@anolilab/semantic-release-preset/pnpm" -} diff --git a/packages/rollup-plugin-styles/.secretlintignore b/packages/rollup-plugin-styles/.secretlintignore deleted file mode 100644 index 8d4c427fd..000000000 --- a/packages/rollup-plugin-styles/.secretlintignore +++ /dev/null @@ -1,3 +0,0 @@ -.pnpm-store -packages/**/node_modules -node_modules diff --git a/packages/rollup-plugin-styles/.secretlintrc.cjs b/packages/rollup-plugin-styles/.secretlintrc.cjs deleted file mode 100644 index 418ad9ce8..000000000 --- a/packages/rollup-plugin-styles/.secretlintrc.cjs +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - rules: [ - { - id: "@secretlint/secretlint-rule-preset-recommend", - }, - ], -}; diff --git a/packages/rollup-plugin-styles/CHANGELOG.md b/packages/rollup-plugin-styles/CHANGELOG.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/rollup-plugin-styles/LICENSE.md b/packages/rollup-plugin-styles/LICENSE.md deleted file mode 100644 index 88e0cd3d0..000000000 --- a/packages/rollup-plugin-styles/LICENSE.md +++ /dev/null @@ -1,170 +0,0 @@ -MIT License - -Copyright (c) 2024 visulima - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -# Licenses of bundled dependencies - -The published @visulima/rollup-plugin-styles artifact additionally contains code with the following licenses: -MIT - -# Bundled dependencies: - -## decode-uri-component - -License: MIT -By: Sam Verschueren -Repository: SamVerschueren/decode-uri-component - -> The MIT License (MIT) -> -> Copyright (c) 2017, Sam Verschueren (github.com/SamVerschueren) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---- - -## eventemitter3 - -License: MIT -By: Arnout Kazemier -Repository: git://github.com/primus/eventemitter3.git - -> The MIT License (MIT) -> -> Copyright (c) 2014 Arnout Kazemier -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all -> copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -> SOFTWARE. - ---- - -## filter-obj - -License: MIT -By: Sindre Sorhus -Repository: sindresorhus/filter-obj - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---- - -## p-queue - -License: MIT -Repository: sindresorhus/p-queue - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---- - -## p-timeout - -License: MIT -By: Sindre Sorhus -Repository: sindresorhus/p-timeout - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---- - -## query-string - -License: MIT -By: Sindre Sorhus -Repository: sindresorhus/query-string - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---- - -## split-on-first - -License: MIT -By: Sindre Sorhus -Repository: sindresorhus/split-on-first - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - - - diff --git a/packages/rollup-plugin-styles/README.md b/packages/rollup-plugin-styles/README.md deleted file mode 100644 index 7c355dd2f..000000000 --- a/packages/rollup-plugin-styles/README.md +++ /dev/null @@ -1,82 +0,0 @@ -
-

visulima rollup-plugin-styles

-

- Universal Rollup plugin for styles: PostCSS, Sass, Less, Stylus and more -

-
- -
- -
- -[![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url] - -
- ---- - -
-

- - Daniel Bannert's open source work is supported by the community on GitHub Sponsors - -

-
- ---- - -## Install - -```sh -npm install @visulima/rollup-plugin-styles -``` - -```sh -yarn add @visulima/rollup-plugin-styles -``` - -```sh -pnpm add @visulima/rollup-plugin-styles -``` - -## Usage - -### PostCSS - -Install all the necessary dependencies: - -```sh -npm install --save-dev postcss postcss-load-config postcss-modules postcss-modules-extract-imports postcss-modules-local-by-default postcss-modules-scope postcss-modules-values postcss-value-parser icss-utils -``` - -```js - -## Related - -## Supported Node.js Versions - -Libraries in this ecosystem make the best effort to track [Node.js’ release schedule](https://github.com/nodejs/release#release-schedule). -Here’s [a post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a). - -## Contributing - -If you would like to help take a look at the [list of issues](https://github.com/visulima/packem/issues) and check our [Contributing](.github/CONTRIBUTING.md) guidelines. - -> **Note:** please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. - -## Credits - -- [Daniel Bannert](https://github.com/prisis) -- [All Contributors](https://github.com/visulima/packem/graphs/contributors) - -## License - -The visulima rollup-plugin-styles is open-sourced software licensed under the [MIT][license-url] - -[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript -[typescript-url]: "typescript" -[license-image]: https://img.shields.io/npm/l/@visulima/rollup-plugin-styles?color=blueviolet&style=for-the-badge -[license-url]: LICENSE.md "license" -[npm-image]: https://img.shields.io/npm/v/@visulima/rollup-plugin-styles/latest.svg?style=for-the-badge&logo=npm -[npm-url]: https://www.npmjs.com/package/@visulima/rollup-plugin-styles/v/latest "npm" -``` diff --git a/packages/rollup-plugin-styles/package.json b/packages/rollup-plugin-styles/package.json deleted file mode 100644 index 2e1c31ac4..000000000 --- a/packages/rollup-plugin-styles/package.json +++ /dev/null @@ -1,261 +0,0 @@ -{ - "name": "@visulima/rollup-plugin-styles", - "version": "0.0.0", - "description": "Universal Rollup plugin for styles: PostCSS, Sass, Less, Stylus and more", - "keywords": [ - "visulima", - "rollup-plugin-styles", - "rollup", - "rollup-plugin", - "css", - "css-modules", - "postcss", - "sass", - "scss", - "less", - "stylus", - "packem" - ], - "homepage": "https://github.com/visulima/packem/tree/main/packages/rollup-plugin-styles", - "bugs": { - "url": "https://github.com/visulima/packem/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/visulima/packem.git", - "directory": "packages/rollup-plugin-styles" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/prisis" - }, - { - "type": "consulting", - "url": "https://anolilab.com/support" - } - ], - "license": "MIT", - "author": { - "name": "Daniel Bannert", - "email": "d.bannert@anolilab.de" - }, - "sideEffects": false, - "type": "module", - "exports": { - ".": { - "require": { - "types": "./dist/index.d.cts", - "default": "./dist/index.cjs" - }, - "import": { - "types": "./dist/index.d.mts", - "default": "./dist/index.mjs" - } - }, - "./loader/less": { - "require": { - "types": "./dist/loaders/less/index.d.cts", - "default": "./dist/loaders/less/index.cjs" - }, - "import": { - "types": "./dist/loaders/less/index.d.mts", - "default": "./dist/loaders/less/index.mjs" - } - }, - "./loader/postcss": { - "require": { - "types": "./dist/loaders/postcss/index.d.cts", - "default": "./dist/loaders/postcss/index.cjs" - }, - "import": { - "types": "./dist/loaders/postcss/index.d.mts", - "default": "./dist/loaders/postcss/index.mjs" - } - }, - "./loader/sass": { - "require": { - "types": "./dist/loaders/sass/index.d.cts", - "default": "./dist/loaders/sass/index.cjs" - }, - "import": { - "types": "./dist/loaders/sass/index.d.mts", - "default": "./dist/loaders/sass/index.mjs" - } - }, - "./loader/stylus": { - "require": { - "types": "./dist/loaders/stylus.d.cts", - "default": "./dist/loaders/stylus.cjs" - }, - "import": { - "types": "./dist/loaders/stylus.d.mts", - "default": "./dist/loaders/stylus.mjs" - } - }, - "./package.json": "./package.json" - }, - "main": "dist/index.cjs", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "files": [ - "dist", - "README.md", - "CHANGELOG.md" - ], - "scripts": { - "build": "cross-env NODE_ENV=development packem build", - "build:prod": "cross-env NODE_ENV=production packem build", - "clean": "rimraf node_modules dist .eslintcache", - "dev": "pnpm run build --watch", - "lint:eslint": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs", - "lint:eslint:fix": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs --fix", - "lint:package-json": "publint --strict", - "lint:prettier": "prettier --config=.prettierrc.cjs --check .", - "lint:prettier:fix": "prettier --config=.prettierrc.cjs --write .", - "lint:types": "tsc --noEmit", - "test": "vitest run", - "test:coverage": "vitest run --coverage", - "test:ui": "vitest --ui --coverage.enabled=true", - "test:watch": "vitest" - }, - "dependencies": { - "@rollup/pluginutils": "5.1.2", - "@visulima/fs": "2.2.0", - "@visulima/path": "1.0.9", - "cssnano": "7.0.6", - "mime-types": "2.1.35", - "resolve": "2.0.0-next.5", - "resolve.exports": "2.0.2", - "source-map-js": "1.2.1" - }, - "devDependencies": { - "@anolilab/eslint-config": "^15.0.3", - "@anolilab/prettier-config": "^5.0.14", - "@anolilab/semantic-release-pnpm": "1.1.3", - "@anolilab/semantic-release-preset": "^9.0.0", - "@babel/core": "^7.25.2", - "@rushstack/eslint-plugin-security": "^0.8.3", - "@secretlint/secretlint-rule-preset-recommend": "^8.2.4", - "@types/less": "3.0.6", - "@types/mime-types": "^2.1.4", - "@types/node": "18.19.54", - "@types/node-sass": "^4.11.7", - "@types/resolve": "^1.20.6", - "@types/stylus": "^0.48.43", - "@types/uglifycss": "^0.0.11", - "@visulima/packem": "^1.0.5", - "@vitest/coverage-v8": "^2.1.1", - "@vitest/ui": "^2.1.1", - "cross-env": "^7.0.3", - "esbuild": "^0.24.0", - "eslint": "8.57.1", - "eslint-plugin-deprecation": "^3.0.0", - "eslint-plugin-etc": "^2.0.3", - "eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1", - "eslint-plugin-mdx": "^3.1.5", - "eslint-plugin-vitest": "0.4.1", - "eslint-plugin-vitest-globals": "^1.5.0", - "icss-utils": "^5.1.0", - "less": "^4.2.0", - "node-sass": "^9.0.0", - "p-queue": "^8.0.1", - "postcss": "^8.4.47", - "postcss-load-config": "^6.0.1", - "postcss-modules": "6.0.0", - "postcss-modules-extract-imports": "^3.1.0", - "postcss-modules-local-by-default": "^4.0.5", - "postcss-modules-scope": "^3.2.0", - "postcss-modules-values": "^4.0.0", - "postcss-value-parser": "^4.2.0", - "prettier": "^3.3.3", - "query-string": "^9.1.0", - "rimraf": "^6.0.1", - "rollup": "^4.22.5", - "sass": "^1.79.4", - "secretlint": "8.2.4", - "semantic-release": "^24.1.2", - "stylus": "^0.63.0", - "typescript": "^5.6.2", - "vitest": "^2.1.1" - }, - "peerDependencies": { - "icss-utils": "^5.1.0", - "less": "^4.2.0", - "node-sass": "^9.0.0", - "postcss": "^8.4.38", - "postcss-load-config": "^6.0.1", - "postcss-modules": "6.0.0", - "postcss-modules-extract-imports": "^3.1.0", - "postcss-modules-local-by-default": "^4.0.5", - "postcss-modules-scope": "^3.2.0", - "postcss-modules-values": "^4.0.0", - "postcss-value-parser": "^4.2.0", - "rollup": "^4.0.0", - "sass": "^1.43.4" - }, - "peerDependenciesMeta": { - "icss-utils": { - "optional": true - }, - "less": { - "optional": true - }, - "node-sass": { - "optional": true - }, - "postcss": { - "optional": true - }, - "postcss-load-config": { - "optional": true - }, - "postcss-modules": { - "optional": true - }, - "postcss-modules-extract-imports": { - "optional": true - }, - "postcss-modules-local-by-default": { - "optional": true - }, - "postcss-modules-scope": { - "optional": true - }, - "postcss-modules-values": { - "optional": true - }, - "postcss-value-parser": { - "optional": true - }, - "rollup": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - } - }, - "engines": { - "node": ">=18.* <=22.*" - }, - "publishConfig": { - "access": "public", - "provenance": true - }, - "anolilab": { - "eslint-config": { - "plugin": { - "tsdoc": false, - "etc": false - }, - "warn_on_unsupported_typescript_version": false, - "info_on_disabling_jsx_react_rule": false, - "info_on_disabling_prettier_conflict_rule": false, - "info_on_disabling_jsonc_sort_keys_rule": false, - "info_on_disabling_etc_no_deprecated": false - } - } -} diff --git a/packages/rollup-plugin-styles/packem.config.ts b/packages/rollup-plugin-styles/packem.config.ts deleted file mode 100644 index 4a7b17b4f..000000000 --- a/packages/rollup-plugin-styles/packem.config.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { defineConfig } from "@visulima/packem/config"; -import transformer from "@visulima/packem/transformer/esbuild"; - -// eslint-disable-next-line import/no-unused-modules -export default defineConfig({ - cjsInterop: true, - declaration: false, - externals: ["stylus", "less", "sass", "node-sass", "postcss", "rollup"], - fileCache: false, - rollup: { - license: { - path: "./LICENSE.md", - }, - node10Compatibility: { - typeScriptVersion: ">=5.0", - writeToPackageJson: true, - }, - }, - transformer, -}); diff --git a/packages/rollup-plugin-styles/project.json b/packages/rollup-plugin-styles/project.json deleted file mode 100644 index 35449a14a..000000000 --- a/packages/rollup-plugin-styles/project.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "rollup-plugin-styles", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "packages/rollup-plugin-styles/src", - "projectType": "library", - "tags": ["rollup-plugin-styles", "styles", "type:package"], - "implicitDependencies": ["packem"] -} diff --git a/packages/rollup-plugin-styles/src/loaders/postcss/common.ts b/packages/rollup-plugin-styles/src/loaders/postcss/common.ts deleted file mode 100644 index 1dda8e9ef..000000000 --- a/packages/rollup-plugin-styles/src/loaders/postcss/common.ts +++ /dev/null @@ -1,5 +0,0 @@ -// eslint-disable-next-line security/detect-unsafe-regex -export const hashRe = /\[hash(?::(\d+))?\]/; -export const firstExtRe = /(?=10'} + '@ampproject/remapping@2.3.0': resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} @@ -1882,10 +1850,6 @@ packages: resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@8.57.1': - resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@gar/promisify@1.1.3': resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} @@ -1902,11 +1866,6 @@ packages: engines: {node: '>=10.10.0'} deprecated: Use @eslint/config-array instead - '@humanwhocodes/config-array@0.13.0': - resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead - '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} @@ -3248,39 +3207,17 @@ packages: engines: {node: '>=18.* <=22.*'} os: [darwin, linux, win32] - '@visulima/packem@1.0.5': - resolution: {integrity: sha512-3Ws+KXiiG3/6x1W1G5SqW88TswCvQnmjj70bR6S4oHxu6LMelco/aX1au3eXjvUt8DZAEec78gUSHi2fkFn1zQ==} + '@visulima/pail@2.1.9': + resolution: {integrity: sha512-EDrO6+vlmVnFhsW+gUR9mSek0w3xk9pY4gmgkXfsy7Qdu7XGHF7BHpLFMbnYkemtNXjp3lXjggmIFA8YsmNeFA==} engines: {node: '>=18.* <=22.*'} - hasBin: true + os: [darwin, linux, win32] peerDependencies: - '@swc/core': ^1.5.7 - esbuild: ^0.20.2 || ^0.21.3 - oxc-transform: ^0.20.0 - sucrase: ^3.35.0 - typescript: ^4.5 || ^5.0 + '@visulima/redact': 1.0.8 + rotating-file-stream: ^3.1.1 peerDependenciesMeta: - '@swc/core': + '@visulima/redact': optional: true - esbuild: - optional: true - oxc-transform: - optional: true - sucrase: - optional: true - typescript: - optional: true - - '@visulima/pail@2.1.9': - resolution: {integrity: sha512-EDrO6+vlmVnFhsW+gUR9mSek0w3xk9pY4gmgkXfsy7Qdu7XGHF7BHpLFMbnYkemtNXjp3lXjggmIFA8YsmNeFA==} - engines: {node: '>=18.* <=22.*'} - os: [darwin, linux, win32] - peerDependencies: - '@visulima/redact': 1.0.8 - rotating-file-stream: ^3.1.1 - peerDependenciesMeta: - '@visulima/redact': - optional: true - rotating-file-stream: + rotating-file-stream: optional: true '@visulima/path@1.0.2': @@ -3451,6 +3388,10 @@ packages: any-promise@1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + aproba@2.0.0: resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} @@ -3459,6 +3400,9 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} deprecated: This package is no longer supported. + arg@5.0.2: + resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} + argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -3543,6 +3487,13 @@ packages: engines: {node: '>=16'} hasBin: true + autoprefixer@10.4.20: + resolution: {integrity: sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==} + engines: {node: ^10 || ^12 || >=14} + hasBin: true + peerDependencies: + postcss: ^8.1.0 + available-typed-arrays@1.0.7: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} @@ -3568,6 +3519,10 @@ packages: before-after-hook@3.0.2: resolution: {integrity: sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==} + binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + engines: {node: '>=8'} + binaryextensions@4.19.0: resolution: {integrity: sha512-DRxnVbOi/1OgA5pA9EDiRT8gvVYeqfuN7TmPfLyt6cyho3KbHCi3EtDQf39TTmGDrR5dZ9CspdXhPkL/j/WGbg==} engines: {node: '>=0.8'} @@ -3689,6 +3644,10 @@ packages: camel-case@4.1.2: resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} + camelcase-css@2.0.1: + resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} + engines: {node: '>= 6'} + camelcase-keys@6.2.2: resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} engines: {node: '>=8'} @@ -3784,6 +3743,10 @@ packages: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + chokidar@4.0.1: resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} engines: {node: '>= 14.16.0'} @@ -4320,6 +4283,9 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + didyoumean@1.2.2: + resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} + diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -4332,6 +4298,9 @@ packages: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} + dlv@1.1.3: + resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} + doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} @@ -4785,11 +4754,6 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true - eslint@8.57.1: - resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - hasBin: true - espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5060,6 +5024,9 @@ packages: resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} engines: {node: '>=0.4.x'} + fraction.js@4.3.7: + resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} + from2@2.3.0: resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==} @@ -5637,6 +5604,10 @@ packages: is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + is-boolean-object@1.1.2: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} @@ -6098,6 +6069,10 @@ packages: resolution: {integrity: sha512-rMGwYF8q7g2XhG2ulBmmJgWv25qBsqRbDn5gH0+wnuyeFt7QBJlHJmtg5qEdn4pN6WVAUMgXnIxytMFRX9c1aA==} engines: {node: '>=10.13.0'} + lilconfig@2.1.0: + resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} + engines: {node: '>=10'} + lilconfig@3.1.2: resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} engines: {node: '>=14'} @@ -7073,6 +7048,14 @@ packages: resolution: {integrity: sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==} engines: {node: ^16.14.0 || >=18.0.0} + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + normalize-range@0.1.2: + resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} + engines: {node: '>=0.10.0'} + normalize-url@8.0.1: resolution: {integrity: sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==} engines: {node: '>=14.16'} @@ -7208,6 +7191,10 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} + object-hash@3.0.0: + resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} + engines: {node: '>= 6'} + object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} @@ -7684,6 +7671,30 @@ packages: peerDependencies: postcss: ^8.4.31 + postcss-import@15.1.0: + resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} + engines: {node: '>=14.0.0'} + peerDependencies: + postcss: ^8.0.0 + + postcss-js@4.0.1: + resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} + engines: {node: ^12 || ^14 || >= 16} + peerDependencies: + postcss: ^8.4.21 + + postcss-load-config@4.0.2: + resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} + engines: {node: '>= 14'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + postcss-load-config@6.0.1: resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} engines: {node: '>= 18'} @@ -7767,6 +7778,12 @@ packages: peerDependencies: postcss: ^8.0.0 + postcss-nested@6.2.0: + resolution: {integrity: sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.2.14 + postcss-normalize-charset@7.0.0: resolution: {integrity: sha512-ABisNUXMeZeDNzCQxPxBCkXexvBrUHV+p7/BXOY+ulxkcjUZO0cp8ekGBwvIh2LbCwnWbyMPNJVtBSdyhM2zYQ==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} @@ -8002,6 +8019,9 @@ packages: resolution: {integrity: sha512-nvE3Gy+IOIfH/DXhkyxFVQSrITarFcQz4+shzC/McxQXEUSonpw2oDy/Wi9hdDtV3hlP12VYuDL95iiBREedNQ==} engines: {node: '>=0.10.0'} + read-cache@1.0.0: + resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} + read-package-json-fast@3.0.2: resolution: {integrity: sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -8064,6 +8084,10 @@ packages: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} + readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + readdirp@4.0.1: resolution: {integrity: sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==} engines: {node: '>= 14.16.0'} @@ -8816,6 +8840,11 @@ packages: resolution: {integrity: sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==} engines: {node: '>=10.0.0'} + tailwindcss@3.4.13: + resolution: {integrity: sha512-KqjHOJKogOUt5Bs752ykCeiwvi0fKVkr5oqsFNt/8px/tA8scFPIlkygsf6jXrfCqGHz7VflA6+yytWuM+XhFw==} + engines: {node: '>=14.0.0'} + hasBin: true + tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} @@ -9732,6 +9761,8 @@ snapshots: '@adobe/css-tools@4.3.3': {} + '@alloc/quick-lru@5.2.0': {} + '@ampproject/remapping@2.3.0': dependencies: '@jridgewell/gen-mapping': 0.3.5 @@ -9812,67 +9843,7 @@ snapshots: - svelte-eslint-parser - vue-eslint-parser - '@anolilab/eslint-config@15.0.3(@babel/core@7.25.2)(eslint-plugin-i@2.29.1(eslint@8.57.1))(eslint@8.57.1)(typescript@5.6.2)': - dependencies: - '@anolilab/package-json-utils': 3.0.9 - '@babel/core': 7.25.2 - '@babel/eslint-parser': 7.24.6(@babel/core@7.25.2)(eslint@8.57.1) - '@babel/plugin-syntax-import-assertions': 7.24.6(@babel/core@7.25.2) - '@eslint/js': 8.57.0 - '@html-eslint/eslint-plugin': 0.20.0 - '@html-eslint/parser': 0.20.0 - '@jsenv/eslint-import-resolver': 8.1.1 - '@rushstack/eslint-patch': 1.10.3 - '@rushstack/eslint-plugin-security': 0.7.1(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/eslint-plugin': 7.10.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.6.2) - confusing-browser-globals: 1.0.11 - eslint: 8.57.1 - eslint-define-config: 1.24.1 - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-i@2.29.1(eslint@8.57.1))(eslint@8.57.1) - eslint-plugin-antfu: 1.0.13(eslint@8.57.1) - eslint-plugin-compat: 4.2.0(eslint@8.57.1) - eslint-plugin-es-x: 7.6.0(eslint@8.57.1) - eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.1) - eslint-plugin-html: 7.1.0 - eslint-plugin-i: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-i@2.29.1(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) - eslint-plugin-jsonc: 2.15.1(eslint@8.57.1) - eslint-plugin-markdown: 3.0.1(eslint@8.57.1) - eslint-plugin-mdx: 2.3.4(eslint@8.57.1) - eslint-plugin-n: 16.6.2(eslint@8.57.1) - eslint-plugin-no-loops: 0.3.0(eslint@8.57.1) - eslint-plugin-no-only-tests: 3.1.0 - eslint-plugin-no-secrets: 0.8.9(eslint@8.57.1) - eslint-plugin-no-use-extend-native: 0.5.0 - eslint-plugin-perfectionist: 2.10.0(eslint@8.57.1)(typescript@5.6.2) - eslint-plugin-promise: 6.1.1(eslint@8.57.1) - eslint-plugin-regexp: 2.6.0(eslint@8.57.1) - eslint-plugin-security: 1.7.1 - eslint-plugin-simple-import-sort: 10.0.0(eslint@8.57.1) - eslint-plugin-sonarjs: 0.22.0(eslint@8.57.1) - eslint-plugin-toml: 0.6.1(eslint@8.57.1) - eslint-plugin-unicorn: 49.0.0(eslint@8.57.1) - eslint-plugin-yml: 1.14.0(eslint@8.57.1) - find-up: 5.0.0 - globals: 13.24.0 - jsonc-eslint-parser: 2.4.0 - read-pkg-up: 7.0.1 - semver: 7.6.3 - toml-eslint-parser: 0.6.1 - yaml-eslint-parser: 1.2.2 - optionalDependencies: - typescript: 5.6.2 - transitivePeerDependencies: - - astro-eslint-parser - - eslint-import-resolver-webpack - - eslint-plugin-import - - supports-color - - svelte - - svelte-eslint-parser - - vue-eslint-parser - - '@anolilab/lint-staged-config@2.1.7(eslint@8.57.1)(husky@9.1.6)(lint-staged@15.2.10)(prettier@3.3.3)(secretlint@8.2.4)': + '@anolilab/lint-staged-config@2.1.7(eslint@8.57.0)(husky@9.1.6)(lint-staged@15.2.10)(prettier@3.3.3)(secretlint@8.2.4)': dependencies: '@anolilab/package-json-utils': 3.0.9 find-up: 5.0.0 @@ -9880,7 +9851,7 @@ snapshots: lint-staged: 15.2.10 shell-quote: 1.8.1 optionalDependencies: - eslint: 8.57.1 + eslint: 8.57.0 prettier: 3.3.3 secretlint: 8.2.4 @@ -10065,14 +10036,6 @@ snapshots: eslint-visitor-keys: 2.1.0 semver: 6.3.1 - '@babel/eslint-parser@7.24.6(@babel/core@7.25.2)(eslint@8.57.1)': - dependencies: - '@babel/core': 7.25.2 - '@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1 - eslint: 8.57.1 - eslint-visitor-keys: 2.1.0 - semver: 6.3.1 - '@babel/generator@7.25.0': dependencies: '@babel/types': 7.25.6 @@ -10699,11 +10662,6 @@ snapshots: eslint: 8.57.0 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.1)': - dependencies: - eslint: 8.57.1 - eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.10.0': {} '@eslint-community/regexpp@4.11.1': {} @@ -10724,8 +10682,6 @@ snapshots: '@eslint/js@8.57.0': {} - '@eslint/js@8.57.1': {} - '@gar/promisify@1.1.3': {} '@html-eslint/eslint-plugin@0.20.0': {} @@ -10742,14 +10698,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@humanwhocodes/config-array@0.13.0': - dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.7 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - '@humanwhocodes/module-importer@1.0.1': {} '@humanwhocodes/object-schema@2.0.3': {} @@ -11243,15 +11191,6 @@ snapshots: - supports-color - typescript - '@rushstack/eslint-plugin-security@0.7.1(eslint@8.57.1)(typescript@5.6.2)': - dependencies: - '@rushstack/tree-pattern': 0.3.1 - '@typescript-eslint/experimental-utils': 5.59.11(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 - transitivePeerDependencies: - - supports-color - - typescript - '@rushstack/eslint-plugin-security@0.8.3(eslint@8.57.0)(typescript@5.6.2)': dependencies: '@rushstack/tree-pattern': 0.3.4 @@ -11261,15 +11200,6 @@ snapshots: - supports-color - typescript - '@rushstack/eslint-plugin-security@0.8.3(eslint@8.57.1)(typescript@5.6.2)': - dependencies: - '@rushstack/tree-pattern': 0.3.4 - '@typescript-eslint/utils': 8.1.0(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 - transitivePeerDependencies: - - supports-color - - typescript - '@rushstack/tree-pattern@0.3.1': {} '@rushstack/tree-pattern@0.3.4': {} @@ -12090,24 +12020,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@7.10.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2)': - dependencies: - '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/scope-manager': 7.10.0 - '@typescript-eslint/type-utils': 7.10.0(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/utils': 7.10.0(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 7.10.0 - eslint: 8.57.1 - graphemer: 1.4.0 - ignore: 5.3.1 - natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.2) - optionalDependencies: - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/experimental-utils@5.59.11(eslint@8.57.0)(typescript@5.6.2)': dependencies: '@typescript-eslint/utils': 5.59.11(eslint@8.57.0)(typescript@5.6.2) @@ -12116,14 +12028,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/experimental-utils@5.59.11(eslint@8.57.1)(typescript@5.6.2)': - dependencies: - '@typescript-eslint/utils': 5.59.11(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/experimental-utils@5.62.0(eslint@8.57.0)(typescript@5.6.2)': dependencies: '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.6.2) @@ -12132,14 +12036,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/experimental-utils@5.62.0(eslint@8.57.1)(typescript@5.6.2)': - dependencies: - '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2)': dependencies: '@typescript-eslint/scope-manager': 6.21.0 @@ -12153,19 +12049,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2)': - dependencies: - '@typescript-eslint/scope-manager': 6.21.0 - '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.4 - eslint: 8.57.1 - optionalDependencies: - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/scope-manager@5.59.11': dependencies: '@typescript-eslint/types': 5.59.11 @@ -12203,18 +12086,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@7.10.0(eslint@8.57.1)(typescript@5.6.2)': - dependencies: - '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.6.2) - '@typescript-eslint/utils': 7.10.0(eslint@8.57.1)(typescript@5.6.2) - debug: 4.3.4 - eslint: 8.57.1 - ts-api-utils: 1.3.0(typescript@5.6.2) - optionalDependencies: - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/types@5.59.11': {} '@typescript-eslint/types@5.62.0': {} @@ -12313,21 +12184,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@5.59.11(eslint@8.57.1)(typescript@5.6.2)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@types/json-schema': 7.0.15 - '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 5.59.11 - '@typescript-eslint/types': 5.59.11 - '@typescript-eslint/typescript-estree': 5.59.11(typescript@5.6.2) - eslint: 8.57.1 - eslint-scope: 5.1.1 - semver: 7.6.3 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.6.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) @@ -12343,21 +12199,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@5.62.0(eslint@8.57.1)(typescript@5.6.2)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@types/json-schema': 7.0.15 - '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.6.2) - eslint: 8.57.1 - eslint-scope: 5.1.1 - semver: 7.6.3 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@7.10.0(eslint@8.57.0)(typescript@5.6.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) @@ -12369,17 +12210,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@7.10.0(eslint@8.57.1)(typescript@5.6.2)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@typescript-eslint/scope-manager': 7.10.0 - '@typescript-eslint/types': 7.10.0 - '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.6.2) - eslint: 8.57.1 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@8.1.0(eslint@8.57.0)(typescript@5.6.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) @@ -12391,17 +12221,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@8.1.0(eslint@8.57.1)(typescript@5.6.2)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@typescript-eslint/scope-manager': 8.1.0 - '@typescript-eslint/types': 8.1.0 - '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.6.2) - eslint: 8.57.1 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/visitor-keys@5.59.11': dependencies: '@typescript-eslint/types': 5.59.11 @@ -12497,61 +12316,6 @@ snapshots: transitivePeerDependencies: - yaml - '@visulima/packem@1.0.5(@swc/core@1.7.28(@swc/helpers@0.5.13))(esbuild@0.24.0)(sucrase@3.35.0)(typescript@5.6.2)(yaml@2.5.1)': - dependencies: - '@antfu/install-pkg': 0.4.1 - '@babel/parser': 7.25.6 - '@ckeditor/typedoc-plugins': 43.0.0(typedoc@0.26.7(typescript@5.6.2)) - '@clack/prompts': 0.7.0 - '@rollup/plugin-alias': 5.1.1(rollup@4.22.5) - '@rollup/plugin-commonjs': 28.0.0(rollup@4.22.5) - '@rollup/plugin-dynamic-import-vars': 2.1.3(rollup@4.22.5) - '@rollup/plugin-inject': 5.0.5(rollup@4.22.5) - '@rollup/plugin-json': 6.1.0(rollup@4.22.5) - '@rollup/plugin-node-resolve': 15.3.0(rollup@4.22.5) - '@rollup/plugin-replace': 6.0.1(rollup@4.22.5) - '@rollup/plugin-wasm': 6.2.2(rollup@4.22.5) - '@rollup/pluginutils': 5.1.2(rollup@4.22.5) - '@visulima/cerebro': 1.1.22(yaml@2.5.1) - '@visulima/colorize': 1.4.10 - '@visulima/find-cache-dir': 1.0.12(yaml@2.5.1) - '@visulima/fs': 2.2.0(yaml@2.5.1) - '@visulima/humanizer': 1.0.12 - '@visulima/package': 3.1.2(yaml@2.5.1) - '@visulima/pail': 2.1.9 - '@visulima/path': 1.0.9 - '@visulima/tsconfig': 1.0.14(yaml@2.5.1) - defu: 6.1.4 - es-module-lexer: 1.5.4 - fastest-levenshtein: 1.0.16 - glob-parent: 6.0.2 - hookable: 5.5.3 - is-glob: 4.0.3 - jiti: 2.0.0 - magic-string: 0.30.11 - mlly: 1.7.1 - oxc-parser: 0.30.5 - rollup: 4.22.5 - rollup-plugin-dts: 6.1.1(rollup@4.22.5)(typescript@5.6.2) - rollup-plugin-license: 3.5.3(rollup@4.22.5) - rollup-plugin-polyfill-node: 0.13.0(rollup@4.22.5) - rollup-plugin-visualizer: 5.12.0(rollup@4.22.5) - semver: 7.6.3 - tinyglobby: 0.2.6 - typedoc: 0.26.7(typescript@5.6.2) - typedoc-plugin-markdown: 4.2.8(typedoc@0.26.7(typescript@5.6.2)) - typedoc-plugin-rename-defaults: 0.7.1(typedoc@0.26.7(typescript@5.6.2)) - optionalDependencies: - '@swc/core': 1.7.28(@swc/helpers@0.5.13) - esbuild: 0.24.0 - sucrase: 3.35.0 - typescript: 5.6.2 - transitivePeerDependencies: - - '@visulima/redact' - - picomatch - - rotating-file-stream - - yaml - '@visulima/pail@2.1.9': dependencies: '@visulima/colorize': 1.4.10 @@ -12591,24 +12355,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitest/coverage-v8@2.1.1(vitest@2.1.1(@types/node@18.19.54)(@vitest/ui@2.1.1)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0))': - dependencies: - '@ampproject/remapping': 2.3.0 - '@bcoe/v8-coverage': 0.2.3 - debug: 4.3.6 - istanbul-lib-coverage: 3.2.2 - istanbul-lib-report: 3.0.1 - istanbul-lib-source-maps: 5.0.6 - istanbul-reports: 3.1.7 - magic-string: 0.30.11 - magicast: 0.3.4 - std-env: 3.7.0 - test-exclude: 7.0.1 - tinyrainbow: 1.2.0 - vitest: 2.1.1(@types/node@18.19.54)(@vitest/ui@2.1.1)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0) - transitivePeerDependencies: - - supports-color - '@vitest/expect@2.1.1': dependencies: '@vitest/spy': 2.1.1 @@ -12624,14 +12370,6 @@ snapshots: optionalDependencies: vite: 5.4.8(@types/node@18.19.50)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0) - '@vitest/mocker@2.1.1(vite@5.4.8(@types/node@18.19.54)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0))': - dependencies: - '@vitest/spy': 2.1.1 - estree-walker: 3.0.3 - magic-string: 0.30.11 - optionalDependencies: - vite: 5.4.8(@types/node@18.19.54)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0) - '@vitest/pretty-format@2.1.1': dependencies: tinyrainbow: 1.2.0 @@ -12799,6 +12537,11 @@ snapshots: any-promise@1.3.0: {} + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + aproba@2.0.0: {} are-we-there-yet@3.0.1: @@ -12806,6 +12549,8 @@ snapshots: delegates: 1.0.0 readable-stream: 3.6.2 + arg@5.0.2: {} + argparse@1.0.10: dependencies: sprintf-js: 1.0.3 @@ -12878,6 +12623,16 @@ snapshots: tslib: 2.6.2 yargs: 17.7.2 + autoprefixer@10.4.20(postcss@8.4.47): + dependencies: + browserslist: 4.24.0 + caniuse-lite: 1.0.30001664 + fraction.js: 4.3.7 + normalize-range: 0.1.2 + picocolors: 1.1.0 + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + available-typed-arrays@1.0.7: dependencies: possible-typed-array-names: 1.0.0 @@ -12902,6 +12657,8 @@ snapshots: before-after-hook@3.0.2: {} + binary-extensions@2.3.0: {} + binaryextensions@4.19.0: {} bl@4.1.0: @@ -13071,6 +12828,8 @@ snapshots: pascal-case: 3.1.2 tslib: 2.6.2 + camelcase-css@2.0.1: {} + camelcase-keys@6.2.2: dependencies: camelcase: 5.3.1 @@ -13171,6 +12930,18 @@ snapshots: check-error@2.1.1: {} + chokidar@3.6.0: + dependencies: + anymatch: 3.1.3 + braces: 3.0.3 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + chokidar@4.0.1: dependencies: readdirp: 4.0.1 @@ -13712,6 +13483,8 @@ snapshots: dependencies: dequal: 2.0.3 + didyoumean@1.2.2: {} + diff-sequences@29.6.3: {} diff@5.2.0: {} @@ -13720,6 +13493,8 @@ snapshots: dependencies: path-type: 4.0.0 + dlv@1.1.3: {} + doctrine@3.0.0: dependencies: esutils: 2.0.3 @@ -14017,20 +13792,11 @@ snapshots: dependencies: eslint: 8.57.0 - eslint-compat-utils@0.1.2(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - eslint-compat-utils@0.5.0(eslint@8.57.0): dependencies: eslint: 8.57.0 semver: 7.6.3 - eslint-compat-utils@0.5.0(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - semver: 7.6.3 - eslint-define-config@1.24.1: {} eslint-etc@5.2.1(eslint@8.57.0)(typescript@5.6.2): @@ -14043,16 +13809,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-etc@5.2.1(eslint@8.57.1)(typescript@5.6.2): - dependencies: - '@typescript-eslint/experimental-utils': 5.62.0(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 - tsutils: 3.21.0(typescript@5.6.2) - tsutils-etc: 1.4.2(tsutils@3.21.0(typescript@5.6.2))(typescript@5.6.2) - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - eslint-import-resolver-node@0.3.9: dependencies: debug: 3.2.7 @@ -14078,23 +13834,6 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-i@2.29.1(eslint@8.57.1))(eslint@8.57.1): - dependencies: - debug: 4.3.4 - enhanced-resolve: 5.17.1 - eslint: 8.57.1 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-i@2.29.1(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) - eslint-plugin-import: eslint-plugin-i@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-i@2.29.1(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) - fast-glob: 3.3.2 - get-tsconfig: 4.7.5 - is-core-module: 2.15.1 - is-glob: 4.0.3 - transitivePeerDependencies: - - '@typescript-eslint/parser' - - eslint-import-resolver-node - - eslint-import-resolver-webpack - - supports-color - eslint-mdx@2.3.4(eslint@8.57.0): dependencies: acorn: 8.11.3 @@ -14115,26 +13854,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-mdx@2.3.4(eslint@8.57.1): - dependencies: - acorn: 8.11.3 - acorn-jsx: 5.3.2(acorn@8.11.3) - eslint: 8.57.1 - espree: 9.6.1 - estree-util-visit: 1.2.1 - remark-mdx: 2.3.0 - remark-parse: 10.0.2 - remark-stringify: 10.0.3 - synckit: 0.9.0 - tslib: 2.6.2 - unified: 10.1.2 - unified-engine: 10.1.0 - unist-util-visit: 4.1.2 - uvu: 0.5.6 - vfile: 5.3.7 - transitivePeerDependencies: - - supports-color - eslint-mdx@3.1.5(eslint@8.57.0): dependencies: acorn: 8.11.3 @@ -14155,26 +13874,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-mdx@3.1.5(eslint@8.57.1): - dependencies: - acorn: 8.11.3 - acorn-jsx: 5.3.2(acorn@8.11.3) - eslint: 8.57.1 - espree: 9.6.1 - estree-util-visit: 2.0.0 - remark-mdx: 3.0.1 - remark-parse: 11.0.0 - remark-stringify: 11.0.0 - synckit: 0.9.0 - tslib: 2.6.2 - unified: 11.0.4 - unified-engine: 11.2.1 - unist-util-visit: 5.0.0 - uvu: 0.5.6 - vfile: 6.0.1 - transitivePeerDependencies: - - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-i@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 @@ -14186,25 +13885,10 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-i@2.29.1(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1): - dependencies: - debug: 3.2.7 - optionalDependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-i@2.29.1(eslint@8.57.1))(eslint@8.57.1) - transitivePeerDependencies: - - supports-color - eslint-plugin-antfu@1.0.13(eslint@8.57.0): dependencies: eslint: 8.57.0 - eslint-plugin-antfu@1.0.13(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - eslint-plugin-compat@4.2.0(eslint@8.57.0): dependencies: '@mdn/browser-compat-data': 5.5.29 @@ -14216,17 +13900,6 @@ snapshots: lodash.memoize: 4.1.2 semver: 7.6.3 - eslint-plugin-compat@4.2.0(eslint@8.57.1): - dependencies: - '@mdn/browser-compat-data': 5.5.29 - ast-metadata-inferer: 0.8.0 - browserslist: 4.23.0 - caniuse-lite: 1.0.30001620 - eslint: 8.57.1 - find-up: 5.0.0 - lodash.memoize: 4.1.2 - semver: 7.6.3 - eslint-plugin-deprecation@3.0.0(eslint@8.57.0)(typescript@5.6.2): dependencies: '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.6.2) @@ -14237,16 +13910,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-deprecation@3.0.0(eslint@8.57.1)(typescript@5.6.2): - dependencies: - '@typescript-eslint/utils': 7.10.0(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 - ts-api-utils: 1.3.0(typescript@5.6.2) - tslib: 2.6.2 - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - eslint-plugin-es-x@7.6.0(eslint@8.57.0): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) @@ -14254,25 +13917,12 @@ snapshots: eslint: 8.57.0 eslint-compat-utils: 0.5.0(eslint@8.57.0) - eslint-plugin-es-x@7.6.0(eslint@8.57.1): - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@eslint-community/regexpp': 4.10.0 - eslint: 8.57.1 - eslint-compat-utils: 0.5.0(eslint@8.57.1) - eslint-plugin-eslint-comments@3.2.0(eslint@8.57.0): dependencies: escape-string-regexp: 1.0.5 eslint: 8.57.0 ignore: 5.3.1 - eslint-plugin-eslint-comments@3.2.0(eslint@8.57.1): - dependencies: - escape-string-regexp: 1.0.5 - eslint: 8.57.1 - ignore: 5.3.1 - eslint-plugin-etc@2.0.3(eslint@8.57.0)(typescript@5.6.2): dependencies: '@phenomnomnominal/tsquery': 5.0.1(typescript@5.6.2) @@ -14286,19 +13936,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-etc@2.0.3(eslint@8.57.1)(typescript@5.6.2): - dependencies: - '@phenomnomnominal/tsquery': 5.0.1(typescript@5.6.2) - '@typescript-eslint/experimental-utils': 5.62.0(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 - eslint-etc: 5.2.1(eslint@8.57.1)(typescript@5.6.2) - requireindex: 1.2.0 - tslib: 2.6.2 - tsutils: 3.21.0(typescript@5.6.2) - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - eslint-plugin-html@7.1.0: dependencies: htmlparser2: 8.0.2 @@ -14317,42 +13954,14 @@ snapshots: transitivePeerDependencies: - '@typescript-eslint/parser' - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - - eslint-plugin-i@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-i@2.29.1(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1): - dependencies: - debug: 4.3.4 - doctrine: 3.0.0 - eslint: 8.57.1 - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-i@2.29.1(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) - get-tsconfig: 4.7.5 - is-glob: 4.0.3 - minimatch: 3.1.2 - semver: 7.6.3 - transitivePeerDependencies: - - '@typescript-eslint/parser' - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - - eslint-plugin-jsonc@2.15.1(eslint@8.57.0): - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - eslint: 8.57.0 - eslint-compat-utils: 0.5.0(eslint@8.57.0) - espree: 9.6.1 - graphemer: 1.4.0 - jsonc-eslint-parser: 2.4.0 - natural-compare: 1.4.0 - synckit: 0.6.2 + - eslint-import-resolver-webpack + - supports-color - eslint-plugin-jsonc@2.15.1(eslint@8.57.1): + eslint-plugin-jsonc@2.15.1(eslint@8.57.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - eslint: 8.57.1 - eslint-compat-utils: 0.5.0(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + eslint: 8.57.0 + eslint-compat-utils: 0.5.0(eslint@8.57.0) espree: 9.6.1 graphemer: 1.4.0 jsonc-eslint-parser: 2.4.0 @@ -14366,13 +13975,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-markdown@3.0.1(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - mdast-util-from-markdown: 0.8.5 - transitivePeerDependencies: - - supports-color - eslint-plugin-mdx@2.3.4(eslint@8.57.0): dependencies: eslint: 8.57.0 @@ -14387,20 +13989,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-mdx@2.3.4(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - eslint-mdx: 2.3.4(eslint@8.57.1) - eslint-plugin-markdown: 3.0.1(eslint@8.57.1) - remark-mdx: 2.3.0 - remark-parse: 10.0.2 - remark-stringify: 10.0.3 - tslib: 2.6.2 - unified: 10.1.2 - vfile: 5.3.7 - transitivePeerDependencies: - - supports-color - eslint-plugin-mdx@3.1.5(eslint@8.57.0): dependencies: eslint: 8.57.0 @@ -14415,20 +14003,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-mdx@3.1.5(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - eslint-mdx: 3.1.5(eslint@8.57.1) - eslint-plugin-markdown: 3.0.1(eslint@8.57.1) - remark-mdx: 3.0.1 - remark-parse: 11.0.0 - remark-stringify: 11.0.0 - tslib: 2.6.2 - unified: 11.0.4 - vfile: 6.0.1 - transitivePeerDependencies: - - supports-color - eslint-plugin-n@16.6.2(eslint@8.57.0): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) @@ -14444,39 +14018,16 @@ snapshots: resolve: 1.22.8 semver: 7.6.3 - eslint-plugin-n@16.6.2(eslint@8.57.1): - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - builtins: 5.1.0 - eslint: 8.57.1 - eslint-plugin-es-x: 7.6.0(eslint@8.57.1) - get-tsconfig: 4.7.5 - globals: 13.24.0 - ignore: 5.3.1 - is-builtin-module: 3.2.1 - is-core-module: 2.15.1 - minimatch: 3.1.2 - resolve: 1.22.8 - semver: 7.6.3 - eslint-plugin-no-loops@0.3.0(eslint@8.57.0): dependencies: eslint: 8.57.0 - eslint-plugin-no-loops@0.3.0(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - eslint-plugin-no-only-tests@3.1.0: {} eslint-plugin-no-secrets@0.8.9(eslint@8.57.0): dependencies: eslint: 8.57.0 - eslint-plugin-no-secrets@0.8.9(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - eslint-plugin-no-use-extend-native@0.5.0: dependencies: is-get-set-prop: 1.0.0 @@ -14494,24 +14045,10 @@ snapshots: - supports-color - typescript - eslint-plugin-perfectionist@2.10.0(eslint@8.57.1)(typescript@5.6.2): - dependencies: - '@typescript-eslint/utils': 7.10.0(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 - minimatch: 9.0.4 - natural-compare-lite: 1.4.0 - transitivePeerDependencies: - - supports-color - - typescript - eslint-plugin-promise@6.1.1(eslint@8.57.0): dependencies: eslint: 8.57.0 - eslint-plugin-promise@6.1.1(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - eslint-plugin-regexp@2.6.0(eslint@8.57.0): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) @@ -14523,17 +14060,6 @@ snapshots: regexp-ast-analysis: 0.7.1 scslre: 0.3.0 - eslint-plugin-regexp@2.6.0(eslint@8.57.1): - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@eslint-community/regexpp': 4.10.0 - comment-parser: 1.4.1 - eslint: 8.57.1 - jsdoc-type-pratt-parser: 4.0.0 - refa: 0.12.1 - regexp-ast-analysis: 0.7.1 - scslre: 0.3.0 - eslint-plugin-security@1.7.1: dependencies: safe-regex: 2.1.1 @@ -14542,18 +14068,10 @@ snapshots: dependencies: eslint: 8.57.0 - eslint-plugin-simple-import-sort@10.0.0(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - eslint-plugin-sonarjs@0.22.0(eslint@8.57.0): dependencies: eslint: 8.57.0 - eslint-plugin-sonarjs@0.22.0(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - eslint-plugin-toml@0.6.1(eslint@8.57.0): dependencies: debug: 4.3.4 @@ -14564,16 +14082,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-toml@0.6.1(eslint@8.57.1): - dependencies: - debug: 4.3.4 - eslint: 8.57.1 - eslint-compat-utils: 0.1.2(eslint@8.57.1) - lodash: 4.17.21 - toml-eslint-parser: 0.7.0 - transitivePeerDependencies: - - supports-color - eslint-plugin-unicorn@49.0.0(eslint@8.57.0): dependencies: '@babel/helper-validator-identifier': 7.24.5 @@ -14592,24 +14100,6 @@ snapshots: semver: 7.6.3 strip-indent: 3.0.0 - eslint-plugin-unicorn@49.0.0(eslint@8.57.1): - dependencies: - '@babel/helper-validator-identifier': 7.24.5 - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - ci-info: 3.9.0 - clean-regexp: 1.0.0 - eslint: 8.57.1 - esquery: 1.5.0 - indent-string: 4.0.0 - is-builtin-module: 3.2.1 - jsesc: 3.0.2 - pluralize: 8.0.0 - read-pkg-up: 7.0.1 - regexp-tree: 0.1.27 - regjsparser: 0.10.0 - semver: 7.6.3 - strip-indent: 3.0.0 - eslint-plugin-vitest-globals@1.5.0: {} eslint-plugin-vitest@0.4.1(eslint@8.57.0)(typescript@5.6.2)(vitest@2.1.1(@types/node@18.19.50)(@vitest/ui@2.1.1)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0)): @@ -14622,16 +14112,6 @@ snapshots: - supports-color - typescript - eslint-plugin-vitest@0.4.1(eslint@8.57.1)(typescript@5.6.2)(vitest@2.1.1(@types/node@18.19.54)(@vitest/ui@2.1.1)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0)): - dependencies: - '@typescript-eslint/utils': 7.10.0(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 - optionalDependencies: - vitest: 2.1.1(@types/node@18.19.54)(@vitest/ui@2.1.1)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0) - transitivePeerDependencies: - - supports-color - - typescript - eslint-plugin-yml@1.14.0(eslint@8.57.0): dependencies: debug: 4.3.4 @@ -14643,17 +14123,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-yml@1.14.0(eslint@8.57.1): - dependencies: - debug: 4.3.4 - eslint: 8.57.1 - eslint-compat-utils: 0.5.0(eslint@8.57.1) - lodash: 4.17.21 - natural-compare: 1.4.0 - yaml-eslint-parser: 1.2.2 - transitivePeerDependencies: - - supports-color - eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 @@ -14711,49 +14180,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@8.57.1: - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@eslint-community/regexpp': 4.11.1 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.1 - '@humanwhocodes/config-array': 0.13.0 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.7 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.5.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 - ignore: 5.3.1 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - strip-ansi: 6.0.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - espree@9.6.1: dependencies: acorn: 8.11.3 @@ -15062,6 +14488,8 @@ snapshots: format@0.2.2: {} + fraction.js@4.3.7: {} + from2@2.3.0: dependencies: inherits: 2.0.4 @@ -15774,6 +15202,10 @@ snapshots: dependencies: has-bigints: 1.0.2 + is-binary-path@2.1.0: + dependencies: + binary-extensions: 2.3.0 + is-boolean-object@1.1.2: dependencies: call-bind: 1.0.7 @@ -16167,6 +15599,8 @@ snapshots: rechoir: 0.8.0 resolve: 1.22.8 + lilconfig@2.1.0: {} + lilconfig@3.1.2: {} limit-spawn@0.0.3: {} @@ -17753,6 +17187,10 @@ snapshots: semver: 7.6.3 validate-npm-package-license: 3.0.4 + normalize-path@3.0.0: {} + + normalize-range@0.1.2: {} + normalize-url@8.0.1: {} npm-bundled@2.0.1: @@ -17851,6 +17289,8 @@ snapshots: object-assign@4.1.1: {} + object-hash@3.0.0: {} + object-inspect@1.13.1: {} object-is@1.1.6: @@ -18368,6 +17808,25 @@ snapshots: dependencies: postcss: 8.4.47 + postcss-import@15.1.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + read-cache: 1.0.0 + resolve: 1.22.8 + + postcss-js@4.0.1(postcss@8.4.47): + dependencies: + camelcase-css: 2.0.1 + postcss: 8.4.47 + + postcss-load-config@4.0.2(postcss@8.4.47): + dependencies: + lilconfig: 3.1.2 + yaml: 2.5.1 + optionalDependencies: + postcss: 8.4.47 + postcss-load-config@6.0.1(jiti@2.0.0)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1): dependencies: lilconfig: 3.1.2 @@ -18449,6 +17908,11 @@ snapshots: postcss-modules-values: 4.0.0(postcss@8.4.47) string-hash: 1.1.3 + postcss-nested@6.2.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-selector-parser: 6.1.2 + postcss-normalize-charset@7.0.0(postcss@8.4.47): dependencies: postcss: 8.4.47 @@ -18662,6 +18126,10 @@ snapshots: react@19.0.0-rc-fb9a90fa48-20240614: {} + read-cache@1.0.0: + dependencies: + pify: 2.3.0 + read-package-json-fast@3.0.2: dependencies: json-parse-even-better-errors: 3.0.2 @@ -18769,6 +18237,10 @@ snapshots: string_decoder: 1.3.0 util-deprecate: 1.0.2 + readdirp@3.6.0: + dependencies: + picomatch: 2.3.1 + readdirp@4.0.1: {} readline-transform@1.0.0: {} @@ -19078,20 +18550,6 @@ snapshots: transitivePeerDependencies: - picomatch - rollup-plugin-license@3.5.3(rollup@4.22.5): - dependencies: - commenting: 1.1.0 - fdir: 6.3.0(picomatch@2.3.1) - lodash: 4.17.21 - magic-string: 0.30.11 - moment: 2.30.1 - package-name-regex: 2.0.6 - rollup: 4.22.5 - spdx-expression-validate: 2.0.0 - spdx-satisfies: 5.0.1 - transitivePeerDependencies: - - picomatch - rollup-plugin-polyfill-node@0.13.0(rollup@4.22.5): dependencies: '@rollup/plugin-inject': 5.0.5(rollup@4.22.5) @@ -19732,6 +19190,33 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + tailwindcss@3.4.13: + dependencies: + '@alloc/quick-lru': 5.2.0 + arg: 5.0.2 + chokidar: 3.6.0 + didyoumean: 1.2.2 + dlv: 1.1.3 + fast-glob: 3.3.2 + glob-parent: 6.0.2 + is-glob: 4.0.3 + jiti: 1.21.6 + lilconfig: 2.1.0 + micromatch: 4.0.8 + normalize-path: 3.0.0 + object-hash: 3.0.0 + picocolors: 1.1.0 + postcss: 8.4.47 + postcss-import: 15.1.0(postcss@8.4.47) + postcss-js: 4.0.1(postcss@8.4.47) + postcss-load-config: 4.0.2(postcss@8.4.47) + postcss-nested: 6.2.0(postcss@8.4.47) + postcss-selector-parser: 6.1.2 + resolve: 1.22.8 + sucrase: 3.35.0 + transitivePeerDependencies: + - ts-node + tapable@2.2.1: {} tar-stream@2.2.0: @@ -20648,23 +20133,6 @@ snapshots: - supports-color - terser - vite-node@2.1.1(@types/node@18.19.54)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0): - dependencies: - cac: 6.7.14 - debug: 4.3.6 - pathe: 1.1.2 - vite: 5.4.8(@types/node@18.19.54)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - vite@5.4.8(@types/node@18.19.50)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0): dependencies: esbuild: 0.21.5 @@ -20677,18 +20145,6 @@ snapshots: sass: 1.79.4 stylus: 0.63.0 - vite@5.4.8(@types/node@18.19.54)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0): - dependencies: - esbuild: 0.21.5 - postcss: 8.4.47 - rollup: 4.22.5 - optionalDependencies: - '@types/node': 18.19.54 - fsevents: 2.3.3 - less: 4.2.0 - sass: 1.79.4 - stylus: 0.63.0 - vite@5.4.8(@types/node@20.14.11)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0): dependencies: esbuild: 0.21.5 @@ -20736,41 +20192,6 @@ snapshots: - supports-color - terser - vitest@2.1.1(@types/node@18.19.54)(@vitest/ui@2.1.1)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0): - dependencies: - '@vitest/expect': 2.1.1 - '@vitest/mocker': 2.1.1(vite@5.4.8(@types/node@18.19.54)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0)) - '@vitest/pretty-format': 2.1.1 - '@vitest/runner': 2.1.1 - '@vitest/snapshot': 2.1.1 - '@vitest/spy': 2.1.1 - '@vitest/utils': 2.1.1 - chai: 5.1.1 - debug: 4.3.6 - magic-string: 0.30.11 - pathe: 1.1.2 - std-env: 3.7.0 - tinybench: 2.9.0 - tinyexec: 0.3.0 - tinypool: 1.0.0 - tinyrainbow: 1.2.0 - vite: 5.4.8(@types/node@18.19.54)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0) - vite-node: 2.1.1(@types/node@18.19.54)(less@4.2.0)(sass@1.79.4)(stylus@0.63.0) - why-is-node-running: 2.3.0 - optionalDependencies: - '@types/node': 18.19.54 - '@vitest/ui': 2.1.1(vitest@2.1.1) - transitivePeerDependencies: - - less - - lightningcss - - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - walk-up-path@3.0.1: {} wcwidth@1.0.1: