@bamboocss/parser 1.51.6 → 1.52.0

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
@@ -1511,6 +1511,22 @@ var Project = class {
1511
1511
  this.#assertNotLoading();
1512
1512
  return this.options.parserOptions;
1513
1513
  }
1514
+ /**
1515
+ * `paths` and `baseUrl` as this project was configured with them, without opening a compiler.
1516
+ *
1517
+ * The same values `#planSpecifier` resolves against — read off the options the project was
1518
+ * built from rather than off the program, precisely so asking does not materialize one. A
1519
+ * caller that needs to know where a specifier could point *before* deciding what to install
1520
+ * has no compiler yet, and forcing one into existence to answer is the cost it is trying to
1521
+ * avoid.
1522
+ */
1523
+ get resolutionOptions() {
1524
+ const configured = this.#sourceFiles.projectOptions.compilerOptions;
1525
+ return {
1526
+ baseUrl: configured?.baseUrl,
1527
+ paths: configured?.paths
1528
+ };
1529
+ }
1514
1530
  constructor(options) {
1515
1531
  const { deferInitialSourceFiles, getFiles, parserOptions } = options;
1516
1532
  const tsProjectOptions = { ...options };
package/dist/index.d.cts CHANGED
@@ -471,6 +471,19 @@ declare class Project {
471
471
  project: Project$1;
472
472
  private options;
473
473
  get parserOptions(): ParserOptions;
474
+ /**
475
+ * `paths` and `baseUrl` as this project was configured with them, without opening a compiler.
476
+ *
477
+ * The same values `#planSpecifier` resolves against — read off the options the project was
478
+ * built from rather than off the program, precisely so asking does not materialize one. A
479
+ * caller that needs to know where a specifier could point *before* deciding what to install
480
+ * has no compiler yet, and forcing one into existence to answer is the cost it is trying to
481
+ * avoid.
482
+ */
483
+ get resolutionOptions(): {
484
+ baseUrl?: string;
485
+ paths?: Record<string, string[]>;
486
+ };
474
487
  constructor(options: ProjectOptions);
475
488
  get files(): string[];
476
489
  /** Reverse dependency graph: resolved target -> importers. */
package/dist/index.d.mts CHANGED
@@ -471,6 +471,19 @@ declare class Project {
471
471
  project: Project$1;
472
472
  private options;
473
473
  get parserOptions(): ParserOptions;
474
+ /**
475
+ * `paths` and `baseUrl` as this project was configured with them, without opening a compiler.
476
+ *
477
+ * The same values `#planSpecifier` resolves against — read off the options the project was
478
+ * built from rather than off the program, precisely so asking does not materialize one. A
479
+ * caller that needs to know where a specifier could point *before* deciding what to install
480
+ * has no compiler yet, and forcing one into existence to answer is the cost it is trying to
481
+ * avoid.
482
+ */
483
+ get resolutionOptions(): {
484
+ baseUrl?: string;
485
+ paths?: Record<string, string[]>;
486
+ };
474
487
  constructor(options: ProjectOptions);
475
488
  get files(): string[];
476
489
  /** Reverse dependency graph: resolved target -> importers. */
package/dist/index.mjs CHANGED
@@ -1510,6 +1510,22 @@ var Project = class {
1510
1510
  this.#assertNotLoading();
1511
1511
  return this.options.parserOptions;
1512
1512
  }
1513
+ /**
1514
+ * `paths` and `baseUrl` as this project was configured with them, without opening a compiler.
1515
+ *
1516
+ * The same values `#planSpecifier` resolves against — read off the options the project was
1517
+ * built from rather than off the program, precisely so asking does not materialize one. A
1518
+ * caller that needs to know where a specifier could point *before* deciding what to install
1519
+ * has no compiler yet, and forcing one into existence to answer is the cost it is trying to
1520
+ * avoid.
1521
+ */
1522
+ get resolutionOptions() {
1523
+ const configured = this.#sourceFiles.projectOptions.compilerOptions;
1524
+ return {
1525
+ baseUrl: configured?.baseUrl,
1526
+ paths: configured?.paths
1527
+ };
1528
+ }
1513
1529
  constructor(options) {
1514
1530
  const { deferInitialSourceFiles, getFiles, parserOptions } = options;
1515
1531
  const tsProjectOptions = { ...options };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bamboocss/parser",
3
- "version": "1.51.6",
3
+ "version": "1.52.0",
4
4
  "description": "The static parser for bamboo css",
5
5
  "homepage": "https://bamboocss.com",
6
6
  "license": "MIT",
@@ -33,20 +33,20 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "ts-pattern": "5.9.0",
36
- "@bamboocss/config": "^1.51.6",
37
- "@bamboocss/core": "^1.51.6",
38
- "@bamboocss/extractor": "1.51.6",
39
- "@bamboocss/logger": "1.51.6",
40
- "@bamboocss/shared": "1.51.6",
41
- "@bamboocss/ts-ast": "1.51.6",
42
- "@bamboocss/types": "1.51.6"
36
+ "@bamboocss/config": "^1.52.0",
37
+ "@bamboocss/core": "^1.52.0",
38
+ "@bamboocss/extractor": "1.52.0",
39
+ "@bamboocss/logger": "1.52.0",
40
+ "@bamboocss/shared": "1.52.0",
41
+ "@bamboocss/ts-ast": "1.52.0",
42
+ "@bamboocss/types": "1.52.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@typescript/api": "npm:typescript@7.1.0-dev.20260826.1",
46
46
  "ts-morph": "28.0.0",
47
- "@bamboocss/generator": "1.51.6",
48
- "@bamboocss/plugin-svelte": "1.51.6",
49
- "@bamboocss/plugin-vue": "1.51.6"
47
+ "@bamboocss/generator": "1.52.0",
48
+ "@bamboocss/plugin-svelte": "1.52.0",
49
+ "@bamboocss/plugin-vue": "1.52.0"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsdown src/index.ts --format=esm,cjs --dts",