Lines Matching refs:exports

71  * Emits a deprecation warning for the use of a deprecated trailing slash pattern mapping in the "exports" field
83 `"exports" field module resolution of the package at ${pjsonPath}${
99 * @param {boolean} internal - Whether the module is in the "imports" or "exports" field.
111 }in the "${internal ? 'imports' : 'exports'}" field module resolution of the package at ${
120 * the package.json file does not define a "main" or "exports" field.
134 `No "main" or "exports" field defined in the package.json for ${pkgPath
376 * @param {boolean} internal - Whether the resolution is for an "imports" or "exports" field in package.json.
382 internal ? 'imports' : 'exports'}" resolution of ${
579 '"exports" cannot contain numeric property keys.');
602 * Is the given exports object using the shorthand syntax?
603 * @param {import('internal/modules/esm/package_config.js').PackageConfig['exports']} exports
607 function isConditionalExportsMainSugar(exports, packageJSONUrl, base) {
608 if (typeof exports === 'string' || ArrayIsArray(exports)) { return true; }
609 if (typeof exports !== 'object' || exports === null) { return false; }
611 const keys = ObjectGetOwnPropertyNames(exports);
622 '"exports" cannot contain some keys starting with \'.\' and some not.' +
623 ' The exports object must either be an object of package subpath keys' +
631 * Resolves the exports of a package.
641 let exports = packageConfig.exports;
642 if (isConditionalExportsMainSugar(exports, packageJSONUrl, base)) {
643 exports = { '.': exports };
646 if (ObjectPrototypeHasOwnProperty(exports, packageSubpath) &&
649 const target = exports[packageSubpath];
664 const keys = ObjectGetOwnPropertyNames(exports);
695 const target = exports[bestMatch];
873 if (packageConfig.exports != null && packageConfig.name === packageName) {
898 if (packageConfig.exports != null) {
1240 module.exports = {
1258 module.exports.defaultResolve = function defaultResolve(