-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build(deps-dev): bump vite from 5.0.11 to 5.0.12 #1290
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.11 to 5.0.12. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v5.0.12/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.0.12/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
Diff between vite 5.0.11 and 5.0.12diff --git a/dist/node/cli.js b/dist/node/cli.js
index v5.0.11..v5.0.12 100644
--- a/dist/node/cli.js
+++ b/dist/node/cli.js
@@ -3,5 +3,5 @@
import { performance } from 'node:perf_hooks';
import { EventEmitter } from 'events';
-import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-V3BH7oO1.js';
+import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-9A4-l-43.js';
import { VERSION } from './constants.js';
import 'node:fs/promises';
@@ -760,5 +760,5 @@
// output structure is preserved even after bundling so require()
// is ok here
- const { createServer } = await import('./chunks/dep-V3BH7oO1.js').then(function (n) { return n.A; });
+ const { createServer } = await import('./chunks/dep-9A4-l-43.js').then(function (n) { return n.A; });
try {
const server = await createServer({
@@ -840,5 +840,5 @@
.action(async (root, options) => {
filterDuplicateOptions(options);
- const { build } = await import('./chunks/dep-V3BH7oO1.js').then(function (n) { return n.C; });
+ const { build } = await import('./chunks/dep-9A4-l-43.js').then(function (n) { return n.C; });
const buildOptions = cleanOptions(options);
try {
@@ -868,5 +868,5 @@
.action(async (root, options) => {
filterDuplicateOptions(options);
- const { optimizeDeps } = await import('./chunks/dep-V3BH7oO1.js').then(function (n) { return n.B; });
+ const { optimizeDeps } = await import('./chunks/dep-9A4-l-43.js').then(function (n) { return n.B; });
try {
const config = await resolveConfig({
@@ -894,5 +894,5 @@
.action(async (root, options) => {
filterDuplicateOptions(options);
- const { preview } = await import('./chunks/dep-V3BH7oO1.js').then(function (n) { return n.D; });
+ const { preview } = await import('./chunks/dep-9A4-l-43.js').then(function (n) { return n.D; });
try {
const server = await preview({
diff --git a/dist/node/chunks/dep-ggdMrszO.js b/dist/node/chunks/dep-ggdMrszO.js
deleted file mode 100644
index v5.0.11..v5.0.12
--- a/dist/node/chunks/dep-ggdMrszO.js
+++ b/dist/node/chunks/dep-ggdMrszO.js
@@ -1,914 +0,0 @@
-import { y as getDefaultExportFromCjs } from './dep-V3BH7oO1.js';
-import require$$0 from 'path';
-import require$$0__default from 'fs';
-import { l as lib } from './dep-8a-6Quh6.js';
-
-import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
-import { dirname as __cjs_dirname } from 'node:path';
-import { createRequire as __cjs_createRequire } from 'node:module';
-
-const __filename = __cjs_fileURLToPath(import.meta.url);
-const __dirname = __cjs_dirname(__filename);
-const require = __cjs_createRequire(import.meta.url);
-const __require = require;
-function _mergeNamespaces(n, m) {
- for (var i = 0; i < m.length; i++) {
- var e = m[i];
- if (typeof e !== 'string' && !Array.isArray(e)) { for (var k in e) {
- if (k !== 'default' && !(k in n)) {
- n[k] = e[k];
- }
- } }
- }
- return n;
-}
-
-const startsWithKeywordRegexp = /^(all|not|only|print|screen)/i;
-
-var joinMedia$1 = function (parentMedia, childMedia) {
- if (!parentMedia.length && childMedia.length) return childMedia
- if (parentMedia.length && !childMedia.length) return parentMedia
- if (!parentMedia.length && !childMedia.length) return []
-
- const media = [];
-
- parentMedia.forEach(parentItem => {
- const parentItemStartsWithKeyword = startsWithKeywordRegexp.test(parentItem);
-
- childMedia.forEach(childItem => {
- const childItemStartsWithKeyword = startsWithKeywordRegexp.test(childItem);
- if (parentItem !== childItem) {
- if (childItemStartsWithKeyword && !parentItemStartsWithKeyword) {
- media.push(`${childItem} and ${parentItem}`);
- } else {
- media.push(`${parentItem} and ${childItem}`);
- }
- }
- });
- });
-
- return media
-};
-
-var joinLayer$1 = function (parentLayer, childLayer) {
- if (!parentLayer.length && childLayer.length) return childLayer
- if (parentLayer.length && !childLayer.length) return parentLayer
- if (!parentLayer.length && !childLayer.length) return []
-
- return parentLayer.concat(childLayer)
-};
-
-var readCache$1 = {exports: {}};
-
-var pify$2 = {exports: {}};
-
-var processFn = function (fn, P, opts) {
- return function () {
- var that = this;
- var args = new Array(arguments.length);
-
- for (var i = 0; i < arguments.length; i++) {
- args[i] = arguments[i];
- }
-
- return new P(function (resolve, reject) {
- args.push(function (err, result) {
- if (err) {
- reject(err);
- } else if (opts.multiArgs) {
- var results = new Array(arguments.length - 1);
-
- for (var i = 1; i < arguments.length; i++) {
- results[i - 1] = arguments[i];
- }
-
- resolve(results);
- } else {
- resolve(result);
- }
- });
-
- fn.apply(that, args);
- });
- };
-};
-
-var pify$1 = pify$2.exports = function (obj, P, opts) {
- if (typeof P !== 'function') {
- opts = P;
- P = Promise;
- }
-
- opts = opts || {};
- opts.exclude = opts.exclude || [/.+Sync$/];
-
- var filter = function (key) {
- var match = function (pattern) {
- return typeof pattern === 'string' ? key === pattern : pattern.test(key);
- };
-
- return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
- };
-
- var ret = typeof obj === 'function' ? function () {
- if (opts.excludeMain) {
- return obj.apply(this, arguments);
- }
-
- return processFn(obj, P, opts).apply(this, arguments);
- } : {};
-
- return Object.keys(obj).reduce(function (ret, key) {
- var x = obj[key];
-
- ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x;
-
- return ret;
- }, ret);
-};
-
-pify$1.all = pify$1;
-
-var pifyExports = pify$2.exports;
-
-var fs = require$$0__default;
-var path$2 = require$$0;
-var pify = pifyExports;
-
-var stat = pify(fs.stat);
-var readFile = pify(fs.readFile);
-var resolve = path$2.resolve;
-
-var cache = Object.create(null);
-
-function convert(content, encoding) {
- if (Buffer.isEncoding(encoding)) {
- return content.toString(encoding);
- }
- return content;
-}
-
-readCache$1.exports = function (path, encoding) {
- path = resolve(path);
-
- return stat(path).then(function (stats) {
- var item = cache[path];
-
- if (item && item.mtime.getTime() === stats.mtime.getTime()) {
- return convert(item.content, encoding);
- }
-
- return readFile(path).then(function (data) {
- cache[path] = {
- mtime: stats.mtime,
- content: data
- };
-
- return convert(data, encoding);
- });
- }).catch(function (err) {
- cache[path] = null;
- return Promise.reject(err);
- });
-};
-
-readCache$1.exports.sync = function (path, encoding) {
- path = resolve(path);
-
- try {
- var stats = fs.statSync(path);
- var item = cache[path];
-
- if (item && item.mtime.getTime() === stats.mtime.getTime()) {
- return convert(item.content, encoding);
- }
-
- var data = fs.readFileSync(path);
-
- cache[path] = {
- mtime: stats.mtime,
- content: data
- };
-
- return convert(data, encoding);
- } catch (err) {
- cache[path] = null;
- throw err;
- }
-
-};
-
-readCache$1.exports.get = function (path, encoding) {
- path = resolve(path);
- if (cache[path]) {
- return convert(cache[path].content, encoding);
- }
- return null;
-};
-
-readCache$1.exports.clear = function () {
- cache = Object.create(null);
-};
-
-var readCacheExports = readCache$1.exports;
-
-const dataURLRegexp = /^data:text\/css;base64,/i;
-
-function isValid(url) {
- return dataURLRegexp.test(url)
-}
-
-function contents(url) {
- // "data:text/css;base64,".length === 21
- return Buffer.from(url.slice(21), "base64").toString()
-}
-
-var dataUrl = {
- isValid,
- contents,
-};
-
-const readCache = readCacheExports;
-const dataURL$1 = dataUrl;
-
-var loadContent$1 = filename => {
- if (dataURL$1.isValid(filename)) {
- return dataURL$1.contents(filename)
- }
-
- return readCache(filename, "utf-8")
-};
-
-// builtin tooling
-const path$1 = require$$0;
-
-// placeholder tooling
-let sugarss;
-
-var processContent$1 = function processContent(
- result,
- content,
- filename,
- options,
- postcss
-) {
- const { plugins } = options;
- const ext = path$1.extname(filename);
-
- const parserList = [];
-
- // SugarSS support:
- if (ext === ".sss") {
- if (!sugarss) {
- try {
- sugarss = __require('sugarss');
- } catch {} // Ignore
- }
- if (sugarss)
- return runPostcss(postcss, content, filename, plugins, [sugarss])
- }
-
- // Syntax support:
- if (result.opts.syntax?.parse) {
- parserList.push(result.opts.syntax.parse);
- }
-
- // Parser support:
- if (result.opts.parser) parserList.push(result.opts.parser);
- // Try the default as a last resort:
- parserList.push(null);
-
- return runPostcss(postcss, content, filename, plugins, parserList)
-};
-
-function runPostcss(postcss, content, filename, plugins, parsers, index) {
- if (!index) index = 0;
- return postcss(plugins)
- .process(content, {
- from: filename,
- parser: parsers[index],
- })
- .catch(err => {
- // If there's an error, try the next parser
- index++;
- // If there are no parsers left, throw it
- if (index === parsers.length) throw err
- return runPostcss(postcss, content, filename, plugins, parsers, index)
- })
-}
-
-// external tooling
-const valueParser = lib;
-
-// extended tooling
-const { stringify } = valueParser;
-
-function split(params, start) {
- const list = [];
- const last = params.reduce((item, node, index) => {
- if (index < start) return ""
- if (node.type === "div" && node.value === ",") {
- list.push(item);
- return ""
- }
- return item + stringify(node)
- }, "");
- list.push(last);
- return list
-}
-
-var parseStatements$1 = function (result, styles) {
- const statements = [];
- let nodes = [];
-
- styles.each(node => {
- let stmt;
- if (node.type === "atrule") {
- if (node.name === "import") stmt = parseImport(result, node);
- else if (node.name === "media") stmt = parseMedia(result, node);
- else if (node.name === "charset") stmt = parseCharset(result, node);
- }
-
- if (stmt) {
- if (nodes.length) {
- statements.push({
- type: "nodes",
- nodes,
- media: [],
- layer: [],
- });
- nodes = [];
- }
- statements.push(stmt);
- } else nodes.push(node);
- });
-
- if (nodes.length) {
- statements.push({
- type: "nodes",
- nodes,
- media: [],
- layer: [],
- });
- }
-
- return statements
-};
-
-function parseMedia(result, atRule) {
- const params = valueParser(atRule.params).nodes;
- return {
- type: "media",
- node: atRule,
- media: split(params, 0),
- layer: [],
- }
-}
-
-function parseCharset(result, atRule) {
- if (atRule.prev()) {
- return result.warn("@charset must precede all other statements", {
- node: atRule,
- })
- }
- return {
- type: "charset",
- node: atRule,
- media: [],
- layer: [],
- }
-}
-
-function parseImport(result, atRule) {
- let prev = atRule.prev();
- if (prev) {
- do {
- if (
- prev.type !== "comment" &&
- (prev.type !== "atrule" ||
- (prev.name !== "import" &&
- prev.name !== "charset" &&
- !(prev.name === "layer" && !prev.nodes)))
- ) {
- return result.warn(
- "@import must precede all other statements (besides @charset or empty @layer)",
- { node: atRule }
- )
- }
- prev = prev.prev();
- } while (prev)
- }
-
- if (atRule.nodes) {
- return result.warn(
- "It looks like you didn't end your @import statement correctly. " +
- "Child nodes are attached to it.",
- { node: atRule }
- )
- }
-
- const params = valueParser(atRule.params).nodes;
- const stmt = {
- type: "import",
- node: atRule,
- media: [],
- layer: [],
- };
-
- // prettier-ignore
- if (
- !params.length ||
- (
- params[0].type !== "string" ||
- !params[0].value
- ) &&
- (
- params[0].type !== "function" ||
- params[0].value !== "url" ||
- !params[0].nodes.length ||
- !params[0].nodes[0].value
- )
- ) {
- return result.warn(`Unable to find uri in '${ atRule.toString() }'`, {
- node: atRule,
- })
- }
-
- if (params[0].type === "string") stmt.uri = params[0].value;
- else stmt.uri = params[0].nodes[0].value;
- stmt.fullUri = stringify(params[0]);
-
- let remainder = params;
- if (remainder.length > 2) {
- if (
- (remainder[2].type === "word" || remainder[2].type === "function") &&
- remainder[2].value === "layer"
- ) {
- if (remainder[1].type !== "space") {
- return result.warn("Invalid import layer statement", { node: atRule })
- }
-
- if (remainder[2].nodes) {
- stmt.layer = [stringify(remainder[2].nodes)];
- } else {
- stmt.layer = [""];
- }
- remainder = remainder.slice(2);
- }
- }
-
- if (remainder.length > 2) {
- if (remainder[1].type !== "space") {
- return result.warn("Invalid import media statement", { node: atRule })
- }
-
- stmt.media = split(remainder, 2);
- }
-
- return stmt
-}
-
-var assignLayerNames$1 = function (layer, node, state, options) {
- layer.forEach((layerPart, i) => {
- if (layerPart.trim() === "") {
- if (options.nameLayer) {
- layer[i] = options
- .nameLayer(state.anonymousLayerCounter++, state.rootFilename)
- .toString();
- } else {
- throw node.error(
- `When using anonymous layers in @import you must also set the "nameLayer" plugin option`
- )
- }
- }
- });
-};
-
-// builtin tooling
-const path = require$$0;
-
-// internal tooling
-const joinMedia = joinMedia$1;
-const joinLayer = joinLayer$1;
-const resolveId = (id) => id;
-const loadContent = loadContent$1;
-const processContent = processContent$1;
-const parseStatements = parseStatements$1;
-const assignLayerNames = assignLayerNames$1;
-const dataURL = dataUrl;
-
-function AtImport(options) {
- options = {
- root: process.cwd(),
- path: [],
- skipDuplicates: true,
- resolve: resolveId,
- load: loadContent,
- plugins: [],
- addModulesDirectories: [],
- nameLayer: null,
- ...options,
- };
-
- options.root = path.resolve(options.root);
-
- // convert string to an array of a single element
- if (typeof options.path === "string") options.path = [options.path];
-
- if (!Array.isArray(options.path)) options.path = [];
-
- options.path = options.path.map(p => path.resolve(options.root, p));
-
- return {
- postcssPlugin: "postcss-import",
- Once(styles, { result, atRule, postcss }) {
- const state = {
- importedFiles: {},
- hashFiles: {},
- rootFilename: null,
- anonymousLayerCounter: 0,
- };
-
- if (styles.source?.input?.file) {
- state.rootFilename = styles.source.input.file;
- state.importedFiles[styles.source.input.file] = {};
- }
-
- if (options.plugins && !Array.isArray(options.plugins)) {
- throw new Error("plugins option must be an array")
- }
-
- if (options.nameLayer && typeof options.nameLayer !== "function") {
- throw new Error("nameLayer option must be a function")
- }
-
- return parseStyles(result, styles, options, state, [], []).then(
- bundle => {
- applyRaws(bundle);
- applyMedia(bundle);
- applyStyles(bundle, styles);
- }
- )
-
- function applyRaws(bundle) {
- bundle.forEach((stmt, index) => {
- if (index === 0) return
-
- if (stmt.parent) {
- const { before } = stmt.parent.node.raws;
- if (stmt.type === "nodes") stmt.nodes[0].raws.before = before;
- else stmt.node.raws.before = before;
- } else if (stmt.type === "nodes") {
- stmt.nodes[0].raws.before = stmt.nodes[0].raws.before || "\n";
- }
- });
- }
-
- function applyMedia(bundle) {
- bundle.forEach(stmt => {
- if (
- (!stmt.media.length && !stmt.layer.length) ||
- stmt.type === "charset"
- ) {
- return
- }
-
- if (stmt.layer.length > 1) {
- assignLayerNames(stmt.layer, stmt.node, state, options);
- }
-
- if (stmt.type === "import") {
- const parts = [stmt.fullUri];
-
- const media = stmt.media.join(", ");
-
- if (stmt.layer.length) {
- const layerName = stmt.layer.join(".");
-
- let layerParams = "layer";
- if (layerName) {
- layerParams = `layer(${layerName})`;
- }
-
- parts.push(layerParams);
- }
-
- if (media) {
- parts.push(media);
- }
-
- stmt.node.params = parts.join(" ");
- } else if (stmt.type === "media") {
- if (stmt.layer.length) {
- const layerNode = atRule({
- name: "layer",
- params: stmt.layer.join("."),
- source: stmt.node.source,
- });
-
- if (stmt.parentMedia?.length) {
- const mediaNode = atRule({
- name: "media",
- params: stmt.parentMedia.join(", "),
- source: stmt.node.source,
- });
-
- mediaNode.append(layerNode);
- layerNode.append(stmt.node);
- stmt.node = mediaNode;
- } else {
- layerNode.append(stmt.node);
- stmt.node = layerNode;
- }
- } else {
- stmt.node.params = stmt.media.join(", ");
- }
- } else {
- const { nodes } = stmt;
- const { parent } = nodes[0];
-
- let outerAtRule;
- let innerAtRule;
- if (stmt.media.length && stmt.layer.length) {
- const mediaNode = atRule({
- name: "media",
- params: stmt.media.join(", "),
- source: parent.source,
- });
-
- const layerNode = atRule({
- name: "layer",
- params: stmt.layer.join("."),
- source: parent.source,
- });
-
- mediaNode.append(layerNode);
- innerAtRule = layerNode;
- outerAtRule = mediaNode;
- } else if (stmt.media.length) {
- const mediaNode = atRule({
- name: "media",
- params: stmt.media.join(", "),
- source: parent.source,
- });
-
- innerAtRule = mediaNode;
- outerAtRule = mediaNode;
- } else if (stmt.layer.length) {
- const layerNode = atRule({
- name: "layer",
- params: stmt.layer.join("."),
- source: parent.source,
- });
-
- innerAtRule = layerNode;
- outerAtRule = layerNode;
- }
-
- parent.insertBefore(nodes[0], outerAtRule);
-
- // remove nodes
- nodes.forEach(node => {
- node.parent = undefined;
- });
-
- // better output
- nodes[0].raws.before = nodes[0].raws.before || "\n";
-
- // wrap new rules with media query and/or layer at rule
- innerAtRule.append(nodes);
-
- stmt.type = "media";
- stmt.node = outerAtRule;
- delete stmt.nodes;
- }
- });
- }
-
- function applyStyles(bundle, styles) {
- styles.nodes = [];
-
- // Strip additional statements.
- bundle.forEach(stmt => {
- if (["charset", "import", "media"].includes(stmt.type)) {
- stmt.node.parent = undefined;
- styles.append(stmt.node);
- } else if (stmt.type === "nodes") {
- stmt.nodes.forEach(node => {
- node.parent = undefined;
- styles.append(node);
- });
- }
- });
- }
-
- function parseStyles(result, styles, options, state, media, layer) {
- const statements = parseStatements(result, styles);
-
- return Promise.resolve(statements)
- .then(stmts => {
- // process each statement in series
- return stmts.reduce((promise, stmt) => {
- return promise.then(() => {
- stmt.media = joinMedia(media, stmt.media || []);
- stmt.parentMedia = media;
- stmt.layer = joinLayer(layer, stmt.layer || []);
-
- // skip protocol base uri (protocol://url) or protocol-relative
- if (
- stmt.type !== "import" ||
- /^(?:[a-z]+:)?\/\//i.test(stmt.uri)
- ) {
- return
- }
-
- if (options.filter && !options.filter(stmt.uri)) {
- // rejected by filter
- return
- }
-
- return resolveImportId(result, stmt, options, state)
- })
- }, Promise.resolve())
- })
- .then(() => {
- let charset;
- const imports = [];
- const bundle = [];
-
- function handleCharset(stmt) {
- if (!charset) charset = stmt;
- // charsets aren't case-sensitive, so convert to lower case to compare
- else if (
- stmt.node.params.toLowerCase() !==
- charset.node.params.toLowerCase()
- ) {
- throw new Error(
- `Incompatable @charset statements:
- ${stmt.node.params} specified in ${stmt.node.source.input.file}
- ${charset.node.params} specified in ${charset.node.source.input.file}`
- )
- }
- }
-
- // squash statements and their children
- statements.forEach(stmt => {
- if (stmt.type === "charset") handleCharset(stmt);
- else if (stmt.type === "import") {
- if (stmt.children) {
- stmt.children.forEach((child, index) => {
- if (child.type === "import") imports.push(child);
- else if (child.type === "charset") handleCharset(child);
- else bundle.push(child);
- // For better output
- if (index === 0) child.parent = stmt;
- });
- } else imports.push(stmt);
- } else if (stmt.type === "media" || stmt.type === "nodes") {
- bundle.push(stmt);
- }
- });
-
- return charset
- ? [charset, ...imports.concat(bundle)]
- : imports.concat(bundle)
- })
- }
-
- function resolveImportId(result, stmt, options, state) {
- if (dataURL.isValid(stmt.uri)) {
- return loadImportContent(result, stmt, stmt.uri, options, state).then(
- result => {
- stmt.children = result;
- }
- )
- }
-
- const atRule = stmt.node;
- let sourceFile;
- if (atRule.source?.input?.file) {
- sourceFile = atRule.source.input.file;
- }
- const base = sourceFile
- ? path.dirname(atRule.source.input.file)
- : options.root;
-
- return Promise.resolve(options.resolve(stmt.uri, base, options))
- .then(paths => {
- if (!Array.isArray(paths)) paths = [paths];
- // Ensure that each path is absolute:
- return Promise.all(
- paths.map(file => {
- return !path.isAbsolute(file)
- ? resolveId(file)
- : file
- })
- )
- })
- .then(resolved => {
- // Add dependency messages:
- resolved.forEach(file => {
- result.messages.push({
- type: "dependency",
- plugin: "postcss-import",
- file,
- parent: sourceFile,
- });
- });
-
- return Promise.all(
- resolved.map(file => {
- return loadImportContent(result, stmt, file, options, state)
- })
- )
- })
- .then(result => {
- // Merge loaded statements
- stmt.children = result.reduce((result, statements) => {
- return statements ? result.concat(statements) : result
- }, []);
- })
- }
-
- function loadImportContent(result, stmt, filename, options, state) {
- const atRule = stmt.node;
- const { media, layer } = stmt;
-
- assignLayerNames(layer, atRule, state, options);
-
- if (options.skipDuplicates) {
- // skip files already imported at the same scope
- if (state.importedFiles[filename]?.[media]?.[layer]) {
- return
- }
-
- // save imported files to skip them next time
- if (!state.importedFiles[filename]) {
- state.importedFiles[filename] = {};
- }
- if (!state.importedFiles[filename][media]) {
- state.importedFiles[filename][media] = {};
- }
- state.importedFiles[filename][media][layer] = true;
- }
-
- return Promise.resolve(options.load(filename, options)).then(
- content => {
- if (content.trim() === "") {
- result.warn(`${filename} is empty`, { node: atRule });
- return
- }
-
- // skip previous imported files not containing @import rules
- if (state.hashFiles[content]?.[media]?.[layer]) {
- return
- }
-
- return processContent(
- result,
- content,
- filename,
- options,
- postcss
- ).then(importedResult => {
- const styles = importedResult.root;
- result.messages = result.messages.concat(importedResult.messages);
-
- if (options.skipDuplicates) {
- const hasImport = styles.some(child => {
- return child.type === "atrule" && child.name === "import"
- });
- if (!hasImport) {
- // save hash files to skip them next time
- if (!state.hashFiles[content]) {
- state.hashFiles[content] = {};
- }
- if (!state.hashFiles[content][media]) {
- state.hashFiles[content][media] = {};
- }
- state.hashFiles[content][media][layer] = true;
- }
- }
-
- // recursion: import @import from imported file
- return parseStyles(result, styles, options, state, media, layer)
- })
- }
- )
- }
- },
- }
-}
-
-AtImport.postcss = true;
-
-var postcssImport = AtImport;
-
-var index = /*@__PURE__*/getDefaultExportFromCjs(postcssImport);
-
-var index$1 = /*#__PURE__*/_mergeNamespaces({
- __proto__: null,
- default: index
-}, [postcssImport]);
-
-export { index$1 as i };
\ No newline at end of file
diff --git a/dist/node/chunks/dep-oIJQVJc7.js b/dist/node/chunks/dep-oIJQVJc7.js
deleted file mode 100644
index v5.0.11..v5.0.12
--- a/dist/node/chunks/dep-oIJQVJc7.js
+++ b/dist/node/chunks/dep-oIJQVJc7.js
@@ -1,7646 +0,0 @@
-import { z as commonjsGlobal, y as getDefaultExportFromCjs } from './dep-V3BH7oO1.js';
-import require$$0__default from 'fs';
-import require$$0 from 'postcss';
-import require$$0$1 from 'path';
-import require$$0$2 from 'crypto';
-import require$$0$3 from 'util';
-import { l as lib } from './dep-8a-6Quh6.js';
-
-import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
-import { dirname as __cjs_dirname } from 'node:path';
-import { createRequire as __cjs_createRequire } from 'node:module';
-
-const __filename = __cjs_fileURLToPath(import.meta.url);
-const __dirname = __cjs_dirname(__filename);
-const require = __cjs_createRequire(import.meta.url);
-const __require = require;
-function _mergeNamespaces(n, m) {
- for (var i = 0; i < m.length; i++) {
- var e = m[i];
- if (typeof e !== 'string' && !Array.isArray(e)) { for (var k in e) {
- if (k !== 'default' && !(k in n)) {
- n[k] = e[k];
- }
- } }
- }
- return n;
-}
-
-var build = {exports: {}};
-
-var fs = {};
-
-Object.defineProperty(fs, "__esModule", {
- value: true
-});
-fs.getFileSystem = getFileSystem;
-fs.setFileSystem = setFileSystem;
-let fileSystem = {
- readFile: () => {
- throw Error("readFile not implemented");
- },
- writeFile: () => {
- throw Error("writeFile not implemented");
- }
-};
-
-function setFileSystem(fs) {
- fileSystem.readFile = fs.readFile;
- fileSystem.writeFile = fs.writeFile;
-}
-
-function getFileSystem() {
- return fileSystem;
-}
-
-var pluginFactory = {};
-
-var unquote$1 = {};
-
-Object.defineProperty(unquote$1, "__esModule", {
- value: true
-});
-unquote$1.default = unquote;
-// copied from https://github.com/lakenen/node-unquote
-const reg = /['"]/;
-
-function unquote(str) {
- if (!str) {
- return "";
- }
-
- if (reg.test(str.charAt(0))) {
- str = str.substr(1);
- }
-
- if (reg.test(str.charAt(str.length - 1))) {
- str = str.substr(0, str.length - 1);
- }
-
- return str;
-}
-
-var Parser$1 = {};
-
-const matchValueName = /[$]?[\w-]+/g;
-
-const replaceValueSymbols$2 = (value, replacements) => {
- let matches;
-
- while ((matches = matchValueName.exec(value))) {
- const replacement = replacements[matches[0]];
-
- if (replacement) {
- value =
- value.slice(0, matches.index) +
- replacement +
- value.slice(matchValueName.lastIndex);
-
- matchValueName.lastIndex -= matches[0].length - replacement.length;
- }
- }
-
- return value;
-};
-
-var replaceValueSymbols_1 = replaceValueSymbols$2;
-
-const replaceValueSymbols$1 = replaceValueSymbols_1;
-
-const replaceSymbols$1 = (css, replacements) => {
- css.walk((node) => {
- if (node.type === "decl" && node.value) {
- node.value = replaceValueSymbols$1(node.value.toString(), replacements);
- } else if (node.type === "rule" && node.selector) {
- node.selector = replaceValueSymbols$1(
- node.selector.toString(),
- replacements
- );
- } else if (node.type === "atrule" && node.params) {
- node.params = replaceValueSymbols$1(node.params.toString(), replacements);
- }
- });
-};
-
-var replaceSymbols_1 = replaceSymbols$1;
-
-const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/;
-const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/;
-
-const getDeclsObject = (rule) => {
- const object = {};
-
- rule.walkDecls((decl) => {
- const before = decl.raws.before ? decl.raws.before.trim() : "";
-
- object[before + decl.prop] = decl.value;
- });
-
- return object;
-};
-/**
- *
- * @param {string} css
- * @param {boolean} removeRules
- * @param {'auto' | 'rule' | 'at-rule'} mode
- */
-const extractICSS$2 = (css, removeRules = true, mode = "auto") => {
- const icssImports = {};
- const icssExports = {};
-
- function addImports(node, path) {
- const unquoted = path.replace(/'|"/g, "");
- icssImports[unquoted] = Object.assign(
- icssImports[unquoted] || {},
- getDeclsObject(node)
- );
-
- if (removeRules) {
- node.remove();
- }
- }
-
- function addExports(node) {
- Object.assign(icssExports, getDeclsObject(node));
- if (removeRules) {
- node.remove();
- }
- }
-
- css.each((node) => {
- if (node.type === "rule" && mode !== "at-rule") {
- if (node.selector.slice(0, 7) === ":import") {
- const matches = importPattern.exec(node.selector);
-
- if (matches) {
- addImports(node, matches[1]);
- }
- }
-
- if (node.selector === ":export") {
- addExports(node);
- }
- }
-
- if (node.type === "atrule" && mode !== "rule") {
- if (node.name === "icss-import") {
- const matches = balancedQuotes.exec(node.params);
-
- if (matches) {
- addImports(node, matches[1]);
- }
- }
- if (node.name === "icss-export") {
- addExports(node);
- }
- }
- });
-
- return { icssImports, icssExports };
-};
-
-var extractICSS_1 = extractICSS$2;
-
-const createImports = (imports, postcss, mode = "rule") => {
- return Object.keys(imports).map((path) => {
- const aliases = imports[path];
- const declarations = Object.keys(aliases).map((key) =>
- postcss.decl({
- prop: key,
- value: aliases[key],
- raws: { before: "\n " },
- })
- );
-
- const hasDeclarations = declarations.length > 0;
-
- const rule =
- mode === "rule"
- ? postcss.rule({
- selector: `:import('${path}')`,
- raws: { after: hasDeclarations ? "\n" : "" },
- })
- : postcss.atRule({
- name: "icss-import",
- params: `'${path}'`,
- raws: { after: hasDeclarations ? "\n" : "" },
- });
-
- if (hasDeclarations) {
- rule.append(declarations);
- }
-
- return rule;
- });
-};
-
-const createExports = (exports, postcss, mode = "rule") => {
- const declarations = Object.keys(exports).map((key) =>
- postcss.decl({
- prop: key,
- value: exports[key],
- raws: { before: "\n " },
- })
- );
-
- if (declarations.length === 0) {
- return [];
- }
- const rule =
- mode === "rule"
- ? postcss.rule({
- selector: `:export`,
- raws: { after: "\n" },
- })
- : postcss.atRule({
- name: "icss-export",
- raws: { after: "\n" },
- });
-
- rule.append(declarations);
-
- return [rule];
-};
-
-const createICSSRules$1 = (imports, exports, postcss, mode) => [
- ...createImports(imports, postcss, mode),
- ...createExports(exports, postcss, mode),
-];
-
-var createICSSRules_1 = createICSSRules$1;
-
-const replaceValueSymbols = replaceValueSymbols_1;
-const replaceSymbols = replaceSymbols_1;
-const extractICSS$1 = extractICSS_1;
-const createICSSRules = createICSSRules_1;
-
-var src$4 = {
- replaceValueSymbols,
- replaceSymbols,
- extractICSS: extractICSS$1,
- createICSSRules,
-};
-
-Object.defineProperty(Parser$1, "__esModule", {
- value: true
-});
-Parser$1.default = void 0;
-
-var _icssUtils = src$4;
-
-// Initially copied from https://github.com/css-modules/css-modules-loader-core
-const importRegexp = /^:import\((.+)\)$/;
-
-class Parser {
- constructor(pathFetcher, trace) {
- this.pathFetcher = pathFetcher;
- this.plugin = this.plugin.bind(this);
- this.exportTokens = {};
- this.translations = {};
- this.trace = trace;
- }
-
- plugin() {
- const parser = this;
- return {
- postcssPlugin: "css-modules-parser",
-
- async OnceExit(css) {
- await Promise.all(parser.fetchAllImports(css));
- parser.linkImportedSymbols(css);
- return parser.extractExports(css);
- }
-
- };
- }
-
- fetchAllImports(css) {
- let imports = [];
- css.each(node => {
- if (node.type == "rule" && node.selector.match(importRegexp)) {
- imports.push(this.fetchImport(node, css.source.input.from, imports.length));
- }
- });
- return imports;
- }
-
- linkImportedSymbols(css) {
- (0, _icssUtils.replaceSymbols)(css, this.translations);
- }
-
- extractExports(css) {
- css.each(node => {
- if (node.type == "rule" && node.selector == ":export") this.handleExport(node);
- });
- }
-
- handleExport(exportNode) {
- exportNode.each(decl => {
- if (decl.type == "decl") {
- Object.keys(this.translations).forEach(translation => {
- decl.value = decl.value.replace(translation, this.translations[translation]);
- });
- this.exportTokens[decl.prop] = decl.value;
- }
- });
- exportNode.remove();
- }
-
- async fetchImport(importNode, relativeTo, depNr) {
- const file = importNode.selector.match(importRegexp)[1];
- const depTrace = this.trace + String.fromCharCode(depNr);
- const exports = await this.pathFetcher(file, relativeTo, depTrace);
-
- try {
- importNode.each(decl => {
- if (decl.type == "decl") {
- this.translations[decl.prop] = exports[decl.value];
- }
- });
- importNode.remove();
- } catch (err) {
- console.log(err);
- }
- }
-
-}
-
-Parser$1.default = Parser;
-
-var saveJSON$1 = {};
-
-Object.defineProperty(saveJSON$1, "__esModule", {
- value: true
-});
-saveJSON$1.default = saveJSON;
-
-var _fs$2 = fs;
-
-function saveJSON(cssFile, json) {
- return new Promise((resolve, reject) => {
- const {
- writeFile
- } = (0, _fs$2.getFileSystem)();
- writeFile(`${cssFile}.json`, JSON.stringify(json), e => e ? reject(e) : resolve(json));
- });
-}
-
-var localsConvention = {};
-
-/**
- * lodash (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
-
-/** Used as references for various `Number` constants. */
-var INFINITY = 1 / 0;
-
-/** `Object#toString` result references. */
-var symbolTag = '[object Symbol]';
-
-/** Used to match words composed of alphanumeric characters. */
-var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
-
-/** Used to match Latin Unicode letters (excluding mathematical operators). */
-var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
-
-/** Used to compose unicode character classes. */
-var rsAstralRange = '\\ud800-\\udfff',
- rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
- rsComboSymbolsRange = '\\u20d0-\\u20f0',
- rsDingbatRange = '\\u2700-\\u27bf',
- rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
- rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
- rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
- rsPunctuationRange = '\\u2000-\\u206f',
- rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
- rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
- rsVarRange = '\\ufe0e\\ufe0f',
- rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
-
-/** Used to compose unicode capture groups. */
-var rsApos = "['\u2019]",
- rsAstral = '[' + rsAstralRange + ']',
- rsBreak = '[' + rsBreakRange + ']',
- rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
- rsDigits = '\\d+',
- rsDingbat = '[' + rsDingbatRange + ']',
- rsLower = '[' + rsLowerRange + ']',
- rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
- rsFitz = '\\ud83c[\\udffb-\\udfff]',
- rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
- rsNonAstral = '[^' + rsAstralRange + ']',
- rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
- rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
- rsUpper = '[' + rsUpperRange + ']',
- rsZWJ = '\\u200d';
-
-/** Used to compose unicode regexes. */
-var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',
- rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',
- rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
- rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
- reOptMod = rsModifier + '?',
- rsOptVar = '[' + rsVarRange + ']?',
- rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
- rsSeq = rsOptVar + reOptMod + rsOptJoin,
- rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
- rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
-
-/** Used to match apostrophes. */
-var reApos = RegExp(rsApos, 'g');
-
-/**
- * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
- * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
- */
-var reComboMark = RegExp(rsCombo, 'g');
-
-/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
-var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
-
-/** Used to match complex or compound words. */
-var reUnicodeWord = RegExp([
- rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
- rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',
- rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,
- rsUpper + '+' + rsOptUpperContr,
- rsDigits,
- rsEmoji
-].join('|'), 'g');
-
-/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
-var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
-
-/** Used to detect strings that need a more robust regexp to match words. */
-var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
-
-/** Used to map Latin Unicode letters to basic Latin letters. */
-var deburredLetters = {
- // Latin-1 Supplement block.
- '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
- '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
- '\xc7': 'C', '\xe7': 'c',
- '\xd0': 'D', '\xf0': 'd',
- '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
- '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
- '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
- '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
- '\xd1': 'N', '\xf1': 'n',
- '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
- '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
- '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
- '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
- '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
- '\xc6': 'Ae', '\xe6': 'ae',
- '\xde': 'Th', '\xfe': 'th',
- '\xdf': 'ss',
- // Latin Extended-A block.
- '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
- '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
- '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
- '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
- '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
- '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
- '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
- '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
- '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
- '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
- '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
- '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
- '\u0134': 'J', '\u0135': 'j',
- '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
- '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
- '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
- '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
- '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
- '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
- '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
- '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
- '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
- '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
- '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
- '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
- '\u0163': 't', '\u0165': 't', '\u0167': 't',
- '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
- '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
- '\u0174': 'W', '\u0175': 'w',
- '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
- '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
- '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
- '\u0132': 'IJ', '\u0133': 'ij',
- '\u0152': 'Oe', '\u0153': 'oe',
- '\u0149': "'n", '\u017f': 'ss'
-};
-
-/** Detect free variable `global` from Node.js. */
-var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
-
-/** Detect free variable `self`. */
-var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
-
-/** Used as a reference to the global object. */
-var root$2 = freeGlobal || freeSelf || Function('return this')();
-
-/**
- * A specialized version of `_.reduce` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initAccum] Specify using the first element of `array` as
- * the initial value.
- * @returns {*} Returns the accumulated value.
- */
-function arrayReduce(array, iteratee, accumulator, initAccum) {
- var index = -1,
- length = array ? array.length : 0;
-
- if (initAccum && length) {
- accumulator = array[++index];
- }
- while (++index < length) {
- accumulator = iteratee(accumulator, array[index], index, array);
- }
- return accumulator;
-}
-
-/**
- * Converts an ASCII `string` to an array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the converted array.
- */
-function asciiToArray(string) {
- return string.split('');
-}
-
-/**
- * Splits an ASCII `string` into an array of its words.
- *
- * @private
- * @param {string} The string to inspect.
- * @returns {Array} Returns the words of `string`.
- */
-function asciiWords(string) {
- return string.match(reAsciiWord) || [];
-}
-
-/**
- * The base implementation of `_.propertyOf` without support for deep paths.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Function} Returns the new accessor function.
- */
-function basePropertyOf(object) {
- return function(key) {
- return object == null ? undefined : object[key];
- };
-}
-
-/**
- * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
- * letters to basic Latin letters.
- *
- * @private
- * @param {string} letter The matched letter to deburr.
- * @returns {string} Returns the deburred letter.
- */
-var deburrLetter = basePropertyOf(deburredLetters);
-
-/**
- * Checks if `string` contains Unicode symbols.
- *
- * @private
- * @param {string} string The string to inspect.
- * @returns {boolean} Returns `true` if a symbol is found, else `false`.
- */
-function hasUnicode(string) {
- return reHasUnicode.test(string);
-}
-
-/**
- * Checks if `string` contains a word composed of Unicode symbols.
- *
- * @private
- * @param {string} string The string to inspect.
- * @returns {boolean} Returns `true` if a word is found, else `false`.
- */
-function hasUnicodeWord(string) {
- return reHasUnicodeWord.test(string);
-}
-
-/**
- * Converts `string` to an array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the converted array.
- */
-function stringToArray(string) {
- return hasUnicode(string)
- ? unicodeToArray(string)
- : asciiToArray(string);
-}
-
-/**
- * Converts a Unicode `string` to an array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the converted array.
- */
-function unicodeToArray(string) {
- return string.match(reUnicode) || [];
-}
-
-/**
- * Splits a Unicode `string` into an array of its words.
- *
- * @private
- * @param {string} The string to inspect.
- * @returns {Array} Returns the words of `string`.
- */
-function unicodeWords(string) {
- return string.match(reUnicodeWord) || [];
-}
-
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
-
-/** Built-in value references. */
-var Symbol$1 = root$2.Symbol;
-
-/** Used to convert symbols to primitives and strings. */
-var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined,
- symbolToString = symbolProto ? symbolProto.toString : undefined;
-
-/**
- * The base implementation of `_.slice` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
-function baseSlice(array, start, end) {
- var index = -1,
- length = array.length;
-
- if (start < 0) {
- start = -start > length ? 0 : (length + start);
- }
- end = end > length ? length : end;
- if (end < 0) {
- end += length;
- }
- length = start > end ? 0 : ((end - start) >>> 0);
- start >>>= 0;
-
- var result = Array(length);
- while (++index < length) {
- result[index] = array[index + start];
- }
- return result;
-}
-
-/**
- * The base implementation of `_.toString` which doesn't convert nullish
- * values to empty strings.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- */
-function baseToString(value) {
- // Exit early for strings to avoid a performance hit in some environments.
- if (typeof value == 'string') {
- return value;
- }
- if (isSymbol(value)) {
- return symbolToString ? symbolToString.call(value) : '';
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
-}
-
-/**
- * Casts `array` to a slice if it's needed.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {number} start The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the cast slice.
- */
-function castSlice(array, start, end) {
- var length = array.length;
- end = end === undefined ? length : end;
- return (!start && end >= length) ? array : baseSlice(array, start, end);
-}
-
-/**
- * Creates a function like `_.lowerFirst`.
- *
- * @private
- * @param {string} methodName The name of the `String` case method to use.
- * @returns {Function} Returns the new case function.
- */
-function createCaseFirst(methodName) {
- return function(string) {
- string = toString(string);
-
- var strSymbols = hasUnicode(string)
- ? stringToArray(string)
- : undefined;
-
- var chr = strSymbols
- ? strSymbols[0]
- : string.charAt(0);
-
- var trailing = strSymbols
- ? castSlice(strSymbols, 1).join('')
- : string.slice(1);
-
- return chr[methodName]() + trailing;
- };
-}
-
-/**
- * Creates a function like `_.camelCase`.
- *
- * @private
- * @param {Function} callback The function to combine each word.
- * @returns {Function} Returns the new compounder function.
- */
-function createCompounder(callback) {
- return function(string) {
- return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
- };
-}
-
-/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
-function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
-}
-
-/**
- * Converts `value` to a string. An empty string is returned for `null`
- * and `undefined` values. The sign of `-0` is preserved.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- * @example
- *
- * _.toString(null);
- * // => ''
- *
- * _.toString(-0);
- * // => '-0'
- *
- * _.toString([1, 2, 3]);
- * // => '1,2,3'
- */
-function toString(value) {
- return value == null ? '' : baseToString(value);
-}
-
-/**
- * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the camel cased string.
- * @example
- *
- * _.camelCase('Foo Bar');
- * // => 'fooBar'
- *
- * _.camelCase('--foo-bar--');
- * // => 'fooBar'
- *
- * _.camelCase('__FOO_BAR__');
- * // => 'fooBar'
- */
-var camelCase = createCompounder(function(result, word, index) {
- word = word.toLowerCase();
- return result + (index ? capitalize(word) : word);
-});
-
-/**
- * Converts the first character of `string` to upper case and the remaining
- * to lower case.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to capitalize.
- * @returns {string} Returns the capitalized string.
- * @example
- *
- * _.capitalize('FRED');
- * // => 'Fred'
- */
-function capitalize(string) {
- return upperFirst(toString(string).toLowerCase());
-}
-
-/**
- * Deburrs `string` by converting
- * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
- * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
- * letters to basic Latin letters and removing
- * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to deburr.
- * @returns {string} Returns the deburred string.
- * @example
- *
- * _.deburr('déjà vu');
- * // => 'deja vu'
- */
-function deburr(string) {
- string = toString(string);
- return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
-}
-
-/**
- * Converts the first character of `string` to upper case.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the converted string.
- * @example
- *
- * _.upperFirst('fred');
- * // => 'Fred'
- *
- * _.upperFirst('FRED');
- * // => 'FRED'
- */
-var upperFirst = createCaseFirst('toUpperCase');
-
-/**
- * Splits `string` into an array of its words.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to inspect.
- * @param {RegExp|string} [pattern] The pattern to match words.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Array} Returns the words of `string`.
- * @example
- *
- * _.words('fred, barney, & pebbles');
- * // => ['fred', 'barney', 'pebbles']
- *
- * _.words('fred, barney, & pebbles', /[^, ]+/g);
- * // => ['fred', 'barney', '&', 'pebbles']
- */
-function words(string, pattern, guard) {
- string = toString(string);
- pattern = guard ? undefined : pattern;
-
- if (pattern === undefined) {
- return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
- }
- return string.match(pattern) || [];
-}
-
-var lodash_camelcase = camelCase;
-
-Object.defineProperty(localsConvention, "__esModule", {
- value: true
-});
-localsConvention.makeLocalsConventionReducer = makeLocalsConventionReducer;
-
-var _lodash = _interopRequireDefault$5(lodash_camelcase);
-
-function _interopRequireDefault$5(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function dashesCamelCase(string) {
- return string.replace(/-+(\w)/g, (_, firstLetter) => firstLetter.toUpperCase());
-}
-
-function makeLocalsConventionReducer(localsConvention, inputFile) {
- const isFunc = typeof localsConvention === "function";
- return (tokens, [className, value]) => {
- if (isFunc) {
- const convention = localsConvention(className, value, inputFile);
- tokens[convention] = value;
- return tokens;
- }
-
- switch (localsConvention) {
- case "camelCase":
- tokens[className] = value;
- tokens[(0, _lodash.default)(className)] = value;
- break;
-
- case "camelCaseOnly":
- tokens[(0, _lodash.default)(className)] = value;
- break;
-
- case "dashes":
- tokens[className] = value;
- tokens[dashesCamelCase(className)] = value;
- break;
-
- case "dashesOnly":
- tokens[dashesCamelCase(className)] = value;
- break;
- }
-
- return tokens;
- };
-}
-
-var FileSystemLoader$1 = {};
-
-Object.defineProperty(FileSystemLoader$1, "__esModule", {
- value: true
-});
-FileSystemLoader$1.default = void 0;
-
-var _postcss$1 = _interopRequireDefault$4(require$$0);
-
-var _path = _interopRequireDefault$4(require$$0$1);
-
-var _Parser$1 = _interopRequireDefault$4(Parser$1);
-
-var _fs$1 = fs;
-
-function _interopRequireDefault$4(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-// Initially copied from https://github.com/css-modules/css-modules-loader-core
-class Core {
- constructor(plugins) {
- this.plugins = plugins || Core.defaultPlugins;
- }
-
- async load(sourceString, sourcePath, trace, pathFetcher) {
- const parser = new _Parser$1.default(pathFetcher, trace);
- const plugins = this.plugins.concat([parser.plugin()]);
- const result = await (0, _postcss$1.default)(plugins).process(sourceString, {
- from: sourcePath
- });
- return {
- injectableSource: result.css,
- exportTokens: parser.exportTokens
- };
- }
-
-} // Sorts dependencies in the following way:
-// AAA comes before AA and A
-// AB comes after AA and before A
-// All Bs come after all As
-// This ensures that the files are always returned in the following order:
-// - In the order they were required, except
-// - After all their dependencies
-
-
-const traceKeySorter = (a, b) => {
- if (a.length < b.length) {
- return a < b.substring(0, a.length) ? -1 : 1;
- }
-
- if (a.length > b.length) {
- return a.substring(0, b.length) <= b ? -1 : 1;
- }
-
- return a < b ? -1 : 1;
-};
-
-class FileSystemLoader {
- constructor(root, plugins, fileResolve) {
- if (root === "/" && process.platform === "win32") {
- const cwdDrive = process.cwd().slice(0, 3);
-
- if (!/^[A-Za-z]:\\$/.test(cwdDrive)) {
- throw new Error(`Failed to obtain root from "${process.cwd()}".`);
- }
-
- root = cwdDrive;
- }
-
- this.root = root;
- this.fileResolve = fileResolve;
- this.sources = {};
- this.traces = {};
- this.importNr = 0;
- this.core = new Core(plugins);
- this.tokensByFile = {};
- this.fs = (0, _fs$1.getFileSystem)();
- }
-
- async fetch(_newPath, relativeTo, _trace) {
- const newPath = _newPath.replace(/^["']|["']$/g, "");
-
- const trace = _trace || String.fromCharCode(this.importNr++);
-
- const useFileResolve = typeof this.fileResolve === "function";
- const fileResolvedPath = useFileResolve ? await this.fileResolve(newPath, relativeTo) : await Promise.resolve();
-
- if (fileResolvedPath && !_path.default.isAbsolute(fileResolvedPath)) {
- throw new Error('The returned path from the "fileResolve" option must be absolute.');
- }
-
- const relativeDir = _path.default.dirname(relativeTo);
-
- const rootRelativePath = fileResolvedPath || _path.default.resolve(relativeDir, newPath);
-
- let fileRelativePath = fileResolvedPath || _path.default.resolve(_path.default.resolve(this.root, relativeDir), newPath); // if the path is not relative or absolute, try to resolve it in node_modules
-
-
- if (!useFileResolve && newPath[0] !== "." && !_path.default.isAbsolute(newPath)) {
- try {
- fileRelativePath = require.resolve(newPath);
- } catch (e) {// noop
- }
- }
-
- const tokens = this.tokensByFile[fileRelativePath];
- if (tokens) return tokens;
- return new Promise((resolve, reject) => {
- this.fs.readFile(fileRelativePath, "utf-8", async (err, source) => {
- if (err) reject(err);
- const {
- injectableSource,
- exportTokens
- } = await this.core.load(source, rootRelativePath, trace, this.fetch.bind(this));
- this.sources[fileRelativePath] = injectableSource;
- this.traces[trace] = fileRelativePath;
- this.tokensByFile[fileRelativePath] = exportTokens;
- resolve(exportTokens);
- });
- });
- }
-
- get finalSource() {
- const traces = this.traces;
- const sources = this.sources;
- let written = new Set();
- return Object.keys(traces).sort(traceKeySorter).map(key => {
- const filename = traces[key];
-
- if (written.has(filename)) {
- return null;
- }
-
- written.add(filename);
- return sources[filename];
- }).join("");
- }
-
-}
-
-FileSystemLoader$1.default = FileSystemLoader;
-
-var scoping = {};
-
-var src$3 = {exports: {}};
-
-const PERMANENT_MARKER = 2;
-const TEMPORARY_MARKER = 1;
-
-function createError(node, graph) {
- const er = new Error("Nondeterministic import's order");
-
- const related = graph[node];
- const relatedNode = related.find(
- (relatedNode) => graph[relatedNode].indexOf(node) > -1
- );
-
- er.nodes = [node, relatedNode];
-
- return er;
-}
-
-function walkGraph(node, graph, state, result, strict) {
- if (state[node] === PERMANENT_MARKER) {
- return;
- }
-
- if (state[node] === TEMPORARY_MARKER) {
- if (strict) {
- return createError(node, graph);
- }
-
- return;
- }
-
- state[node] = TEMPORARY_MARKER;
-
- const children = graph[node];
- const length = children.length;
-
- for (let i = 0; i < length; ++i) {
- const error = walkGraph(children[i], graph, state, result, strict);
-
- if (error instanceof Error) {
- return error;
- }
- }
-
- state[node] = PERMANENT_MARKER;
-
- result.push(node);
-}
-
-function topologicalSort$1(graph, strict) {
- const result = [];
- const state = {};
-
- const nodes = Object.keys(graph);
- const length = nodes.length;
-
- for (let i = 0; i < length; ++i) {
- const er = walkGraph(nodes[i], graph, state, result, strict);
-
- if (er instanceof Error) {
- return er;
- }
- }
-
- return result;
-}
-
-var topologicalSort_1 = topologicalSort$1;
-
-const topologicalSort = topologicalSort_1;
-
-const matchImports$1 = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/;
-const icssImport = /^:import\((?:"([^"]+)"|'([^']+)')\)/;
-
-const VISITED_MARKER = 1;
-
-/**
- * :import('G') {}
- *
- * Rule
- * composes: ... from 'A'
- * composes: ... from 'B'
-
- * Rule
- * composes: ... from 'A'
- * composes: ... from 'A'
- * composes: ... from 'C'
- *
- * Results in:
- *
- * graph: {
- * G: [],
- * A: [],
- * B: ['A'],
- * C: ['A'],
- * }
- */
-function addImportToGraph(importId, parentId, graph, visited) {
- const siblingsId = parentId (too long so truncated)
Command detailsnpm diff --diff=vite@5.0.11 --diff=vite@5.0.12 --diff-unified=2 See also the Reported by ybiquitous/npm-diff-action@v1.5.0 (Node.js 20.11.0 and npm 10.3.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dependencies
Pull requests that update a dependency file
javascript
Pull requests that update Javascript code
0 participants
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bumps vite from 5.0.11 to 5.0.12.
Changelog
Sourced from vite's changelog.
Commits
ee81e19
release: v5.0.1291641c4
fix: fs deny for case insensitive systems (#15653)ef89f80
fix: awaitconfigResolved
hooks of worker plugins (#15597) (#15605)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)You can disable automated security fix PRs for this repo from the Security Alerts page.