Skip to content

Commit

Permalink
fixup: americanize name
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobJingleheimer committed Oct 2, 2024
1 parent c23c8f1 commit c865d55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const legacyMainResolveExtensionsIndexes = {
* 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node)
* 5. NOT_FOUND
* @param {URL} packageJSONUrl
* @param {import('typings/internalBinding/modules').RecognisedPackageConfig} packageConfig
* @param {import('typings/internalBinding/modules').RecognizedPackageConfig} packageConfig
* @param {string | URL | undefined} base
* @returns {URL}
*/
Expand Down
12 changes: 6 additions & 6 deletions lib/internal/modules/package_json_reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ const {

/**
* @typedef {import('typings/internalBinding/modules').FullPackageConfig} FullPackageConfig
* @typedef {import('typings/internalBinding/modules').RecognisedPackageConfig} RecognisedPackageConfig
* @typedef {import('typings/internalBinding/modules').RecognizedPackageConfig} RecognizedPackageConfig
* @typedef {import('typings/internalBinding/modules').SerializedPackageConfig} SerializedPackageConfig
*/

/**
* @param {string} path
* @param {SerializedPackageConfig} contents
* @returns {RecognisedPackageConfig}
* @returns {RecognizedPackageConfig}
*/
function deserializePackageJSON(path, contents) {
if (contents === undefined) {
Expand Down Expand Up @@ -88,7 +88,7 @@ function deserializePackageJSON(path, contents) {
* specifier?: URL | string,
* isESM?: boolean,
* }} options
* @returns {RecognisedPackageConfig}
* @returns {RecognizedPackageConfig}
*/
function read(jsonPath, { base, specifier, isESM } = kEmptyObject) {
// This function will be called by both CJS and ESM, so we need to make sure
Expand All @@ -107,7 +107,7 @@ function read(jsonPath, { base, specifier, isESM } = kEmptyObject) {
* @deprecated Expected to be removed in favor of `read` in the future.
* Behaves the same was as `read`, but appends package.json to the path.
* @param {string} requestPath
* @return {RecognisedPackageConfig}
* @return {RecognizedPackageConfig}
*/
function readPackage(requestPath) {
// TODO(@anonrig): Remove this function.
Expand All @@ -120,7 +120,7 @@ function readPackage(requestPath) {
* @param {URL['href'] | URL['pathname']} startPath The path to start searching from.
* @param {boolean} everything Whether to include the full contents of the package.json.
* @returns {undefined | {
* data: everything extends true ? FullPackageConfig : RecognisedPackageConfig,
* data: everything extends true ? FullPackageConfig : RecognizedPackageConfig,
* path: URL['pathname'],
* }}
*/
Expand Down Expand Up @@ -166,7 +166,7 @@ function getNearestParentPackageJSON(startPath, everything = false) {
/**
* Returns the package configuration for the given resolved URL.
* @param {URL | string} resolved - The resolved URL.
* @returns {RecognisedPackageConfig} - The package configuration.
* @returns {RecognizedPackageConfig} - The package configuration.
*/
function getPackageScopeConfig(resolved) {
const result = modulesBinding.getPackageScopeConfig(`${resolved}`);
Expand Down

0 comments on commit c865d55

Please sign in to comment.