dependency-owners 2.0.0 → 3.0.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/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { buildApplication, buildCommand, run, } from '@stricli/core';
3
3
  import { createRequire } from 'node:module';
4
- import path from 'node:path';
4
+ import * as path from 'node:path';
5
5
  import { dependencyOwners } from "./index.js";
6
6
  import { getErrorMessage } from "./utils/message.js";
7
7
  import { getUnownedDependencies } from "./utils/owners.js";
@@ -56,7 +56,6 @@ const command = buildCommand({
56
56
  kind: 'parsed',
57
57
  parse: String,
58
58
  brief: 'Loader to use for loading dependencies.',
59
- optional: true,
60
59
  },
61
60
  },
62
61
  positional: {
@@ -65,7 +64,6 @@ const command = buildCommand({
65
64
  {
66
65
  brief: 'Path to the dependency file.',
67
66
  placeholder: 'dependency-file',
68
- default: 'package.json',
69
67
  parse: cwdParser,
70
68
  },
71
69
  ],
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export interface DependencyOwnersOptions {
6
6
  /**
7
7
  * Path to the dependency file.
8
8
  */
9
- dependencyFile?: string;
9
+ dependencyFile: string;
10
10
  /**
11
11
  * Path to the configuration file.
12
12
  */
@@ -18,11 +18,11 @@ export interface DependencyOwnersOptions {
18
18
  /**
19
19
  * Loader to use for loading dependencies.
20
20
  */
21
- loader?: string | DependencyLoader;
21
+ loader: string | DependencyLoader;
22
22
  }
23
23
  /**
24
24
  * Get the owners of the specified dependencies.
25
25
  * @param {Options} options - The options for the dependency owners lookup.
26
26
  * @returns {Promise<Record<string, string[]>>} A mapping of dependency owners for the specified dependencies.
27
27
  */
28
- export declare function dependencyOwners(options?: DependencyOwnersOptions): Promise<Record<string, string[]>>;
28
+ export declare function dependencyOwners(options: DependencyOwnersOptions): Promise<Record<string, string[]>>;
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
- import * as PackageJsonLoader from '@dependency-owners/package-json-loader';
2
- import path from 'node:path';
1
+ import * as path from 'node:path';
3
2
  import { getOwners, getOwnersMapping } from "./utils/owners.js";
4
3
  import { resolveDependencyLoader, } from "./utils/loader.js";
5
4
  /**
@@ -8,7 +7,7 @@ import { resolveDependencyLoader, } from "./utils/loader.js";
8
7
  * @returns {Promise<Record<string, string[]>>} A mapping of dependency owners for the specified dependencies.
9
8
  */
10
9
  export async function dependencyOwners(options) {
11
- const { dependencies = [], loader = PackageJsonLoader, dependencyFile = path.join(process.cwd(), 'package.json'), configFile = path.join(process.cwd(), 'dependency-owners.json'), } = options || {};
10
+ const { dependencies = [], loader, dependencyFile, configFile = path.join(process.cwd(), 'dependency-owners.json'), } = options;
12
11
  const resolvedLoader = await resolveDependencyLoader(loader, dependencyFile);
13
12
  if (!resolvedLoader) {
14
13
  throw new Error(`No loader found for file: ${dependencyFile}`);
package/dist/loader.d.ts CHANGED
@@ -1 +1 @@
1
- export type { Dependency, DependencyLoader } from './utils/loader.ts';
1
+ export { resolveDependencyLoader, type Dependency, type DependencyLoader, } from './utils/loader.ts';
package/dist/loader.js CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export { resolveDependencyLoader, } from "./utils/loader.js";
@@ -6,7 +6,7 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
6
6
  }
7
7
  return path;
8
8
  };
9
- import path from 'node:path';
9
+ import * as path from 'node:path';
10
10
  /**
11
11
  * Import a dependency loader by name.
12
12
  * @param {string} loaderName The name of the loader to import.
@@ -1,4 +1,4 @@
1
- import fs from 'node:fs';
1
+ import * as fs from 'node:fs';
2
2
  /**
3
3
  * Get the mapping of dependency owners from a JSON file.
4
4
  * @param {string} filePath - The path to the dependency owners file.
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "dependency-owners",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "Determine ownership of dependencies in a project",
5
5
  "author": "Kirk Eaton <contact@kirkeaton.ca>",
6
6
  "bin": "./dist/cli.js",
7
7
  "dependencies": {
8
- "@dependency-owners/package-json-loader": "2.0.0",
9
8
  "@stricli/core": "1.2.0"
10
9
  },
11
10
  "devDependencies": {
11
+ "@dependency-owners/package-json-loader": "2.0.0",
12
12
  "@kirkeaton/prettier-config": "1.0.5",
13
13
  "@kirkeaton/semantic-release-config": "1.1.0",
14
14
  "@kirkeaton/tsconfig": "2.1.0",
@@ -45,7 +45,7 @@
45
45
  "owners"
46
46
  ],
47
47
  "license": "BSD-3-Clause",
48
- "packageManager": "pnpm@10.14.0",
48
+ "packageManager": "pnpm@10.15.0",
49
49
  "repository": {
50
50
  "type": "git",
51
51
  "url": "git+https://github.com/dependency-owners/dependency-owners.git"