jiek 2.2.5 → 2.2.7
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/bin-helper/index.d.cts +1 -0
- package/bin-helper/index.d.ts +1 -0
- package/bin-helper/package.json +5 -1
- package/dist/cli-only-build.cjs +4 -5
- package/dist/cli-only-build.js +4 -5
- package/dist/cli.cjs +11 -5
- package/dist/cli.js +11 -5
- package/package.json +5 -4
- package/src/commands/publish.ts +18 -6
- /package/{bin-helper.cjs → bin-helper/index.cjs} +0 -0
- /package/{bin-helper.js → bin-helper/index.js} +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
export {}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {}
|
package/bin-helper/package.json
CHANGED
package/dist/cli-only-build.cjs
CHANGED
@@ -118,7 +118,7 @@ async function getSelectedProjectsGraph(filter = commander.program.getOptionValu
|
|
118
118
|
|
119
119
|
var name = "jiek";
|
120
120
|
var type = "module";
|
121
|
-
var version = "2.2.
|
121
|
+
var version = "2.2.6";
|
122
122
|
var description$1 = "A lightweight toolkit for compiling and managing libraries based on `package.json` metadata and suitable for `Monorepo`.";
|
123
123
|
var author = "YiJie <yijie4188@gmail.com>";
|
124
124
|
var homepage = "https://github.com/NWYLZW/jiek/tree/master/packages/jiek#readme";
|
@@ -141,8 +141,8 @@ var exports$1 = {
|
|
141
141
|
"./package.json": "./package.json",
|
142
142
|
".": "./src/index.ts",
|
143
143
|
"./bin-helper": {
|
144
|
-
require: "./bin-helper.cjs",
|
145
|
-
"default": "./bin-helper.js"
|
144
|
+
require: "./bin-helper/index.cjs",
|
145
|
+
"default": "./bin-helper/index.js"
|
146
146
|
},
|
147
147
|
"./cli": "./src/cli.ts",
|
148
148
|
"./cli-only-build": "./src/cli-only-build.ts",
|
@@ -165,8 +165,7 @@ var files = [
|
|
165
165
|
"LICENSE",
|
166
166
|
"README.md",
|
167
167
|
"bin",
|
168
|
-
"bin-helper
|
169
|
-
"bin-helper.js",
|
168
|
+
"bin-helper",
|
170
169
|
"dist",
|
171
170
|
"src"
|
172
171
|
];
|
package/dist/cli-only-build.js
CHANGED
@@ -110,7 +110,7 @@ async function getSelectedProjectsGraph(filter = program.getOptionValue("filter"
|
|
110
110
|
|
111
111
|
var name = "jiek";
|
112
112
|
var type = "module";
|
113
|
-
var version = "2.2.
|
113
|
+
var version = "2.2.6";
|
114
114
|
var description$1 = "A lightweight toolkit for compiling and managing libraries based on `package.json` metadata and suitable for `Monorepo`.";
|
115
115
|
var author = "YiJie <yijie4188@gmail.com>";
|
116
116
|
var homepage = "https://github.com/NWYLZW/jiek/tree/master/packages/jiek#readme";
|
@@ -133,8 +133,8 @@ var exports = {
|
|
133
133
|
"./package.json": "./package.json",
|
134
134
|
".": "./src/index.ts",
|
135
135
|
"./bin-helper": {
|
136
|
-
require: "./bin-helper.cjs",
|
137
|
-
"default": "./bin-helper.js"
|
136
|
+
require: "./bin-helper/index.cjs",
|
137
|
+
"default": "./bin-helper/index.js"
|
138
138
|
},
|
139
139
|
"./cli": "./src/cli.ts",
|
140
140
|
"./cli-only-build": "./src/cli-only-build.ts",
|
@@ -157,8 +157,7 @@ var files = [
|
|
157
157
|
"LICENSE",
|
158
158
|
"README.md",
|
159
159
|
"bin",
|
160
|
-
"bin-helper
|
161
|
-
"bin-helper.js",
|
160
|
+
"bin-helper",
|
162
161
|
"dist",
|
163
162
|
"src"
|
164
163
|
];
|
package/dist/cli.cjs
CHANGED
@@ -4593,9 +4593,11 @@ async function prepublish({ bumper: bumper$1 } = {}) {
|
|
4593
4593
|
const indexExports = index;
|
4594
4594
|
indexPublishConfig.main = indexExports.require ?? indexExports.default;
|
4595
4595
|
indexPublishConfig.module = indexExports.import ?? indexExports.module ?? indexExports.default;
|
4596
|
+
indexPublishConfig.types = indexExports.types;
|
4596
4597
|
break;
|
4597
4598
|
}
|
4598
4599
|
}
|
4600
|
+
indexPublishConfig.types = indexPublishConfig[manifest?.type === "module" ? "module" : "main"].replace(/\.([cm]?)js$/, ".d.$1ts");
|
4599
4601
|
for (const [k, v] of Object.entries(indexPublishConfig)) {
|
4600
4602
|
if (v === void 0) continue;
|
4601
4603
|
newJSONString = jsoncParser.applyEdits(
|
@@ -4794,12 +4796,16 @@ async function prepublish({ bumper: bumper$1 } = {}) {
|
|
4794
4796
|
async function postpublish() {
|
4795
4797
|
await forEachSelectedProjectsGraphEntries((dir) => {
|
4796
4798
|
const jiekTempDir = path__default.default.resolve(dir, "node_modules/.jiek/.tmp");
|
4797
|
-
const
|
4798
|
-
const
|
4799
|
-
|
4800
|
-
|
4801
|
-
fs__default.default.
|
4799
|
+
const packageJSONPath = path__default.default.resolve(dir, "package.json");
|
4800
|
+
const { name, version } = JSON.parse(fs__default.default.readFileSync(packageJSONPath, "utf-8"));
|
4801
|
+
const jiekTempPackageJSONPath = path__default.default.resolve(jiekTempDir, "package.json");
|
4802
|
+
if (fs__default.default.existsSync(jiekTempPackageJSONPath)) {
|
4803
|
+
fs__default.default.copyFileSync(jiekTempPackageJSONPath, packageJSONPath);
|
4804
|
+
fs__default.default.rmSync(jiekTempPackageJSONPath);
|
4802
4805
|
console.log(`${dir}/package.json has been restored`);
|
4806
|
+
console.log(
|
4807
|
+
`if you want to check the compatibility of the package, you can visit: https://arethetypeswrong.github.io/?p=${name}%40${version}`
|
4808
|
+
);
|
4803
4809
|
} else {
|
4804
4810
|
throw new Error(
|
4805
4811
|
`jiek temp \`${dir}/package.json\` not found, please confirm the jiek pre-publish command has been executed`
|
package/dist/cli.js
CHANGED
@@ -4564,9 +4564,11 @@ async function prepublish({ bumper } = {}) {
|
|
4564
4564
|
const indexExports = index;
|
4565
4565
|
indexPublishConfig.main = indexExports.require ?? indexExports.default;
|
4566
4566
|
indexPublishConfig.module = indexExports.import ?? indexExports.module ?? indexExports.default;
|
4567
|
+
indexPublishConfig.types = indexExports.types;
|
4567
4568
|
break;
|
4568
4569
|
}
|
4569
4570
|
}
|
4571
|
+
indexPublishConfig.types = indexPublishConfig[manifest?.type === "module" ? "module" : "main"].replace(/\.([cm]?)js$/, ".d.$1ts");
|
4570
4572
|
for (const [k, v] of Object.entries(indexPublishConfig)) {
|
4571
4573
|
if (v === void 0) continue;
|
4572
4574
|
newJSONString = applyEdits(
|
@@ -4765,12 +4767,16 @@ async function prepublish({ bumper } = {}) {
|
|
4765
4767
|
async function postpublish() {
|
4766
4768
|
await forEachSelectedProjectsGraphEntries((dir) => {
|
4767
4769
|
const jiekTempDir = path.resolve(dir, "node_modules/.jiek/.tmp");
|
4768
|
-
const
|
4769
|
-
const
|
4770
|
-
|
4771
|
-
|
4772
|
-
fs.
|
4770
|
+
const packageJSONPath = path.resolve(dir, "package.json");
|
4771
|
+
const { name, version } = JSON.parse(fs.readFileSync(packageJSONPath, "utf-8"));
|
4772
|
+
const jiekTempPackageJSONPath = path.resolve(jiekTempDir, "package.json");
|
4773
|
+
if (fs.existsSync(jiekTempPackageJSONPath)) {
|
4774
|
+
fs.copyFileSync(jiekTempPackageJSONPath, packageJSONPath);
|
4775
|
+
fs.rmSync(jiekTempPackageJSONPath);
|
4773
4776
|
console.log(`${dir}/package.json has been restored`);
|
4777
|
+
console.log(
|
4778
|
+
`if you want to check the compatibility of the package, you can visit: https://arethetypeswrong.github.io/?p=${name}%40${version}`
|
4779
|
+
);
|
4774
4780
|
} else {
|
4775
4781
|
throw new Error(
|
4776
4782
|
`jiek temp \`${dir}/package.json\` not found, please confirm the jiek pre-publish command has been executed`
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "jiek",
|
3
3
|
"type": "module",
|
4
|
-
"version": "2.2.
|
4
|
+
"version": "2.2.7",
|
5
5
|
"description": "A lightweight toolkit for compiling and managing libraries based on `package.json` metadata and suitable for `Monorepo`.",
|
6
6
|
"author": "YiJie <yijie4188@gmail.com>",
|
7
7
|
"homepage": "https://github.com/NWYLZW/jiek/tree/master/packages/jiek#readme",
|
@@ -28,8 +28,8 @@
|
|
28
28
|
"default": "./dist/index.js"
|
29
29
|
},
|
30
30
|
"./bin-helper": {
|
31
|
-
"require": "./bin-helper.cjs",
|
32
|
-
"default": "./bin-helper.js"
|
31
|
+
"require": "./bin-helper/index.cjs",
|
32
|
+
"default": "./bin-helper/index.js"
|
33
33
|
},
|
34
34
|
"./cli": {
|
35
35
|
"jiek/__source__": "./src/cli.ts",
|
@@ -134,5 +134,6 @@
|
|
134
134
|
}
|
135
135
|
},
|
136
136
|
"main": "./dist/index.cjs",
|
137
|
-
"module": "./dist/index.js"
|
137
|
+
"module": "./dist/index.js",
|
138
|
+
"types": "./dist/index.d.ts"
|
138
139
|
}
|
package/src/commands/publish.ts
CHANGED
@@ -207,9 +207,13 @@ async function prepublish({ bumper }: {
|
|
207
207
|
const indexExports = index as Record<string, string>
|
208
208
|
indexPublishConfig.main = indexExports.require ?? indexExports.default
|
209
209
|
indexPublishConfig.module = indexExports.import ?? indexExports.module ?? indexExports.default
|
210
|
+
indexPublishConfig.types = indexExports.types
|
210
211
|
break
|
211
212
|
}
|
212
213
|
}
|
214
|
+
indexPublishConfig.types = indexPublishConfig[
|
215
|
+
manifest?.type === 'module' ? 'module' : 'main'
|
216
|
+
].replace(/\.([cm]?)js$/, '.d.$1ts')
|
213
217
|
for (const [k, v] of Object.entries(indexPublishConfig)) {
|
214
218
|
if (v === undefined) continue
|
215
219
|
newJSONString = applyEdits(
|
@@ -440,13 +444,21 @@ async function prepublish({ bumper }: {
|
|
440
444
|
async function postpublish() {
|
441
445
|
await forEachSelectedProjectsGraphEntries(dir => {
|
442
446
|
const jiekTempDir = path.resolve(dir, 'node_modules/.jiek/.tmp')
|
443
|
-
const
|
444
|
-
const
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
447
|
+
const packageJSONPath = path.resolve(dir, 'package.json')
|
448
|
+
const { name, version } = JSON.parse(fs.readFileSync(packageJSONPath, 'utf-8')) as {
|
449
|
+
name: string
|
450
|
+
version: string
|
451
|
+
}
|
452
|
+
const jiekTempPackageJSONPath = path.resolve(jiekTempDir, 'package.json')
|
453
|
+
if (fs.existsSync(jiekTempPackageJSONPath)) {
|
454
|
+
fs.copyFileSync(jiekTempPackageJSONPath, packageJSONPath)
|
455
|
+
fs.rmSync(jiekTempPackageJSONPath)
|
456
|
+
/* eslint-disable no-console */
|
449
457
|
console.log(`${dir}/package.json has been restored`)
|
458
|
+
console.log(
|
459
|
+
`if you want to check the compatibility of the package, you can visit: https://arethetypeswrong.github.io/?p=${name}%40${version}`
|
460
|
+
)
|
461
|
+
/* eslint-enable no-console */
|
450
462
|
} else {
|
451
463
|
throw new Error(
|
452
464
|
`jiek temp \`${dir}/package.json\` not found, please confirm the jiek pre-publish command has been executed`
|
File without changes
|
File without changes
|