knip 2.25.1 → 2.25.2

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.
@@ -51,6 +51,6 @@ export class PrincipalFactory {
51
51
  return principal;
52
52
  }
53
53
  getPrincipals() {
54
- return Array.from(this.principals).map(p => p.principal);
54
+ return Array.from(this.principals, p => p.principal);
55
55
  }
56
56
  }
package/dist/index.js CHANGED
@@ -109,7 +109,7 @@ export const main = async (unresolvedConfiguration) => {
109
109
  await worker.init();
110
110
  const sharedGlobOptions = { cwd, workingDir: dir, gitignore, ignore: worker.getIgnorePatterns() };
111
111
  const entryPathsFromManifest = await getEntryPathFromManifest(cwd, dir, manifest);
112
- debugLogArray(`Found entry paths from manifest (${name})`, entryPathsFromManifest);
112
+ debugLogArray(`Found entry paths in package.json (${name})`, entryPathsFromManifest);
113
113
  principal.addEntryPaths(entryPathsFromManifest);
114
114
  if (isProduction) {
115
115
  {
@@ -13,7 +13,7 @@ export default ({ report, issues, isShowProgress }) => {
13
13
  const issuesForType = isSet
14
14
  ? Array.from(issues[reportType])
15
15
  : reportType === 'duplicates'
16
- ? Object.values(issues[reportType]).map(Object.values).flat()
16
+ ? Object.values(issues[reportType]).flatMap(Object.values)
17
17
  : Object.values(issues[reportType]).map(issues => {
18
18
  const items = Object.values(issues);
19
19
  return { ...items[0], symbols: items.map(issue => issue.symbol) };
@@ -13,7 +13,7 @@ export default async ({ report, issues, options }) => {
13
13
  const json = {};
14
14
  const codeownersFilePath = resolve(opts.codeowners ?? '.github/CODEOWNERS');
15
15
  const codeownersEngine = isFile(codeownersFilePath) && OwnershipEngine.FromCodeownersFile(codeownersFilePath);
16
- const flatten = (issues) => Object.values(issues).map(Object.values).flat();
16
+ const flatten = (issues) => Object.values(issues).flatMap(Object.values);
17
17
  const initRow = (filePath) => {
18
18
  const file = relative(filePath);
19
19
  const row = {
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "2.25.1";
1
+ export declare const version = "2.25.2";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '2.25.1';
1
+ export const version = '2.25.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "2.25.1",
3
+ "version": "2.25.2",
4
4
  "description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
5
5
  "homepage": "https://github.com/webpro/knip",
6
6
  "repository": "github:webpro/knip",