@tamagui/babel-plugin-fully-specified 2.0.0-rc.3 → 2.0.0-rc.30
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/commonjs.cjs +1 -0
- package/package.json +5 -2
- package/permanent/cjs/index.js +10 -7
- package/permanent/cjs/index.mjs +2 -1
- package/permanent/esm/index.js +2 -1
- package/permanent/esm/index.mjs +9 -9
- package/src/index.ts +13 -15
package/commonjs.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.assign(module.exports, require('./permanent/cjs/commonjs.js'))
|
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/babel-plugin-fully-specified",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.30",
|
|
4
4
|
"gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"source": "src/index.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"src",
|
|
9
9
|
"types",
|
|
10
|
-
"permanent"
|
|
10
|
+
"permanent",
|
|
11
|
+
"commonjs.cjs"
|
|
11
12
|
],
|
|
12
13
|
"main": "permanent/cjs/index.js",
|
|
13
14
|
"module": "permanent/esm/index.mjs",
|
|
14
15
|
"exports": {
|
|
15
16
|
".": {
|
|
16
17
|
"types": "./types/index.d.ts",
|
|
18
|
+
"browser": "./permanent/esm/index.mjs",
|
|
17
19
|
"module": "./permanent/esm/index.mjs",
|
|
18
20
|
"import": "./permanent/esm/index.mjs",
|
|
19
21
|
"require": "./permanent/cjs/index.js",
|
|
@@ -21,6 +23,7 @@
|
|
|
21
23
|
},
|
|
22
24
|
"./commonjs": {
|
|
23
25
|
"types": "./types/commonjs.d.ts",
|
|
26
|
+
"browser": "./permanent/esm/commonjs.mjs",
|
|
24
27
|
"module": "./permanent/esm/commonjs.mjs",
|
|
25
28
|
"import": "./permanent/esm/commonjs.mjs",
|
|
26
29
|
"require": "./permanent/cjs/commonjs.js"
|
package/permanent/cjs/index.js
CHANGED
|
@@ -168,20 +168,23 @@ function evaluateTargetModule({
|
|
|
168
168
|
esExtensionDefault,
|
|
169
169
|
ensureFileExists,
|
|
170
170
|
}) {
|
|
171
|
-
if (currentModuleExtension && !esExtensions.includes(currentModuleExtension)) return !1
|
|
172
171
|
const targetFile = (0, import_node_path.resolve)(filenameDirectory, moduleSpecifier)
|
|
173
172
|
if (ensureFileExists) {
|
|
174
173
|
for (const extension of tryExtensions)
|
|
175
174
|
if ((0, import_node_fs.existsSync)(targetFile + extension))
|
|
176
175
|
return moduleSpecifier + esExtensionDefault
|
|
177
|
-
|
|
178
|
-
!
|
|
179
|
-
|
|
176
|
+
if (currentModuleExtension && !esExtensions.includes(currentModuleExtension))
|
|
177
|
+
return !1
|
|
178
|
+
if (isDirectory) {
|
|
179
|
+
const indexModuleSpecifier = `${moduleSpecifier.replace(/\/$/, '')}/index`,
|
|
180
|
+
indexTargetFile = (0, import_node_path.resolve)(
|
|
180
181
|
filenameDirectory,
|
|
181
|
-
|
|
182
|
+
indexModuleSpecifier
|
|
182
183
|
)
|
|
183
|
-
)
|
|
184
|
-
|
|
184
|
+
for (const extension of tryExtensions)
|
|
185
|
+
if ((0, import_node_fs.existsSync)(indexTargetFile + extension))
|
|
186
|
+
return indexModuleSpecifier + esExtensionDefault
|
|
187
|
+
}
|
|
185
188
|
} else
|
|
186
189
|
return (
|
|
187
190
|
esExtensions.includes(filenameExtension), moduleSpecifier + esExtensionDefault
|
package/permanent/cjs/index.mjs
CHANGED
|
@@ -184,12 +184,13 @@ function evaluateTargetModule({
|
|
|
184
184
|
esExtensionDefault,
|
|
185
185
|
ensureFileExists,
|
|
186
186
|
}) {
|
|
187
|
-
if (currentModuleExtension && !esExtensions.includes(currentModuleExtension)) return !1
|
|
188
187
|
const targetFile = (0, import_node_path.resolve)(filenameDirectory, moduleSpecifier)
|
|
189
188
|
if (ensureFileExists) {
|
|
190
189
|
for (const extension of tryExtensions)
|
|
191
190
|
if ((0, import_node_fs.existsSync)(targetFile + extension))
|
|
192
191
|
return moduleSpecifier + esExtensionDefault
|
|
192
|
+
if (currentModuleExtension && !esExtensions.includes(currentModuleExtension))
|
|
193
|
+
return !1
|
|
193
194
|
isDirectory &&
|
|
194
195
|
!(0, import_node_fs.existsSync)(
|
|
195
196
|
(0, import_node_path.resolve)(
|
package/permanent/esm/index.js
CHANGED
|
@@ -124,11 +124,12 @@ function evaluateTargetModule({
|
|
|
124
124
|
esExtensionDefault,
|
|
125
125
|
ensureFileExists,
|
|
126
126
|
}) {
|
|
127
|
-
if (currentModuleExtension && !esExtensions.includes(currentModuleExtension)) return !1
|
|
128
127
|
const targetFile = resolve(filenameDirectory, moduleSpecifier)
|
|
129
128
|
if (ensureFileExists) {
|
|
130
129
|
for (const extension of tryExtensions)
|
|
131
130
|
if (existsSync(targetFile + extension)) return moduleSpecifier + esExtensionDefault
|
|
131
|
+
if (currentModuleExtension && !esExtensions.includes(currentModuleExtension))
|
|
132
|
+
return !1
|
|
132
133
|
isDirectory &&
|
|
133
134
|
!existsSync(
|
|
134
135
|
resolve(
|
package/permanent/esm/index.mjs
CHANGED
|
@@ -127,19 +127,19 @@ function evaluateTargetModule({
|
|
|
127
127
|
esExtensionDefault,
|
|
128
128
|
ensureFileExists,
|
|
129
129
|
}) {
|
|
130
|
-
if (currentModuleExtension && !esExtensions.includes(currentModuleExtension)) return !1
|
|
131
130
|
const targetFile = resolve(filenameDirectory, moduleSpecifier)
|
|
132
131
|
if (ensureFileExists) {
|
|
133
132
|
for (const extension of tryExtensions)
|
|
134
133
|
if (existsSync(targetFile + extension)) return moduleSpecifier + esExtensionDefault
|
|
135
|
-
|
|
136
|
-
!
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
134
|
+
if (currentModuleExtension && !esExtensions.includes(currentModuleExtension))
|
|
135
|
+
return !1
|
|
136
|
+
if (isDirectory) {
|
|
137
|
+
const indexModuleSpecifier = `${moduleSpecifier.replace(/\/$/, '')}/index`,
|
|
138
|
+
indexTargetFile = resolve(filenameDirectory, indexModuleSpecifier)
|
|
139
|
+
for (const extension of tryExtensions)
|
|
140
|
+
if (existsSync(indexTargetFile + extension))
|
|
141
|
+
return indexModuleSpecifier + esExtensionDefault
|
|
142
|
+
}
|
|
143
143
|
} else
|
|
144
144
|
return (
|
|
145
145
|
esExtensions.includes(filenameExtension), moduleSpecifier + esExtensionDefault
|
package/src/index.ts
CHANGED
|
@@ -226,10 +226,6 @@ function evaluateTargetModule({
|
|
|
226
226
|
esExtensionDefault,
|
|
227
227
|
ensureFileExists,
|
|
228
228
|
}: any): string | false {
|
|
229
|
-
if (currentModuleExtension && !esExtensions.includes(currentModuleExtension)) {
|
|
230
|
-
return false
|
|
231
|
-
}
|
|
232
|
-
|
|
233
229
|
const targetFile = resolve(filenameDirectory, moduleSpecifier)
|
|
234
230
|
|
|
235
231
|
if (ensureFileExists) {
|
|
@@ -239,17 +235,19 @@ function evaluateTargetModule({
|
|
|
239
235
|
}
|
|
240
236
|
}
|
|
241
237
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
)
|
|
251
|
-
|
|
252
|
-
|
|
238
|
+
if (currentModuleExtension && !esExtensions.includes(currentModuleExtension)) {
|
|
239
|
+
return false
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (isDirectory) {
|
|
243
|
+
const indexModuleSpecifier = `${moduleSpecifier.replace(/\/$/, '')}/index`
|
|
244
|
+
const indexTargetFile = resolve(filenameDirectory, indexModuleSpecifier)
|
|
245
|
+
|
|
246
|
+
for (const extension of tryExtensions) {
|
|
247
|
+
if (existsSync(indexTargetFile + extension)) {
|
|
248
|
+
return indexModuleSpecifier + esExtensionDefault
|
|
249
|
+
}
|
|
250
|
+
}
|
|
253
251
|
}
|
|
254
252
|
} else if (esExtensions.includes(filenameExtension)) {
|
|
255
253
|
return moduleSpecifier + esExtensionDefault
|