@bamboocss/node 1.64.5 → 1.64.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/dist/index.cjs CHANGED
@@ -1434,33 +1434,6 @@ const EXTENSIONS = [
1434
1434
  ".mjs",
1435
1435
  ".cjs"
1436
1436
  ];
1437
- /** What a `.js`-family specifier may actually name, source first. */
1438
- const EMITTED = [
1439
- [".js", [
1440
- ".ts",
1441
- ".tsx",
1442
- ".d.ts",
1443
- ".js",
1444
- ".jsx"
1445
- ]],
1446
- [".jsx", [
1447
- ".tsx",
1448
- ".ts",
1449
- ".d.ts",
1450
- ".jsx",
1451
- ".js"
1452
- ]],
1453
- [".mjs", [
1454
- ".mts",
1455
- ".d.mts",
1456
- ".mjs"
1457
- ]],
1458
- [".cjs", [
1459
- ".cts",
1460
- ".d.cts",
1461
- ".cjs"
1462
- ]]
1463
- ];
1464
1437
  /** Every specifier in a source, or `undefined` when the text could not be scanned at all. */
1465
1438
  const scanSpecifiers = (text) => {
1466
1439
  const found = [];
@@ -1487,8 +1460,7 @@ const trimmed = (path) => {
1487
1460
  const resolveSlashed = (base, path) => trimmed(absolute(path) ? slash(path) : node_path.posix.join(base, slash(path)));
1488
1461
  /** A candidate path with every extension a specifier may have omitted. */
1489
1462
  const candidatesFor = (base) => {
1490
- const emitted = EMITTED.find(([suffix]) => base.endsWith(suffix));
1491
- return [...emitted ? emitted[1].map((extension) => base.slice(0, -emitted[0].length) + extension) : [base, ...EXTENSIONS.map((extension) => base + extension)], ...EXTENSIONS.map((extension) => `${base}/index${extension}`)];
1463
+ return [...(0, _bamboocss_shared.emittedModuleCandidates)(base) ?? [base, ...EXTENSIONS.map((extension) => base + extension)], ...EXTENSIONS.map((extension) => `${base}/index${extension}`)];
1492
1464
  };
1493
1465
  /**
1494
1466
  * Where a specifier points, when that is somewhere inside the project.
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import { isStaticCompilerActive, markStaticCompilerActive } from "./static-compi
2
2
  import { createRequire } from "node:module";
3
3
  import { colors, logger, quote } from "@bamboocss/logger";
4
4
  import { checkNamingAgreement, formatNamingDisagreement, messages, prunesPreflight } from "@bamboocss/core";
5
- import { BambooError, cssVarRefs, getOrCreateSet, groupBy, truncateList, uniq } from "@bamboocss/shared";
5
+ import { BambooError, cssVarRefs, emittedModuleCandidates, getOrCreateSet, groupBy, truncateList, uniq } from "@bamboocss/shared";
6
6
  import { isMatch } from "matcher";
7
7
  import fs, { appendFileSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
8
8
  import { changesEveryArtifact, convertTsPathsToRegexes, diffConfigs, filesReadBy, findConfig, getConfigDependencies, loadConfig, mergeHooks } from "@bamboocss/config";
@@ -1423,33 +1423,6 @@ const EXTENSIONS = [
1423
1423
  ".mjs",
1424
1424
  ".cjs"
1425
1425
  ];
1426
- /** What a `.js`-family specifier may actually name, source first. */
1427
- const EMITTED = [
1428
- [".js", [
1429
- ".ts",
1430
- ".tsx",
1431
- ".d.ts",
1432
- ".js",
1433
- ".jsx"
1434
- ]],
1435
- [".jsx", [
1436
- ".tsx",
1437
- ".ts",
1438
- ".d.ts",
1439
- ".jsx",
1440
- ".js"
1441
- ]],
1442
- [".mjs", [
1443
- ".mts",
1444
- ".d.mts",
1445
- ".mjs"
1446
- ]],
1447
- [".cjs", [
1448
- ".cts",
1449
- ".d.cts",
1450
- ".cjs"
1451
- ]]
1452
- ];
1453
1426
  /** Every specifier in a source, or `undefined` when the text could not be scanned at all. */
1454
1427
  const scanSpecifiers = (text) => {
1455
1428
  const found = [];
@@ -1476,8 +1449,7 @@ const trimmed = (path) => {
1476
1449
  const resolveSlashed = (base, path) => trimmed(absolute(path) ? slash(path) : posix.join(base, slash(path)));
1477
1450
  /** A candidate path with every extension a specifier may have omitted. */
1478
1451
  const candidatesFor = (base) => {
1479
- const emitted = EMITTED.find(([suffix]) => base.endsWith(suffix));
1480
- return [...emitted ? emitted[1].map((extension) => base.slice(0, -emitted[0].length) + extension) : [base, ...EXTENSIONS.map((extension) => base + extension)], ...EXTENSIONS.map((extension) => `${base}/index${extension}`)];
1452
+ return [...emittedModuleCandidates(base) ?? [base, ...EXTENSIONS.map((extension) => base + extension)], ...EXTENSIONS.map((extension) => `${base}/index${extension}`)];
1481
1453
  };
1482
1454
  /**
1483
1455
  * Where a specifier points, when that is somewhere inside the project.
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bamboocss/node",
3
- "version": "1.64.5",
3
+ "version": "1.64.6",
4
4
  "description": "The core css bamboo library",
5
5
  "homepage": "https://bamboocss.com",
6
6
  "license": "MIT",
@@ -59,23 +59,23 @@
59
59
  "pkg-types": "2.3.0",
60
60
  "pluralize": "8.0.0",
61
61
  "ts-pattern": "5.9.0",
62
- "@bamboocss/config": "1.64.5",
63
- "@bamboocss/core": "1.64.5",
64
- "@bamboocss/generator": "1.64.5",
65
- "@bamboocss/logger": "1.64.5",
66
- "@bamboocss/plugin-svelte": "1.64.5",
67
- "@bamboocss/plugin-vue": "1.64.5",
68
- "@bamboocss/reporter": "1.64.5",
69
- "@bamboocss/shared": "1.64.5",
70
- "@bamboocss/token-dictionary": "1.64.5",
71
- "@bamboocss/types": "1.64.5"
62
+ "@bamboocss/config": "1.64.6",
63
+ "@bamboocss/core": "1.64.6",
64
+ "@bamboocss/generator": "1.64.6",
65
+ "@bamboocss/logger": "1.64.6",
66
+ "@bamboocss/plugin-svelte": "1.64.6",
67
+ "@bamboocss/plugin-vue": "1.64.6",
68
+ "@bamboocss/reporter": "1.64.6",
69
+ "@bamboocss/shared": "1.64.6",
70
+ "@bamboocss/token-dictionary": "1.64.6",
71
+ "@bamboocss/types": "1.64.6"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@astrojs/compiler": "3.0.1",
75
75
  "@astrojs/compiler-rs": "0.5.1",
76
76
  "@types/picomatch": "4.0.2",
77
77
  "boxen": "8.0.1",
78
- "@bamboocss/native-extractor": "1.64.5"
78
+ "@bamboocss/native-extractor": "1.64.6"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "@astrojs/compiler": ">=2",