@adamhl8/configs 0.14.2 → 0.14.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.
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ declare const knipConfig: <T extends KnipConfig>(config: T) => {
|
|
|
7
7
|
readonly entry: ["./src/index.ts", "**/*.test.ts"];
|
|
8
8
|
readonly project: ["**"];
|
|
9
9
|
readonly tsdown: false;
|
|
10
|
-
readonly treatConfigHintsAsErrors: true;
|
|
11
10
|
} & T;
|
|
12
11
|
//#endregion
|
|
13
12
|
//#region src/prettier.d.ts
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/knip.ts","../src/prettier.ts","../src/tsdown.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/knip.ts","../src/prettier.ts","../src/tsdown.ts"],"sourcesContent":[],"mappings":";;;;;cAgBa,uBAAwB,oBAAoB;;;;AAAzD,CAAA,IAAa;;;cCkBA,2BAA4B,gBAAgB;;;;EDlB5C,SAAA,kBAA6F,EAAA,kBAAA;EAAA,SAAA,SAAA,EAAA,CAAA;IAArE,SAAA,KAAA,EAAA,SAAA;IAAoB,SAAA,OAAA,EAAA;;IAAiD,CAAA;;;;MCkB7F,SAA6F,MAAA,EAAA,OAAA;IAAA,CAAA;;;;;cCR7F,yBAA0B,oBAAoB;;;;EFV9C,SAAA,QAA6F,EAAA,SAAA;EAAA,SAAA,MAAA,EAAA,UAAA;WAArE,SAAA,EAAA,IAAA;WAAoB,GAAA,EAAA;;IAAiD,SAAA,SAAA,EAAA,IAAA;;;;ICkB7F,SAAA,OAA6F,EAAA,SAAA;EAAA,CAAA;WAAjE,OAAA,EAAA,IAAA;WAAgB,QAAA,EAAA,MAAA;;CAAiD,IAAA"}
|
package/dist/index.js
CHANGED
|
@@ -23,8 +23,7 @@ const concatArrays = (objValue, srcValue) => Array.isArray(objValue) ? objValue.
|
|
|
23
23
|
const baseConfig$2 = {
|
|
24
24
|
entry: ["./src/index.ts", "**/*.test.ts"],
|
|
25
25
|
project: ["**"],
|
|
26
|
-
tsdown: false
|
|
27
|
-
treatConfigHintsAsErrors: true
|
|
26
|
+
tsdown: false
|
|
28
27
|
};
|
|
29
28
|
const knipConfig = (config) => mergeWith(baseConfig$2, config, concatArrays);
|
|
30
29
|
const baseConfig$1 = {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["baseConfig","baseConfig"],"sources":["../node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs","../node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs","../node_modules/es-toolkit/dist/object/mergeWith.mjs","../src/utils.ts","../src/knip.ts","../src/prettier.ts","../src/tsdown.ts"],"sourcesContent":["function isUnsafeProperty(key) {\n return key === '__proto__';\n}\n\nexport { isUnsafeProperty };\n","function isObjectLike(value) {\n return typeof value === 'object' && value !== null;\n}\n\nexport { isObjectLike };\n","import { isUnsafeProperty } from '../_internal/isUnsafeProperty.mjs';\nimport { isObjectLike } from '../compat/predicate/isObjectLike.mjs';\n\nfunction mergeWith(target, source, merge) {\n const sourceKeys = Object.keys(source);\n for (let i = 0; i < sourceKeys.length; i++) {\n const key = sourceKeys[i];\n if (isUnsafeProperty(key)) {\n continue;\n }\n const sourceValue = source[key];\n const targetValue = target[key];\n const merged = merge(targetValue, sourceValue, key, target, source);\n if (merged !== undefined) {\n target[key] = merged;\n }\n else if (Array.isArray(sourceValue)) {\n target[key] = mergeWith(targetValue ?? [], sourceValue, merge);\n }\n else if (isObjectLike(targetValue) && isObjectLike(sourceValue)) {\n target[key] = mergeWith(targetValue ?? {}, sourceValue, merge);\n }\n else if (targetValue === undefined || sourceValue !== undefined) {\n target[key] = sourceValue;\n }\n }\n return target;\n}\n\nexport { mergeWith };\n","/**\n * A custom merge function for es-toolkit's `mergeWith` that concatenates arrays.\n */\nexport const concatArrays = (objValue: unknown, srcValue: unknown) =>\n Array.isArray(objValue) ? objValue.concat(srcValue) : undefined\n","import { mergeWith } from \"es-toolkit\"\nimport type { KnipConfig } from \"knip\"\n\n// biome-ignore lint/plugin: ignore\nimport { concatArrays } from \"./utils.ts\"\n\n// Normally, specifying the `./src/index.ts` entry would cause knip to complain about a redundant entry because it gets automatically included via the tsdown plugin.\n// However, in projects that _don't_ use tsdown, the `./src/index.ts` entry would be missing entirely.\n// To handle this, we specify it and disable the tsdown plugin. This makes knip work in both cases.\n\nconst baseConfig = {\n entry: [\"./src/index.ts\", \"**/*.test.ts\"],\n project: [\"**\"],\n tsdown: false,\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["baseConfig","baseConfig"],"sources":["../node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs","../node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs","../node_modules/es-toolkit/dist/object/mergeWith.mjs","../src/utils.ts","../src/knip.ts","../src/prettier.ts","../src/tsdown.ts"],"sourcesContent":["function isUnsafeProperty(key) {\n return key === '__proto__';\n}\n\nexport { isUnsafeProperty };\n","function isObjectLike(value) {\n return typeof value === 'object' && value !== null;\n}\n\nexport { isObjectLike };\n","import { isUnsafeProperty } from '../_internal/isUnsafeProperty.mjs';\nimport { isObjectLike } from '../compat/predicate/isObjectLike.mjs';\n\nfunction mergeWith(target, source, merge) {\n const sourceKeys = Object.keys(source);\n for (let i = 0; i < sourceKeys.length; i++) {\n const key = sourceKeys[i];\n if (isUnsafeProperty(key)) {\n continue;\n }\n const sourceValue = source[key];\n const targetValue = target[key];\n const merged = merge(targetValue, sourceValue, key, target, source);\n if (merged !== undefined) {\n target[key] = merged;\n }\n else if (Array.isArray(sourceValue)) {\n target[key] = mergeWith(targetValue ?? [], sourceValue, merge);\n }\n else if (isObjectLike(targetValue) && isObjectLike(sourceValue)) {\n target[key] = mergeWith(targetValue ?? {}, sourceValue, merge);\n }\n else if (targetValue === undefined || sourceValue !== undefined) {\n target[key] = sourceValue;\n }\n }\n return target;\n}\n\nexport { mergeWith };\n","/**\n * A custom merge function for es-toolkit's `mergeWith` that concatenates arrays.\n */\nexport const concatArrays = (objValue: unknown, srcValue: unknown) =>\n Array.isArray(objValue) ? objValue.concat(srcValue) : undefined\n","import { mergeWith } from \"es-toolkit\"\nimport type { KnipConfig } from \"knip\"\n\n// biome-ignore lint/plugin: ignore\nimport { concatArrays } from \"./utils.ts\"\n\n// Normally, specifying the `./src/index.ts` entry would cause knip to complain about a redundant entry because it gets automatically included via the tsdown plugin.\n// However, in projects that _don't_ use tsdown, the `./src/index.ts` entry would be missing entirely.\n// To handle this, we specify it and disable the tsdown plugin. This makes knip work in both cases.\n\nconst baseConfig = {\n entry: [\"./src/index.ts\", \"**/*.test.ts\"],\n project: [\"**\"],\n tsdown: false,\n} as const satisfies KnipConfig\n\nexport const knipConfig = <T extends KnipConfig>(config: T) => mergeWith(baseConfig, config, concatArrays)\n","import { mergeWith } from \"es-toolkit\"\nimport type { Config } from \"prettier\"\n\n// biome-ignore lint/plugin: ignore\nimport { concatArrays } from \"./utils.ts\"\n\nconst baseConfig = {\n printWidth: 120,\n semi: false,\n plugins: [\n \"@prettier/plugin-xml\",\n \"prettier-plugin-sh\",\n \"prettier-plugin-toml\",\n \"prettier-plugin-astro\",\n \"prettier-plugin-tailwindcss\",\n ],\n tailwindStylesheet: \"./src/global.css\",\n overrides: [\n {\n // https://github.com/prettier/prettier/issues/15956\n files: \"*.jsonc\",\n options: {\n trailingComma: \"none\",\n },\n },\n {\n files: \"*.astro\",\n options: {\n parser: \"astro\",\n },\n },\n ],\n} as const satisfies Config\n\nexport const prettierConfig = <T extends Config>(config: T) => mergeWith(baseConfig, config, concatArrays)\n","import { mergeWith } from \"es-toolkit\"\nimport type { UserConfig } from \"tsdown\"\n\n// biome-ignore lint/plugin: ignore\nimport { concatArrays } from \"./utils.ts\"\n\nconst baseConfig = {\n entry: [\"./src/index.ts\"],\n unbundle: true,\n target: false,\n platform: \"neutral\",\n minify: \"dce-only\",\n sourcemap: true,\n dts: {\n newContext: true,\n sourcemap: true,\n },\n attw: {\n level: \"error\",\n profile: \"esmOnly\",\n },\n publint: true,\n logLevel: \"warn\",\n failOnWarn: true,\n} as const satisfies UserConfig\n\nexport const tsdownConfig = <T extends UserConfig>(config: T) => mergeWith(baseConfig, config, concatArrays)\n"],"x_google_ignoreList":[0,1,2],"mappings":"AAAA,SAAS,iBAAiB,KAAK;AAC3B,QAAO,QAAQ;;ACDnB,SAAS,aAAa,OAAO;AACzB,QAAO,OAAO,UAAU,YAAY,UAAU;;ACElD,SAAS,UAAU,QAAQ,QAAQ,OAAO;CACtC,MAAM,aAAa,OAAO,KAAK,OAAO;AACtC,MAAK,IAAI,IAAI,GAAG,IAAI,WAAW,QAAQ,KAAK;EACxC,MAAM,MAAM,WAAW;AACvB,MAAI,iBAAiB,IAAI,CACrB;EAEJ,MAAM,cAAc,OAAO;EAC3B,MAAM,cAAc,OAAO;EAC3B,MAAM,SAAS,MAAM,aAAa,aAAa,KAAK,QAAQ,OAAO;AACnE,MAAI,WAAW,KAAA,EACX,QAAO,OAAO;WAET,MAAM,QAAQ,YAAY,CAC/B,QAAO,OAAO,UAAU,eAAe,EAAE,EAAE,aAAa,MAAM;WAEzD,aAAa,YAAY,IAAI,aAAa,YAAY,CAC3D,QAAO,OAAO,UAAU,eAAe,EAAE,EAAE,aAAa,MAAM;WAEzD,gBAAgB,KAAA,KAAa,gBAAgB,KAAA,EAClD,QAAO,OAAO;;AAGtB,QAAO;;ACvBX,MAAa,gBAAgB,UAAmB,aAC9C,MAAM,QAAQ,SAAS,GAAG,SAAS,OAAO,SAAS,GAAG,KAAA;ACMxD,MAAMC,eAAa;CACjB,OAAO,CAAC,kBAAkB,eAAe;CACzC,SAAS,CAAC,KAAK;CACf,QAAQ;CACT;AAED,MAAa,cAAoC,WAAc,UAAUA,cAAY,QAAQ,aAAa;ACV1G,MAAMA,eAAa;CACjB,YAAY;CACZ,MAAM;CACN,SAAS;EACP;EACA;EACA;EACA;EACA;EACD;CACD,oBAAoB;CACpB,WAAW,CACT;EAEE,OAAO;EACP,SAAS,EACP,eAAe,QAChB;EACF,EACD;EACE,OAAO;EACP,SAAS,EACP,QAAQ,SACT;EACF,CACF;CACF;AAED,MAAa,kBAAoC,WAAc,UAAUA,cAAY,QAAQ,aAAa;AC5B1G,MAAM,aAAa;CACjB,OAAO,CAAC,iBAAiB;CACzB,UAAU;CACV,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,WAAW;CACX,KAAK;EACH,YAAY;EACZ,WAAW;EACZ;CACD,MAAM;EACJ,OAAO;EACP,SAAS;EACV;CACD,SAAS;CACT,UAAU;CACV,YAAY;CACb;AAED,MAAa,gBAAsC,WAAc,UAAU,YAAY,QAAQ,aAAa"}
|