jiek 2.2.5 → 2.2.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.
@@ -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.4";
121
+ var version = "2.2.5-alpha.1";
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";
@@ -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.4";
113
+ var version = "2.2.5-alpha.1";
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";
package/dist/cli.cjs CHANGED
@@ -4794,12 +4794,16 @@ async function prepublish({ bumper: bumper$1 } = {}) {
4794
4794
  async function postpublish() {
4795
4795
  await forEachSelectedProjectsGraphEntries((dir) => {
4796
4796
  const jiekTempDir = path__default.default.resolve(dir, "node_modules/.jiek/.tmp");
4797
- const packageJSON = path__default.default.resolve(dir, "package.json");
4798
- const jiekTempPackageJSON = path__default.default.resolve(jiekTempDir, "package.json");
4799
- if (fs__default.default.existsSync(jiekTempPackageJSON)) {
4800
- fs__default.default.copyFileSync(jiekTempPackageJSON, packageJSON);
4801
- fs__default.default.rmSync(jiekTempPackageJSON);
4797
+ const packageJSONPath = path__default.default.resolve(dir, "package.json");
4798
+ const { name, version } = JSON.parse(fs__default.default.readFileSync(packageJSONPath, "utf-8"));
4799
+ const jiekTempPackageJSONPath = path__default.default.resolve(jiekTempDir, "package.json");
4800
+ if (fs__default.default.existsSync(jiekTempPackageJSONPath)) {
4801
+ fs__default.default.copyFileSync(jiekTempPackageJSONPath, packageJSONPath);
4802
+ fs__default.default.rmSync(jiekTempPackageJSONPath);
4802
4803
  console.log(`${dir}/package.json has been restored`);
4804
+ console.log(
4805
+ `if you want to check the compatibility of the package, you can visit: https://arethetypeswrong.github.io/?p=${name}%40${version}`
4806
+ );
4803
4807
  } else {
4804
4808
  throw new Error(
4805
4809
  `jiek temp \`${dir}/package.json\` not found, please confirm the jiek pre-publish command has been executed`
package/dist/cli.js CHANGED
@@ -4765,12 +4765,16 @@ async function prepublish({ bumper } = {}) {
4765
4765
  async function postpublish() {
4766
4766
  await forEachSelectedProjectsGraphEntries((dir) => {
4767
4767
  const jiekTempDir = path.resolve(dir, "node_modules/.jiek/.tmp");
4768
- const packageJSON = path.resolve(dir, "package.json");
4769
- const jiekTempPackageJSON = path.resolve(jiekTempDir, "package.json");
4770
- if (fs.existsSync(jiekTempPackageJSON)) {
4771
- fs.copyFileSync(jiekTempPackageJSON, packageJSON);
4772
- fs.rmSync(jiekTempPackageJSON);
4768
+ const packageJSONPath = path.resolve(dir, "package.json");
4769
+ const { name, version } = JSON.parse(fs.readFileSync(packageJSONPath, "utf-8"));
4770
+ const jiekTempPackageJSONPath = path.resolve(jiekTempDir, "package.json");
4771
+ if (fs.existsSync(jiekTempPackageJSONPath)) {
4772
+ fs.copyFileSync(jiekTempPackageJSONPath, packageJSONPath);
4773
+ fs.rmSync(jiekTempPackageJSONPath);
4773
4774
  console.log(`${dir}/package.json has been restored`);
4775
+ console.log(
4776
+ `if you want to check the compatibility of the package, you can visit: https://arethetypeswrong.github.io/?p=${name}%40${version}`
4777
+ );
4774
4778
  } else {
4775
4779
  throw new Error(
4776
4780
  `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.5",
4
+ "version": "2.2.6",
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",
@@ -440,13 +440,21 @@ async function prepublish({ bumper }: {
440
440
  async function postpublish() {
441
441
  await forEachSelectedProjectsGraphEntries(dir => {
442
442
  const jiekTempDir = path.resolve(dir, 'node_modules/.jiek/.tmp')
443
- const packageJSON = path.resolve(dir, 'package.json')
444
- const jiekTempPackageJSON = path.resolve(jiekTempDir, 'package.json')
445
- if (fs.existsSync(jiekTempPackageJSON)) {
446
- fs.copyFileSync(jiekTempPackageJSON, packageJSON)
447
- fs.rmSync(jiekTempPackageJSON)
448
- // eslint-disable-next-line no-console
443
+ const packageJSONPath = path.resolve(dir, 'package.json')
444
+ const { name, version } = JSON.parse(fs.readFileSync(packageJSONPath, 'utf-8')) as {
445
+ name: string
446
+ version: string
447
+ }
448
+ const jiekTempPackageJSONPath = path.resolve(jiekTempDir, 'package.json')
449
+ if (fs.existsSync(jiekTempPackageJSONPath)) {
450
+ fs.copyFileSync(jiekTempPackageJSONPath, packageJSONPath)
451
+ fs.rmSync(jiekTempPackageJSONPath)
452
+ /* eslint-disable no-console */
449
453
  console.log(`${dir}/package.json has been restored`)
454
+ console.log(
455
+ `if you want to check the compatibility of the package, you can visit: https://arethetypeswrong.github.io/?p=${name}%40${version}`
456
+ )
457
+ /* eslint-enable no-console */
450
458
  } else {
451
459
  throw new Error(
452
460
  `jiek temp \`${dir}/package.json\` not found, please confirm the jiek pre-publish command has been executed`