vite 7.1.5 → 7.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -28,10 +28,10 @@ The published Vite artifact additionally contains code with the following licens
28
28
  BSD-2-Clause, CC0-1.0, ISC, MIT
29
29
 
30
30
  # Bundled dependencies:
31
- ## @jridgewell/gen-mapping, @jridgewell/remapping, @jridgewell/trace-mapping
31
+ ## @jridgewell/gen-mapping, @jridgewell/remapping, @jridgewell/sourcemap-codec, @jridgewell/trace-mapping
32
32
  License: MIT
33
33
  By: Justin Ridgewell
34
- Repositories: git+https://github.com/jridgewell/sourcemaps.git, git+https://github.com/jridgewell/sourcemaps.git, git+https://github.com/jridgewell/sourcemaps.git
34
+ Repositories: git+https://github.com/jridgewell/sourcemaps.git, git+https://github.com/jridgewell/sourcemaps.git, git+https://github.com/jridgewell/sourcemaps.git, git+https://github.com/jridgewell/sourcemaps.git
35
35
 
36
36
  > Copyright 2024 Justin Ridgewell <justin@ridgewell.name>
37
37
  >
@@ -82,35 +82,6 @@ Repository: https://github.com/jridgewell/resolve-uri
82
82
 
83
83
  ---------------------------------------
84
84
 
85
- ## @jridgewell/sourcemap-codec
86
- License: MIT
87
- By: Rich Harris
88
- Repository: git+https://github.com/jridgewell/sourcemap-codec.git
89
-
90
- > The MIT License
91
- >
92
- > Copyright (c) 2015 Rich Harris
93
- >
94
- > Permission is hereby granted, free of charge, to any person obtaining a copy
95
- > of this software and associated documentation files (the "Software"), to deal
96
- > in the Software without restriction, including without limitation the rights
97
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
98
- > copies of the Software, and to permit persons to whom the Software is
99
- > furnished to do so, subject to the following conditions:
100
- >
101
- > The above copyright notice and this permission notice shall be included in
102
- > all copies or substantial portions of the Software.
103
- >
104
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
105
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
106
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
107
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
108
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
109
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
110
- > THE SOFTWARE.
111
-
112
- ---------------------------------------
113
-
114
85
  ## @polka/compression
115
86
  License: MIT
116
87
  Repository: lukeed/polka
@@ -1,6 +1,6 @@
1
1
  import "@vite/env";
2
2
 
3
- //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.81.0/node_modules/@oxc-project/runtime/src/helpers/esm/typeof.js
3
+ //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.87.0/node_modules/@oxc-project/runtime/src/helpers/esm/typeof.js
4
4
  function _typeof(o) {
5
5
  "@babel/helpers - typeof";
6
6
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
@@ -11,7 +11,7 @@ function _typeof(o) {
11
11
  }
12
12
 
13
13
  //#endregion
14
- //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.81.0/node_modules/@oxc-project/runtime/src/helpers/esm/toPrimitive.js
14
+ //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.87.0/node_modules/@oxc-project/runtime/src/helpers/esm/toPrimitive.js
15
15
  function toPrimitive(t, r) {
16
16
  if ("object" != _typeof(t) || !t) return t;
17
17
  var e = t[Symbol.toPrimitive];
@@ -24,14 +24,14 @@ function toPrimitive(t, r) {
24
24
  }
25
25
 
26
26
  //#endregion
27
- //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.81.0/node_modules/@oxc-project/runtime/src/helpers/esm/toPropertyKey.js
27
+ //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.87.0/node_modules/@oxc-project/runtime/src/helpers/esm/toPropertyKey.js
28
28
  function toPropertyKey(t) {
29
29
  var i = toPrimitive(t, "string");
30
30
  return "symbol" == _typeof(i) ? i : i + "";
31
31
  }
32
32
 
33
33
  //#endregion
34
- //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.81.0/node_modules/@oxc-project/runtime/src/helpers/esm/defineProperty.js
34
+ //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.87.0/node_modules/@oxc-project/runtime/src/helpers/esm/defineProperty.js
35
35
  function _defineProperty(e, r, t) {
36
36
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
37
37
  value: t,
@@ -247,12 +247,11 @@ const AsyncFunction = async function() {}.constructor;
247
247
  function promiseWithResolvers() {
248
248
  let resolve;
249
249
  let reject;
250
- const promise = new Promise((_resolve, _reject) => {
251
- resolve = _resolve;
252
- reject = _reject;
253
- });
254
250
  return {
255
- promise,
251
+ promise: new Promise((_resolve, _reject) => {
252
+ resolve = _resolve;
253
+ reject = _reject;
254
+ }),
256
255
  resolve,
257
256
  reject
258
257
  };
@@ -893,10 +892,7 @@ async function handleMessage(payload) {
893
892
  }
894
893
  break;
895
894
  case "ping": break;
896
- default: {
897
- const check = payload;
898
- return check;
899
- }
895
+ default: return payload;
900
896
  }
901
897
  }
902
898
  const enableOverlay = __HMR_ENABLE_OVERLAY__;
@@ -957,8 +953,7 @@ function waitForSuccessfulPing(socketUrl) {
957
953
  }
958
954
  function pingWorkerContentMain(socketUrl) {
959
955
  self.addEventListener("connect", (_event) => {
960
- const event = _event;
961
- const port = event.ports[0];
956
+ const port = _event.ports[0];
962
957
  if (!socketUrl) {
963
958
  port.postMessage({
964
959
  type: "error",
@@ -970,8 +965,8 @@ function pingWorkerContentMain(socketUrl) {
970
965
  currentState: "visible",
971
966
  listeners: /* @__PURE__ */ new Set()
972
967
  };
973
- port.addEventListener("message", (event$1) => {
974
- const { visibility } = event$1.data;
968
+ port.addEventListener("message", (event) => {
969
+ const { visibility } = event.data;
975
970
  visibilityManager.currentState = visibility;
976
971
  console.debug("[vite] new window visibility", visibility);
977
972
  for (const listener of visibilityManager.listeners) listener(visibility);
@@ -1,4 +1,4 @@
1
1
  import "./dep-SmwnYDP9.js";
2
- import { configDefaults, defineConfig, getDefaultEnvironmentOptions, isResolvedConfig, loadConfigFromFile, resolveBaseUrl, resolveConfig, resolveDevEnvironmentOptions, sortUserPlugins } from "./dep-M_KD0XSK.js";
2
+ import { configDefaults, defineConfig, getDefaultEnvironmentOptions, isResolvedConfig, loadConfigFromFile, resolveBaseUrl, resolveConfig, resolveDevEnvironmentOptions, sortUserPlugins } from "./dep-D5b0Zz6C.js";
3
3
 
4
4
  export { resolveConfig };
@@ -1,4 +1,4 @@
1
1
  import "./dep-SmwnYDP9.js";
2
- import { addManuallyIncludedOptimizeDeps, addOptimizedDepInfo, cleanupDepsCacheStaleDirs, createIsOptimizedDepFile, createIsOptimizedDepUrl, depsFromOptimizedDepInfo, depsLogString, discoverProjectDependencies, extractExportsData, getDepsCacheDir, getOptimizedDepPath, initDepsOptimizerMetadata, isDepOptimizationDisabled, loadCachedDepOptimizationMetadata, optimizeDeps, optimizeExplicitEnvironmentDeps, optimizedDepInfoFromFile, optimizedDepInfoFromId, optimizedDepNeedsInterop, runOptimizeDeps, toDiscoveredDependencies } from "./dep-M_KD0XSK.js";
2
+ import { addManuallyIncludedOptimizeDeps, addOptimizedDepInfo, cleanupDepsCacheStaleDirs, createIsOptimizedDepFile, createIsOptimizedDepUrl, depsFromOptimizedDepInfo, depsLogString, discoverProjectDependencies, extractExportsData, getDepsCacheDir, getOptimizedDepPath, initDepsOptimizerMetadata, isDepOptimizationDisabled, loadCachedDepOptimizationMetadata, optimizeDeps, optimizeExplicitEnvironmentDeps, optimizedDepInfoFromFile, optimizedDepInfoFromId, optimizedDepNeedsInterop, runOptimizeDeps, toDiscoveredDependencies } from "./dep-D5b0Zz6C.js";
3
3
 
4
4
  export { optimizeDeps };
@@ -1,4 +1,4 @@
1
1
  import "./dep-SmwnYDP9.js";
2
- import { _createServer, createServer, createServerCloseFn, resolveServerOptions, restartServerWithUrls, serverConfigDefaults } from "./dep-M_KD0XSK.js";
2
+ import { _createServer, createServer, createServerCloseFn, resolveServerOptions, restartServerWithUrls, serverConfigDefaults } from "./dep-D5b0Zz6C.js";
3
3
 
4
4
  export { createServer };
@@ -1,4 +1,4 @@
1
1
  import "./dep-SmwnYDP9.js";
2
- import { BuildEnvironment, build, buildEnvironmentOptionsDefaults, builderOptionsDefaults, createBuilder, createToImportMetaURLBasedRelativeRuntime, injectEnvironmentToHooks, onRollupLog, resolveBuildEnvironmentOptions, resolveBuildOutputs, resolveBuildPlugins, resolveBuilderOptions, resolveLibFilename, resolveUserExternal, toOutputFilePathInCss, toOutputFilePathInHtml, toOutputFilePathInJS, toOutputFilePathWithoutRuntime } from "./dep-M_KD0XSK.js";
2
+ import { BuildEnvironment, build, buildEnvironmentOptionsDefaults, builderOptionsDefaults, createBuilder, createToImportMetaURLBasedRelativeRuntime, injectEnvironmentToHooks, onRollupLog, resolveBuildEnvironmentOptions, resolveBuildOutputs, resolveBuildPlugins, resolveBuilderOptions, resolveLibFilename, resolveUserExternal, toOutputFilePathInCss, toOutputFilePathInHtml, toOutputFilePathInJS, toOutputFilePathWithoutRuntime } from "./dep-D5b0Zz6C.js";
3
3
 
4
4
  export { createBuilder, resolveBuildPlugins };
@@ -0,0 +1,4 @@
1
+ import "./dep-SmwnYDP9.js";
2
+ import { preview, resolvePreviewOptions } from "./dep-D5b0Zz6C.js";
3
+
4
+ export { preview };
@@ -250,10 +250,7 @@ var Preprocessor = class {
250
250
  return false;
251
251
  }
252
252
  if (caseSensitive) return this.html.startsWith(pattern, this.pos);
253
- for (let i = 0; i < pattern.length; i++) {
254
- const cp = this.html.charCodeAt(this.pos + i) | 32;
255
- if (cp !== pattern.charCodeAt(i)) return false;
256
- }
253
+ for (let i = 0; i < pattern.length; i++) if ((this.html.charCodeAt(this.pos + i) | 32) !== pattern.charCodeAt(i)) return false;
257
254
  return true;
258
255
  }
259
256
  peek(offset) {
@@ -293,8 +290,7 @@ var Preprocessor = class {
293
290
  }
294
291
  this.skipNextNewLine = false;
295
292
  if (isSurrogate(cp)) cp = this._processSurrogate(cp);
296
- const isCommonValidRange = this.handler.onParseError === null || cp > 31 && cp < 127 || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.CARRIAGE_RETURN || cp > 159 && cp < 64976;
297
- if (!isCommonValidRange) this._checkForProblematicCharacters(cp);
293
+ if (!(this.handler.onParseError === null || cp > 31 && cp < 127 || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.CARRIAGE_RETURN || cp > 159 && cp < 64976)) this._checkForProblematicCharacters(cp);
298
294
  return cp;
299
295
  }
300
296
  _checkForProblematicCharacters(cp) {
@@ -1250,15 +1246,6 @@ const NUMBERED_HEADERS = new Set([
1250
1246
  $.H5,
1251
1247
  $.H6
1252
1248
  ]);
1253
- const UNESCAPED_TEXT = new Set([
1254
- TAG_NAMES.STYLE,
1255
- TAG_NAMES.SCRIPT,
1256
- TAG_NAMES.XMP,
1257
- TAG_NAMES.IFRAME,
1258
- TAG_NAMES.NOEMBED,
1259
- TAG_NAMES.NOFRAMES,
1260
- TAG_NAMES.PLAINTEXT
1261
- ]);
1262
1249
 
1263
1250
  //#endregion
1264
1251
  //#region ../../node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/index.js
@@ -2069,8 +2056,7 @@ var Tokenizer = class {
2069
2056
  this._createEndTagToken();
2070
2057
  const token = this.currentToken;
2071
2058
  token.tagName = this.lastStartTagName;
2072
- const cp = this.preprocessor.peek(this.lastStartTagName.length);
2073
- switch (cp) {
2059
+ switch (this.preprocessor.peek(this.lastStartTagName.length)) {
2074
2060
  case CODE_POINTS.SPACE:
2075
2061
  case CODE_POINTS.LINE_FEED:
2076
2062
  case CODE_POINTS.TABULATION:
@@ -2637,13 +2623,11 @@ var Tokenizer = class {
2637
2623
  case CODE_POINTS.HYPHEN_MINUS:
2638
2624
  this.state = State.COMMENT_START_DASH;
2639
2625
  break;
2640
- case CODE_POINTS.GREATER_THAN_SIGN: {
2626
+ case CODE_POINTS.GREATER_THAN_SIGN:
2641
2627
  this._err(ERR.abruptClosingOfEmptyComment);
2642
2628
  this.state = State.DATA;
2643
- const token = this.currentToken;
2644
- this.emitCurrentComment(token);
2629
+ this.emitCurrentComment(this.currentToken);
2645
2630
  break;
2646
- }
2647
2631
  default:
2648
2632
  this.state = State.COMMENT;
2649
2633
  this._stateComment(cp);
@@ -3765,16 +3749,13 @@ const defaultTreeAdapter = {
3765
3749
  doctypeNode.name = name;
3766
3750
  doctypeNode.publicId = publicId;
3767
3751
  doctypeNode.systemId = systemId;
3768
- } else {
3769
- const node = {
3770
- nodeName: "#documentType",
3771
- name,
3772
- publicId,
3773
- systemId,
3774
- parentNode: null
3775
- };
3776
- defaultTreeAdapter.appendChild(document, node);
3777
- }
3752
+ } else defaultTreeAdapter.appendChild(document, {
3753
+ nodeName: "#documentType",
3754
+ name,
3755
+ publicId,
3756
+ systemId,
3757
+ parentNode: null
3758
+ });
3778
3759
  },
3779
3760
  setDocumentMode(document, mode) {
3780
3761
  document.mode = mode;
@@ -4178,8 +4159,7 @@ const EXITS_FOREIGN_CONTENT = new Set([
4178
4159
  ]);
4179
4160
  function causesExit(startTagToken) {
4180
4161
  const tn = startTagToken.tagID;
4181
- const isFontWithAttrs = tn === TAG_ID.FONT && startTagToken.attrs.some(({ name }) => name === ATTRS.COLOR || name === ATTRS.SIZE || name === ATTRS.FACE);
4182
- return isFontWithAttrs || EXITS_FOREIGN_CONTENT.has(tn);
4162
+ return tn === TAG_ID.FONT && startTagToken.attrs.some(({ name }) => name === ATTRS.COLOR || name === ATTRS.SIZE || name === ATTRS.FACE) || EXITS_FOREIGN_CONTENT.has(tn);
4183
4163
  }
4184
4164
  function adjustTokenMathMLAttrs(token) {
4185
4165
  for (let i = 0; i < token.attrs.length; i++) if (token.attrs[i].name === DEFINITION_URL_ATTR) {
@@ -4356,7 +4336,7 @@ var Parser = class {
4356
4336
  var _a$1;
4357
4337
  if (!this.onParseError) return;
4358
4338
  const loc = (_a$1 = token.location) !== null && _a$1 !== void 0 ? _a$1 : BASE_LOC;
4359
- const err = {
4339
+ this.onParseError({
4360
4340
  code,
4361
4341
  startLine: loc.startLine,
4362
4342
  startCol: loc.startCol,
@@ -4364,8 +4344,7 @@ var Parser = class {
4364
4344
  endLine: beforeToken ? loc.startLine : loc.endLine,
4365
4345
  endCol: beforeToken ? loc.startCol : loc.endCol,
4366
4346
  endOffset: beforeToken ? loc.startOffset : loc.endOffset
4367
- };
4368
- this.onParseError(err);
4347
+ });
4369
4348
  }
4370
4349
  /** @internal */
4371
4350
  onItemPush(node, tid, isTop) {
@@ -4446,13 +4425,9 @@ var Parser = class {
4446
4425
  }
4447
4426
  /** @protected */
4448
4427
  _setDocumentType(token) {
4449
- const name = token.name || "";
4450
- const publicId = token.publicId || "";
4451
- const systemId = token.systemId || "";
4452
- this.treeAdapter.setDocumentType(this.document, name, publicId, systemId);
4428
+ this.treeAdapter.setDocumentType(this.document, token.name || "", token.publicId || "", token.systemId || "");
4453
4429
  if (token.location) {
4454
- const documentChildren = this.treeAdapter.getChildNodes(this.document);
4455
- const docTypeNode = documentChildren.find((node) => this.treeAdapter.isDocumentTypeNode(node));
4430
+ const docTypeNode = this.treeAdapter.getChildNodes(this.document).find((node) => this.treeAdapter.isDocumentTypeNode(node));
4456
4431
  if (docTypeNode) this.treeAdapter.setNodeSourceCodeLocation(docTypeNode, token.location);
4457
4432
  }
4458
4433
  }
@@ -4530,8 +4505,7 @@ var Parser = class {
4530
4505
  const siblings = this.treeAdapter.getChildNodes(parent);
4531
4506
  const textNodeIdx = beforeElement ? siblings.lastIndexOf(beforeElement) : siblings.length;
4532
4507
  const textNode = siblings[textNodeIdx - 1];
4533
- const tnLoc = this.treeAdapter.getNodeSourceCodeLocation(textNode);
4534
- if (tnLoc) {
4508
+ if (this.treeAdapter.getNodeSourceCodeLocation(textNode)) {
4535
4509
  const { endLine, endCol, endOffset } = token.location;
4536
4510
  this.treeAdapter.updateNodeSourceCodeLocation(textNode, {
4537
4511
  endLine,
@@ -5212,8 +5186,7 @@ function aaInnerLoop(p, furthestBlock, formattingElement) {
5212
5186
  nextElement = p.openElements.getCommonAncestor(element);
5213
5187
  const elementEntry = p.activeFormattingElements.getElementEntry(element);
5214
5188
  const counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER;
5215
- const shouldRemoveFromOpenElements = !elementEntry || counterOverflow;
5216
- if (shouldRemoveFromOpenElements) {
5189
+ if (!elementEntry || counterOverflow) {
5217
5190
  if (counterOverflow) p.activeFormattingElements.removeEntry(elementEntry);
5218
5191
  p.openElements.remove(element);
5219
5192
  } else {
@@ -5456,8 +5429,7 @@ function endTagInHeadNoScript(p, token) {
5456
5429
  }
5457
5430
  }
5458
5431
  function tokenInHeadNoScript(p, token) {
5459
- const errCode = token.type === TokenType.EOF ? ERR.openElementsLeftAfterEof : ERR.disallowedContentInNoscriptInHead;
5460
- p._err(token, errCode);
5432
+ p._err(token, token.type === TokenType.EOF ? ERR.openElementsLeftAfterEof : ERR.disallowedContentInNoscriptInHead);
5461
5433
  p.openElements.pop();
5462
5434
  p.insertionMode = InsertionMode.IN_HEAD;
5463
5435
  p._processToken(token);
@@ -6268,8 +6240,7 @@ const TABLE_VOID_ELEMENTS = new Set([
6268
6240
  TAG_ID.TR
6269
6241
  ]);
6270
6242
  function startTagInCaption(p, token) {
6271
- const tn = token.tagID;
6272
- if (TABLE_VOID_ELEMENTS.has(tn)) {
6243
+ if (TABLE_VOID_ELEMENTS.has(token.tagID)) {
6273
6244
  if (p.openElements.hasInTableScope(TAG_ID.CAPTION)) {
6274
6245
  p.openElements.generateImpliedEndTags();
6275
6246
  p.openElements.popUntilTagNamePopped(TAG_ID.CAPTION);
@@ -6467,8 +6438,7 @@ function endTagInRow(p, token) {
6467
6438
  }
6468
6439
  }
6469
6440
  function startTagInCell(p, token) {
6470
- const tn = token.tagID;
6471
- if (TABLE_VOID_ELEMENTS.has(tn)) {
6441
+ if (TABLE_VOID_ELEMENTS.has(token.tagID)) {
6472
6442
  if (p.openElements.hasInTableScope(TAG_ID.TD) || p.openElements.hasInTableScope(TAG_ID.TH)) {
6473
6443
  p._closeTableCell();
6474
6444
  startTagInRow(p, token);
@@ -6764,29 +6734,6 @@ function endTagInForeignContent(p, token) {
6764
6734
  }
6765
6735
  }
6766
6736
 
6767
- //#endregion
6768
- //#region ../../node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/serializer/index.js
6769
- const VOID_ELEMENTS = new Set([
6770
- TAG_NAMES.AREA,
6771
- TAG_NAMES.BASE,
6772
- TAG_NAMES.BASEFONT,
6773
- TAG_NAMES.BGSOUND,
6774
- TAG_NAMES.BR,
6775
- TAG_NAMES.COL,
6776
- TAG_NAMES.EMBED,
6777
- TAG_NAMES.FRAME,
6778
- TAG_NAMES.HR,
6779
- TAG_NAMES.IMG,
6780
- TAG_NAMES.INPUT,
6781
- TAG_NAMES.KEYGEN,
6782
- TAG_NAMES.LINK,
6783
- TAG_NAMES.META,
6784
- TAG_NAMES.PARAM,
6785
- TAG_NAMES.SOURCE,
6786
- TAG_NAMES.TRACK,
6787
- TAG_NAMES.WBR
6788
- ]);
6789
-
6790
6737
  //#endregion
6791
6738
  //#region ../../node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/index.js
6792
6739
  /**
@@ -384,10 +384,9 @@ var require_parse_styles = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
384
384
  parent: sourceFile
385
385
  });
386
386
  });
387
- const importedContent = await Promise.all(resolved.map((file) => {
387
+ stmt.children = (await Promise.all(resolved.map((file) => {
388
388
  return loadImportContent(result, stmt, file, options, state, postcss);
389
- }));
390
- stmt.children = importedContent.flat().filter((x) => !!x);
389
+ }))).flat().filter((x) => !!x);
391
390
  }
392
391
  async function loadImportContent(result, stmt, filename, options, state, postcss) {
393
392
  const atRule = stmt.node;
@@ -409,10 +408,9 @@ var require_parse_styles = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
409
408
  const styles = importedResult.root;
410
409
  result.messages = result.messages.concat(importedResult.messages);
411
410
  if (options.skipDuplicates) {
412
- const hasImport = styles.some((child) => {
411
+ if (!styles.some((child) => {
413
412
  return child.type === "atrule" && child.name === "import";
414
- });
415
- if (!hasImport) {
413
+ })) {
416
414
  if (!state.hashFiles[content]) state.hashFiles[content] = {};
417
415
  state.hashFiles[content][stmtDuplicateCheckKey] = true;
418
416
  }
@@ -422,8 +420,7 @@ var require_parse_styles = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
422
420
  function isProcessableURL(uri) {
423
421
  if (/^(?:[a-z]+:)?\/\//i.test(uri)) return false;
424
422
  try {
425
- const url = new URL(uri, "https://example.com");
426
- if (url.search) return false;
423
+ if (new URL(uri, "https://example.com").search) return false;
427
424
  } catch {}
428
425
  return true;
429
426
  }