@adamhl8/configs 0.17.1 → 0.17.3

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.
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "overrides": [
41
41
  {
42
- "includes": ["**/*.tsx", "./knip.ts", "./prettier.config.js", "tsdown.config.ts"],
42
+ "includes": ["**/*.tsx", "./knip.ts", "./prettier.config.js", "tsdown.config.ts", "astro.config.ts"],
43
43
  "linter": {
44
44
  "rules": {
45
45
  "style": {
@@ -34,6 +34,11 @@ declare const knipConfig: OptionalMergeConfigFn<{
34
34
  entry?: string | string[] | undefined;
35
35
  project?: string | string[] | undefined;
36
36
  } | undefined;
37
+ bumpp?: string | boolean | string[] | {
38
+ config?: string | string[] | undefined;
39
+ entry?: string | string[] | undefined;
40
+ project?: string | string[] | undefined;
41
+ } | undefined;
37
42
  bun?: string | boolean | string[] | {
38
43
  config?: string | string[] | undefined;
39
44
  entry?: string | string[] | undefined;
@@ -394,6 +399,11 @@ declare const knipConfig: OptionalMergeConfigFn<{
394
399
  entry?: string | string[] | undefined;
395
400
  project?: string | string[] | undefined;
396
401
  } | undefined;
402
+ rstest?: string | boolean | string[] | {
403
+ config?: string | string[] | undefined;
404
+ entry?: string | string[] | undefined;
405
+ project?: string | string[] | undefined;
406
+ } | undefined;
397
407
  'semantic-release'?: string | boolean | string[] | {
398
408
  config?: string | string[] | undefined;
399
409
  entry?: string | string[] | undefined;
@@ -615,6 +625,11 @@ declare const knipConfig: OptionalMergeConfigFn<{
615
625
  entry?: string | string[] | undefined;
616
626
  project?: string | string[] | undefined;
617
627
  } | undefined;
628
+ bumpp?: string | boolean | string[] | {
629
+ config?: string | string[] | undefined;
630
+ entry?: string | string[] | undefined;
631
+ project?: string | string[] | undefined;
632
+ } | undefined;
618
633
  bun?: string | boolean | string[] | {
619
634
  config?: string | string[] | undefined;
620
635
  entry?: string | string[] | undefined;
@@ -975,6 +990,11 @@ declare const knipConfig: OptionalMergeConfigFn<{
975
990
  entry?: string | string[] | undefined;
976
991
  project?: string | string[] | undefined;
977
992
  } | undefined;
993
+ rstest?: string | boolean | string[] | {
994
+ config?: string | string[] | undefined;
995
+ entry?: string | string[] | undefined;
996
+ project?: string | string[] | undefined;
997
+ } | undefined;
978
998
  "semantic-release"?: string | boolean | string[] | {
979
999
  config?: string | string[] | undefined;
980
1000
  entry?: string | string[] | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"knip.d.ts","names":[],"sources":["../../src/configs/knip.ts"],"sourcesContent":[],"mappings":";;;cAca;;;IAAA,KAAA,CAAA,EAAA,MAA2E,GAAA,MAAA,EAAA,GAAA,SAAA;IAAA,OAAA,CAAA,EAAA,MAAA,GAAA,MAAA,EAAA,GAAA,SAAA;;;;;;;;;;IAC6muP,MAAA,CAAA,EAAA,MAAA,GAAA,MAAA,EAAA,GAAA,SAAA;;;MAAoP,SAAA;;IAA0rzB,MAAA,CAAA,EAAA,MAAA,GAAA,MAAA,EAAA,GAAA,SAAA;IAA+G,KAAA,CAAA,EAAA,MAAA,GAAA,MAAA,EAAA,GAAA,SAAA;IAA8D,OAAA,CAAA,EAAA,MAAA,GAAA,MAAA,EAAA,GAAA,SAAA;MAAyD,SAAA;OAA4D,CAAA,EAAA,MAAA,GAAA,OAAA,GAAA,MAAA,EAAA,GAAA;;;IAD93iR,OAAA,CAAA,EAAA,MAAA,GAAA,MAAA,EAAA,GAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAio0B;;+BAA+G;mCAA8D;8BAAyD;iCAA4D"}
@@ -8,7 +8,6 @@ import * as hookable0 from "hookable";
8
8
  //#region src/configs/tsdown.d.ts
9
9
  declare const tsdownConfig: MergeConfigFn<{
10
10
  entry?: rolldown0.InputOption;
11
- exports?: boolean | tsdown0.ExportsOptions;
12
11
  external?: rolldown0.ExternalOption;
13
12
  noExternal?: (string | RegExp | (string | RegExp)[]) | ((id: string, importer: string | undefined) => boolean | null | undefined | void);
14
13
  skipNodeModulesBundle?: boolean;
@@ -59,6 +58,7 @@ declare const tsdownConfig: MergeConfigFn<{
59
58
  attw?: boolean | tsdown0.AttwOptions;
60
59
  report?: boolean | tsdown0.ReportOptions;
61
60
  globImport?: boolean;
61
+ exports?: boolean | tsdown0.ExportsOptions;
62
62
  publicDir?: tsdown0.CopyOptions | tsdown0.CopyOptionsFn;
63
63
  copy?: tsdown0.CopyOptions | tsdown0.CopyOptionsFn;
64
64
  hooks?: Partial<tsdown0.TsdownHooks> | ((hooks: hookable0.Hookable<tsdown0.TsdownHooks>) => void | Promise<void>);
@@ -1 +1 @@
1
- {"version":3,"file":"tsdown.d.ts","names":[],"sources":["../../src/configs/tsdown.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAyCa;UAAyF,SAAA,CAAA;;;;;;;EAAzF,MAAA,CAAA,EAAA,MAAyF,GAAA,MAAA,EAAA,GAAA,KAAA;EAAA,GAAA,CAAA,QAAA,CAAA,MAAA,EAAA,GAAA,CAAA;QAAA,CAAA,QAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA7E,SAAA,MAAA,EAAA,KAAA;EACZ,SAAA,QAAA,EAAwF,SAAA;EAAA,SAAA,MAAA,EAAA,UAAA;WAAA,SAAzE,EAAA,IAAA;WAAA,IAAA,EAAA,KAAA;WAAA,GAAA,EAAA;IAAA,SAAA,UAAA,EAAA,IAAA;;;;;;;;;;cAAf,iBAAe,sBAAA,KAAyE,OAAA,CAAzE,OAAA"}
1
+ {"version":3,"file":"tsdown.d.ts","names":[],"sources":["../../src/configs/tsdown.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAyCa;UAAyF,SAAA,CAAA;;;;;;;EAAzF,GAAA,CAAA,QAAA,CAAA,MAAyF,EAAA,GAAA,CAAA;EAAA,MAAA,CAAA,QAAA,CAAA,MAAA,EAAA,MAAA,CAAA;OAAA,CAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA7E,SAAA,MAAA,EAAA,KAAA;EACZ,SAAA,QAAA,EAAwF,SAAA;EAAA,SAAA,MAAA,EAAA,UAAA;WAAA,SAAzE,EAAA,IAAA;WAAA,IAAA,EAAA,KAAA;WAAA,GAAA,EAAA;IAAA,SAAA,UAAA,EAAA,IAAA;;;;;;;;;;cAAf,iBAAe,sBAAA,KAAyE,OAAA,CAAzE,OAAA"}
@@ -61,8 +61,11 @@ function getPathsMap() {
61
61
  }
62
62
  function resolveImportPath(importPath, filePath, pathsMap) {
63
63
  const fileDir = path.dirname(filePath);
64
- for (const [alias, aliasDir] of Object.entries(pathsMap)) {
64
+ const sortedAliases = Object.keys(pathsMap).sort((a, b) => b.length - a.length);
65
+ for (const alias of sortedAliases) {
65
66
  if (!importPath.startsWith(alias)) continue;
67
+ const aliasDir = pathsMap[alias];
68
+ if (!aliasDir) continue;
66
69
  const relativePath = importPath.slice(alias.length + 1);
67
70
  return path.resolve(aliasDir, relativePath);
68
71
  }
@@ -75,6 +78,11 @@ function changeExtension(importParts, newExtension) {
75
78
  base: ""
76
79
  };
77
80
  }
81
+ const ALLOWED_EXTENSIONS = [
82
+ ".ts",
83
+ ".tsx",
84
+ ".d.ts"
85
+ ];
78
86
  function getNewExtensionPathParts(importParts) {
79
87
  const tsExtensionLookups = [
80
88
  "",
@@ -83,16 +91,11 @@ function getNewExtensionPathParts(importParts) {
83
91
  ".ts",
84
92
  ".tsx"
85
93
  ];
86
- const allowedExtensions = [
87
- ".ts",
88
- ".tsx",
89
- ".d.ts"
90
- ];
91
94
  if (!tsExtensionLookups.includes(importParts.ext)) return {
92
95
  ext: importParts.ext,
93
96
  base: importParts.base
94
97
  };
95
- if (tsExtensionLookups.includes(importParts.ext)) for (const allowedExtension of allowedExtensions) {
98
+ if (tsExtensionLookups.includes(importParts.ext)) for (const allowedExtension of ALLOWED_EXTENSIONS) {
96
99
  const targetPathParts = changeExtension(importParts, allowedExtension);
97
100
  const targetPath = path.format(targetPathParts);
98
101
  if (fss.existsSync(targetPath)) return {
@@ -132,7 +135,10 @@ async function fixImports(filePaths, { write, importIgnoreStrings, skipAlias })
132
135
  ...newImportParts,
133
136
  ...transformExtensionResult
134
137
  };
135
- else importErrorsForFile.push(`skipped extension transform of '${importPath}': target file not found`);
138
+ else {
139
+ const targetFilePath = `${path.format(changeExtension(resolvedImportParts, ""))}.{${ALLOWED_EXTENSIONS.map((ext) => ext.replace(".", "")).join()}}`;
140
+ importErrorsForFile.push(`skipped extension transform of '${importPath}': target file not found (looking for '${targetFilePath}')`);
141
+ }
136
142
  if (isRelativeImport && !skipAlias) {
137
143
  const transformToAliasImportResult = getAliasPathParts(resolvedImportParts, pathsMap);
138
144
  if (transformToAliasImportResult) newImportParts = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamhl8/configs",
3
- "version": "0.17.1",
3
+ "version": "0.17.3",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,8 +39,8 @@
39
39
  "typescript": "^5.0.0"
40
40
  },
41
41
  "dependencies": {
42
- "@optique/core": "^0.5.0-dev.83",
43
- "@optique/run": "^0.5.0-dev.83",
42
+ "@optique/core": "^0.5.0",
43
+ "@optique/run": "^0.5.0",
44
44
  "@prettier/plugin-xml": "^3.4.2",
45
45
  "es-toolkit": "^1.39.10",
46
46
  "get-tsconfig": "^4.10.1",
@@ -58,7 +58,7 @@
58
58
  "@arethetypeswrong/core": "^0.18.2",
59
59
  "@biomejs/biome": "^2.2.4",
60
60
  "@types/bun": "^1.2.22",
61
- "knip": "^5.63.1",
61
+ "knip": "^5.64.0",
62
62
  "markdown-toc": "^1.2.0",
63
63
  "prettier": "^3.6.2",
64
64
  "publint": "^0.3.13",