@expo/config-plugins 58.0.4 → 58.0.6
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.
|
@@ -62,6 +62,13 @@ function _assert() {
|
|
|
62
62
|
};
|
|
63
63
|
return data;
|
|
64
64
|
}
|
|
65
|
+
function _path() {
|
|
66
|
+
const data = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
67
|
+
_path = function() {
|
|
68
|
+
return data;
|
|
69
|
+
};
|
|
70
|
+
return data;
|
|
71
|
+
}
|
|
65
72
|
const _errors = require("./errors");
|
|
66
73
|
function _interop_require_default(obj) {
|
|
67
74
|
return obj && obj.__esModule ? obj : {
|
|
@@ -94,6 +101,7 @@ function resolvePluginForModule(projectRoot, pluginReference) {
|
|
|
94
101
|
extensions: pluginExtensions
|
|
95
102
|
});
|
|
96
103
|
if (pluginPackageFile) {
|
|
104
|
+
warnIfPluginNotExported(projectRoot, pluginReference, pluginPackageFile);
|
|
97
105
|
return {
|
|
98
106
|
isPluginFile: true,
|
|
99
107
|
filePath: pluginPackageFile
|
|
@@ -112,6 +120,19 @@ function resolvePluginForModule(projectRoot, pluginReference) {
|
|
|
112
120
|
}
|
|
113
121
|
throw new _errors.PluginError(`Failed to resolve plugin for module "${pluginReference}" relative to "${projectRoot}". Do you have node modules installed?`, 'PLUGIN_NOT_FOUND');
|
|
114
122
|
}
|
|
123
|
+
const checkedPluginExports = new Set();
|
|
124
|
+
// `resolveFrom` finds `app.plugin.*` on disk regardless of `package.json:exports`, so a package
|
|
125
|
+
// that omits it from `exports` works here but not for tools that resolve it through Node.
|
|
126
|
+
function warnIfPluginNotExported(projectRoot, pluginReference, pluginPackageFile) {
|
|
127
|
+
if (checkedPluginExports.has(pluginReference)) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
checkedPluginExports.add(pluginReference);
|
|
131
|
+
const pluginFile = _path().default.basename(pluginPackageFile);
|
|
132
|
+
if ((0, _requireutils().nativeResolveFrom)(projectRoot, `${pluginReference}/${pluginFile}`) == null) {
|
|
133
|
+
console.warn(`The config plugin for "${pluginReference}" was loaded from "${pluginFile}", but the "exports" field in its package.json doesn't include "./${pluginFile}", so tools that resolve "${pluginReference}/${pluginFile}" through Node can't find it. If you maintain "${pluginReference}", add "./${pluginFile}": "./${pluginFile}" to its "exports"; otherwise, report this to its maintainers.`);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
115
136
|
// TODO: Test windows
|
|
116
137
|
function pathIsFilePath(name) {
|
|
117
138
|
// Matches lines starting with: . / ~/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["utils/plugin-resolver.ts"],"sourcesContent":[null],"names":["assertInternalProjectRoot","moduleNameIsDirectFileReference","moduleNameIsPackageReference","normalizeStaticPlugin","pluginFileName","resolveConfigPluginExport","resolveConfigPluginFunction","resolveConfigPluginFunctionWithInfo","resolvePluginForModule","pluginExtensions","projectRoot","pluginReference","pluginScriptFile","resolveFrom","extensions","isPluginFile","filePath","pluginPackageFile","packageMainEntry","PluginError","pathIsFilePath","name","match","slashCount","split","length","startsWith","plugin","Array","isArray","assert","undefined","
|
|
1
|
+
{"version":3,"sources":["utils/plugin-resolver.ts"],"sourcesContent":[null],"names":["assertInternalProjectRoot","moduleNameIsDirectFileReference","moduleNameIsPackageReference","normalizeStaticPlugin","pluginFileName","resolveConfigPluginExport","resolveConfigPluginFunction","resolveConfigPluginFunctionWithInfo","resolvePluginForModule","pluginExtensions","projectRoot","pluginReference","pluginScriptFile","resolveFrom","extensions","isPluginFile","filePath","pluginPackageFile","warnIfPluginNotExported","packageMainEntry","PluginError","checkedPluginExports","Set","has","add","pluginFile","path","basename","nativeResolveFrom","console","warn","pathIsFilePath","name","match","slashCount","split","length","startsWith","plugin","Array","isArray","assert","undefined","result","loadModuleSync","error","message","Error","String","pluginError","stack","default","learnMoreLink"],"mappings":";;;;;;;;;;;;;;;;;;;;;;QAkHgBA;eAAAA;;QA/BAC;eAAAA;;QAeA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MAAM,IAAIhC,mBAAW,CACnB,CAAC,QAAQ,EAAET,gBAAgB,oCAAoC,EAAEc,WAAW,EAAE,EAAE2B,eAAe,EAC/F;IAEJ;IAEA,OAAOd;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/config-plugins",
|
|
3
|
-
"version": "58.0.
|
|
3
|
+
"version": "58.0.6",
|
|
4
4
|
"description": "A library for Expo config plugins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"expo",
|
|
@@ -82,24 +82,24 @@
|
|
|
82
82
|
"@expo/config-types": "^58.0.2",
|
|
83
83
|
"@expo/json-file": "~11.2.1",
|
|
84
84
|
"@expo/plist": "^0.10.1",
|
|
85
|
-
"@expo/require-utils": "^58.0.
|
|
86
|
-
"@expo/sdk-runtime-versions": "^1.0.
|
|
85
|
+
"@expo/require-utils": "^58.0.3",
|
|
86
|
+
"@expo/sdk-runtime-versions": "^1.0.1",
|
|
87
87
|
"chalk": "^4.1.2",
|
|
88
88
|
"debug": "^4.3.5",
|
|
89
89
|
"getenv": "^2.0.0",
|
|
90
90
|
"glob": "^13.0.0",
|
|
91
|
-
"semver": "^7.
|
|
91
|
+
"semver": "^7.7.4",
|
|
92
92
|
"slugify": "^1.6.6",
|
|
93
93
|
"xcode": "^3.0.1",
|
|
94
94
|
"xml2js": "0.6.0"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
97
|
"@types/debug": "^4.1.5",
|
|
98
|
-
"@types/getenv": "^1.0.
|
|
99
|
-
"@types/semver": "^7.7.
|
|
98
|
+
"@types/getenv": "^1.0.3",
|
|
99
|
+
"@types/semver": "^7.7.1",
|
|
100
100
|
"@types/xml2js": "~0.4.11",
|
|
101
|
-
"expo-module-scripts": "56.0.
|
|
102
|
-
"memfs": "^3.
|
|
101
|
+
"expo-module-scripts": "56.0.7",
|
|
102
|
+
"memfs": "^3.6.0"
|
|
103
103
|
},
|
|
104
104
|
"scripts": {
|
|
105
105
|
"build": "expo-build cjs:src",
|