@es-pkg/publish 1.0.8 → 1.0.9
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/cjs/index.js +8 -6
- package/esm/index.js +8 -6
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -152,12 +152,14 @@ import_gulp.default.task("copy-info", (0, import_gulp.series)(async () => {
|
|
|
152
152
|
json.types = [".ts", ".tsx"].includes(ext) ? type : `${dir}/${name}.d.ts`;
|
|
153
153
|
}
|
|
154
154
|
json.files = Array.from(/* @__PURE__ */ new Set([ESExists && es, CJSExists && cjs, IIFEExists && iife])).filter(Boolean);
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
155
|
+
if (json.dependencies) {
|
|
156
|
+
json.dependencies = Object.fromEntries(Object.entries(json.dependencies).map(([key, value]) => {
|
|
157
|
+
if (value.startsWith("file://") || value.startsWith("workspace:")) {
|
|
158
|
+
return [key, "latest"];
|
|
159
|
+
}
|
|
160
|
+
return [key, value];
|
|
161
|
+
}));
|
|
162
|
+
}
|
|
161
163
|
let jsonStr = JSON.stringify(json, null, " ");
|
|
162
164
|
const ex = import_fs.default.existsSync(`${import_config.config.publishDir}/`);
|
|
163
165
|
if (!ex) {
|
package/esm/index.js
CHANGED
|
@@ -122,12 +122,14 @@ gulp.task('copy-info', series(async () => {
|
|
|
122
122
|
json.types = ['.ts', '.tsx'].includes(ext) ? type : `${dir}/${name}.d.ts`;
|
|
123
123
|
}
|
|
124
124
|
json.files = Array.from(new Set([ESExists && es, CJSExists && cjs, IIFEExists && iife])).filter(Boolean);
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
125
|
+
if (json.dependencies) {
|
|
126
|
+
json.dependencies = Object.fromEntries(Object.entries(json.dependencies).map(([key, value]) => {
|
|
127
|
+
if (value.startsWith('file://') || value.startsWith('workspace:')) {
|
|
128
|
+
return [key, 'latest'];
|
|
129
|
+
}
|
|
130
|
+
return [key, value];
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
131
133
|
let jsonStr = JSON.stringify(json, null, "\t");
|
|
132
134
|
const ex = fs.existsSync(`${config.publishDir}/`);
|
|
133
135
|
if (!ex) {
|