@jsenv/ast 6.3.5 → 6.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/ast",
3
- "version": "6.3.5",
3
+ "version": "6.3.6",
4
4
  "description": "Parse and transform HTML, CSS and JS",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -31,7 +31,7 @@
31
31
  "dependencies": {
32
32
  "@babel/parser": "7.26.2",
33
33
  "@jsenv/humanize": "1.2.8",
34
- "@jsenv/urls": "2.5.2",
34
+ "@jsenv/urls": "2.5.3",
35
35
  "acorn": "8.14.0",
36
36
  "acorn-import-attributes": "1.9.5",
37
37
  "acorn-walk": "8.3.4",
@@ -1,4 +1,4 @@
1
- import { fileURLToPath } from "node:url";
1
+ import { urlToFileSystemPath } from "@jsenv/urls";
2
2
  import { createParseError } from "../parse_error.js";
3
3
 
4
4
  export const applyPostCss = async ({
@@ -16,8 +16,8 @@ export const applyPostCss = async ({
16
16
  const cssFileUrl = urlToFileUrl(url);
17
17
  const result = await postcss(plugins).process(content, {
18
18
  collectUrls: true,
19
- from: fileURLToPath(cssFileUrl),
20
- to: fileURLToPath(cssFileUrl),
19
+ from: urlToFileSystemPath(cssFileUrl),
20
+ to: urlToFileSystemPath(cssFileUrl),
21
21
  map: {
22
22
  annotation: sourcemaps === "file",
23
23
  inline: sourcemaps === "inline",
@@ -3,7 +3,8 @@
3
3
  * - https://astexplorer.net/
4
4
  * - https://bvaughn.github.io/babel-repl
5
5
  */
6
- import { fileURLToPath, pathToFileURL } from "node:url";
6
+ import { urlToFileSystemPath } from "@jsenv/urls";
7
+ import { pathToFileURL } from "node:url";
7
8
  import { createParseError } from "../parse_error.js";
8
9
 
9
10
  export const applyBabelPlugins = async ({
@@ -20,7 +21,7 @@ export const applyBabelPlugins = async ({
20
21
  }
21
22
  const { transformAsync, transformFromAstAsync } = await import("@babel/core");
22
23
  const sourceFileName = inputUrl.startsWith("file:")
23
- ? fileURLToPath(inputUrl)
24
+ ? urlToFileSystemPath(inputUrl)
24
25
  : undefined;
25
26
  options = {
26
27
  ast: false,
@@ -29,7 +30,7 @@ export const applyBabelPlugins = async ({
29
30
  sourceFileName,
30
31
  filename: outputUrl
31
32
  ? outputUrl.startsWith("file:")
32
- ? fileURLToPath(inputUrl)
33
+ ? urlToFileSystemPath(inputUrl)
33
34
  : undefined
34
35
  : sourceFileName,
35
36
  configFile: false,