knip 2.38.5 → 2.39.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/ConfigurationChief.js +2 -1
- package/dist/constants.js +1 -0
- package/dist/plugins/astro/index.js +6 -2
- package/dist/plugins/remark/index.js +9 -1
- package/dist/plugins/remark/types.d.ts +3 -0
- package/dist/plugins/remark/types.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -255,9 +255,10 @@ export class ConfigurationChief {
|
|
|
255
255
|
.sort(byPathDepth)
|
|
256
256
|
.map((name) => {
|
|
257
257
|
const dir = join(this.cwd, name);
|
|
258
|
+
const pkgName = this.availableWorkspaceManifests.find(p => p.dir === dir)?.manifest.name ?? `NOT_FOUND_${name}`;
|
|
258
259
|
return {
|
|
259
260
|
name,
|
|
260
|
-
pkgName
|
|
261
|
+
pkgName,
|
|
261
262
|
dir,
|
|
262
263
|
config: this.getConfigForWorkspace(name),
|
|
263
264
|
ancestors: this.availableWorkspaceNames.reduce(getAncestors(name), []),
|
package/dist/constants.js
CHANGED
|
@@ -6,8 +6,12 @@ export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABL
|
|
|
6
6
|
export const ENTRY_FILE_PATTERNS = ['astro.config.{js,cjs,mjs,ts}', 'src/content/config.ts'];
|
|
7
7
|
export const PRODUCTION_ENTRY_FILE_PATTERNS = ['src/pages/**/*.{astro,mdx,js,ts}', 'src/content/**/*.mdx'];
|
|
8
8
|
export const findDependencies = async (configFilePath, options) => {
|
|
9
|
-
const { config } = options;
|
|
10
|
-
|
|
9
|
+
const { config, manifest } = options;
|
|
10
|
+
const dependencies = config.entry
|
|
11
11
|
? config.entry.map(toProductionEntryPattern)
|
|
12
12
|
: [...ENTRY_FILE_PATTERNS.map(toEntryPattern), ...PRODUCTION_ENTRY_FILE_PATTERNS.map(toProductionEntryPattern)];
|
|
13
|
+
if (manifest.scripts && Object.values(manifest.scripts).some(script => /astro (--.+ )?check/.test(script))) {
|
|
14
|
+
dependencies.push('@astrojs/check');
|
|
15
|
+
}
|
|
16
|
+
return dependencies;
|
|
13
17
|
};
|
|
@@ -20,7 +20,15 @@ const findRemarkDependencies = async (configFilePath, options) => {
|
|
|
20
20
|
: await load(configFilePath);
|
|
21
21
|
if (!localConfig)
|
|
22
22
|
return [];
|
|
23
|
-
const plugins = localConfig.plugins
|
|
23
|
+
const plugins = localConfig.plugins
|
|
24
|
+
?.flatMap(plugin => {
|
|
25
|
+
if (typeof plugin === 'string')
|
|
26
|
+
return plugin;
|
|
27
|
+
if (Array.isArray(plugin) && typeof plugin[0] === 'string')
|
|
28
|
+
return plugin[0];
|
|
29
|
+
return [];
|
|
30
|
+
})
|
|
31
|
+
.map(plugin => (plugin.startsWith('remark-') ? plugin : `remark-${plugin}`)) ?? [];
|
|
24
32
|
return plugins;
|
|
25
33
|
};
|
|
26
34
|
export const findDependencies = timerify(findRemarkDependencies);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.
|
|
1
|
+
export declare const version = "2.39.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.
|
|
1
|
+
export const version = '2.39.0';
|
package/package.json
CHANGED