prebundle 1.6.4 → 1.6.5
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/dist/index.js +9 -3
- package/package.json +24 -23
package/dist/index.js
CHANGED
|
@@ -68,7 +68,7 @@ function findDepPath(name) {
|
|
|
68
68
|
while(!dirname(entry).endsWith('node_modules'))entry = dirname(entry);
|
|
69
69
|
if (name.includes('/')) return join(dirname(entry), name);
|
|
70
70
|
return entry;
|
|
71
|
-
} catch
|
|
71
|
+
} catch {
|
|
72
72
|
return null;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -157,7 +157,9 @@ function findDirectTypeFile(filepath) {
|
|
|
157
157
|
cwd
|
|
158
158
|
]
|
|
159
159
|
});
|
|
160
|
-
} catch {
|
|
160
|
+
} catch {
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
161
163
|
};
|
|
162
164
|
switch(ext){
|
|
163
165
|
case '.js':
|
|
@@ -202,7 +204,11 @@ async function emitIndex(code, distPath, prettier) {
|
|
|
202
204
|
await fs_extra.outputFile(distIndex, formatted);
|
|
203
205
|
} else await fs_extra.outputFile(distIndex, code);
|
|
204
206
|
}
|
|
205
|
-
const
|
|
207
|
+
const getPackageJsonField = (json, key)=>{
|
|
208
|
+
const value = json[key];
|
|
209
|
+
return 'string' == typeof value ? value : null;
|
|
210
|
+
};
|
|
211
|
+
const getTypes = (json)=>json && (getPackageJsonField(json, 'types') || getPackageJsonField(json, 'typing') || getPackageJsonField(json, 'typings') || getTypes(json.exports?.['.'])) || null;
|
|
206
212
|
async function emitDts(task, externals) {
|
|
207
213
|
const outputDefaultDts = ()=>{
|
|
208
214
|
fs_extra.outputFileSync(join(task.distPath, 'index.d.ts'), 'export = any;\n');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prebundle",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/rstackjs/prebundle"
|
|
@@ -15,38 +15,39 @@
|
|
|
15
15
|
"bin.js",
|
|
16
16
|
"compiled"
|
|
17
17
|
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"build": "rslib build",
|
|
20
|
-
"dev": "rslib build --watch",
|
|
21
|
-
"prebundle": "node ./bin.js",
|
|
22
|
-
"prepare": "npm run build",
|
|
23
|
-
"bump": "npx bumpp",
|
|
24
|
-
"test": "rstest"
|
|
25
|
-
},
|
|
26
18
|
"dependencies": {
|
|
27
|
-
"cac": "^
|
|
19
|
+
"cac": "^7.0.0",
|
|
28
20
|
"@vercel/ncc": "0.38.4",
|
|
29
|
-
"prettier": "^3.8.
|
|
30
|
-
"rollup": "^4.
|
|
31
|
-
"rollup-plugin-dts": "^6.
|
|
32
|
-
"terser": "^5.
|
|
21
|
+
"prettier": "^3.8.3",
|
|
22
|
+
"rollup": "^4.60.4",
|
|
23
|
+
"rollup-plugin-dts": "^6.4.1",
|
|
24
|
+
"terser": "^5.48.0"
|
|
33
25
|
},
|
|
34
26
|
"devDependencies": {
|
|
35
|
-
"@astrojs/sitemap": "^3.7.
|
|
36
|
-
"@rslib/core": "0.
|
|
37
|
-
"@
|
|
27
|
+
"@astrojs/sitemap": "^3.7.2",
|
|
28
|
+
"@rslib/core": "0.21.5",
|
|
29
|
+
"@rslint/core": "^0.5.3",
|
|
30
|
+
"@rstest/core": "^0.10.2",
|
|
38
31
|
"@types/fs-extra": "^11.0.4",
|
|
39
|
-
"@types/node": "24.
|
|
32
|
+
"@types/node": "24.12.4",
|
|
40
33
|
"chalk": "^5.6.2",
|
|
41
34
|
"fast-glob": "^3.3.3",
|
|
42
|
-
"fs-extra": "^11.3.
|
|
43
|
-
"rslog": "^1.
|
|
44
|
-
"typescript": "^
|
|
35
|
+
"fs-extra": "^11.3.5",
|
|
36
|
+
"rslog": "^2.1.1",
|
|
37
|
+
"typescript": "^6.0.3"
|
|
45
38
|
},
|
|
46
|
-
"packageManager": "pnpm@10.28.2",
|
|
47
39
|
"publishConfig": {
|
|
48
40
|
"access": "public",
|
|
49
41
|
"registry": "https://registry.npmjs.org/",
|
|
50
42
|
"provenance": true
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "rslib",
|
|
46
|
+
"dev": "rslib -w",
|
|
47
|
+
"lint": "rslint",
|
|
48
|
+
"lint:write": "rslint --fix",
|
|
49
|
+
"prebundle": "node ./bin.js",
|
|
50
|
+
"bump": "npx bumpp",
|
|
51
|
+
"test": "rstest"
|
|
51
52
|
}
|
|
52
|
-
}
|
|
53
|
+
}
|