20
20
*/
21
21
22
22
/**
23
- * @typedef {Object } Node
23
+ * @typedef {object } Node
24
24
* @property {string } label
25
25
* @property {string } name
26
26
* @property {Array<string> } path
@@ -84,7 +84,7 @@ const basename = location => {
84
84
/**
85
85
* @param {ReadFn } read
86
86
* @param {string } packageLocation
87
- * @returns {Promise<Object > }
87
+ * @returns {Promise<object > }
88
88
*/
89
89
const readDescriptor = async ( read , packageLocation ) => {
90
90
const descriptorLocation = resolveLocation ( 'package.json' , packageLocation ) ;
@@ -100,10 +100,10 @@ const readDescriptor = async (read, packageLocation) => {
100
100
} ;
101
101
102
102
/**
103
- * @param {Record<string, Object > } memo
103
+ * @param {Record<string, object > } memo
104
104
* @param {ReadFn } read
105
105
* @param {string } packageLocation
106
- * @returns {Promise<Object > }
106
+ * @returns {Promise<object > }
107
107
*/
108
108
const readDescriptorWithMemo = async ( memo , read , packageLocation ) => {
109
109
let promise = memo [ packageLocation ] ;
@@ -118,7 +118,7 @@ const readDescriptorWithMemo = async (memo, read, packageLocation) => {
118
118
/**
119
119
* @callback ReadDescriptorFn
120
120
* @param {string } packageLocation
121
- * @returns {Promise<Object > }
121
+ * @returns {Promise<object > }
122
122
*/
123
123
124
124
/**
@@ -135,7 +135,7 @@ const readDescriptorWithMemo = async (memo, read, packageLocation) => {
135
135
* @param {string } name
136
136
* @returns {Promise<{
137
137
* packageLocation: string,
138
- * packageDescriptor: Object ,
138
+ * packageDescriptor: object ,
139
139
* } | undefined>}
140
140
*/
141
141
const findPackage = async ( readDescriptor , canonical , directory , name ) => {
@@ -180,7 +180,7 @@ const commonParsers = { js: 'cjs', ...uncontroversialParsers };
180
180
const moduleParsers = { js : 'mjs' , ...uncontroversialParsers } ;
181
181
182
182
/**
183
- * @param {Object } descriptor
183
+ * @param {object } descriptor
184
184
* @param {string } location
185
185
* @returns {Record<string, string> }
186
186
*/
@@ -233,9 +233,9 @@ const inferParsers = (descriptor, location) => {
233
233
* @param {ReadDescriptorFn } readDescriptor
234
234
* @param {CanonicalFn } canonical
235
235
* @param {Graph } graph
236
- * @param {Object } packageDetails
236
+ * @param {object } packageDetails
237
237
* @param {string } packageDetails.packageLocation
238
- * @param {Object } packageDetails.packageDescriptor
238
+ * @param {object } packageDetails.packageDescriptor
239
239
* @param {Set<string> } tags
240
240
* @param {boolean } dev
241
241
* @param {CommonDependencyDescriptors } commonDependencyDescriptors
@@ -419,7 +419,7 @@ const graphPackage = async (
419
419
* @param {Map<string, Array<string>> } preferredPackageLogicalPathMap
420
420
* @param {Array<string> } childLogicalPath
421
421
* @param {boolean } optional - whether the dependency is optional
422
- * @param {Object } [commonDependencyDescriptors] - dependencies to be added to all packages
422
+ * @param {object } [commonDependencyDescriptors] - dependencies to be added to all packages
423
423
*/
424
424
const gatherDependency = async (
425
425
readDescriptor ,
@@ -484,7 +484,7 @@ const gatherDependency = async (
484
484
* @param {CanonicalFn } canonical
485
485
* @param {string } packageLocation - location of the main package.
486
486
* @param {Set<string> } tags
487
- * @param {Object } mainPackageDescriptor - the parsed contents of the main
487
+ * @param {object } mainPackageDescriptor - the parsed contents of the main
488
488
* package.json, which was already read when searching for the package.json.
489
489
* @param {boolean } dev - whether to use devDependencies from this package (and
490
490
* only this package).
@@ -502,7 +502,7 @@ const graphPackages = async (
502
502
const memo = create ( null ) ;
503
503
/**
504
504
* @param {string } packageLocation
505
- * @returns {Promise<Object > }
505
+ * @returns {Promise<object > }
506
506
*/
507
507
const readDescriptor = packageLocation =>
508
508
readDescriptorWithMemo ( memo , read , packageLocation ) ;
@@ -701,12 +701,12 @@ const translateGraph = (
701
701
* @param {ReadFn | ReadPowers } readPowers
702
702
* @param {string } packageLocation
703
703
* @param {Set<string> } tags
704
- * @param {Object } packageDescriptor
704
+ * @param {object } packageDescriptor
705
705
* @param {string } moduleSpecifier
706
- * @param {Object } [options]
706
+ * @param {object } [options]
707
707
* @param {boolean } [options.dev]
708
- * @param {Object } [options.commonDependencies]
709
- * @param {Object } [options.policy]
708
+ * @param {object } [options.commonDependencies]
709
+ * @param {object } [options.policy]
710
710
* @returns {Promise<CompartmentMapDescriptor> }
711
711
*/
712
712
export const compartmentMapForNodeModules = async (
0 commit comments