jiek 2.2.0 → 2.2.1

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.cjs CHANGED
@@ -11,10 +11,17 @@ try {
11
11
  } catch (e) {
12
12
  const { stack } = e
13
13
  const lines = stack.split('\n')
14
- const caller = lines[lines.length - 1]
15
- const match = caller.match(/\(([^)]+)\)$/)
16
- if (match) {
17
- binFilePath = match[1].replace(/:\d+:\d+$/, '')
14
+ for (const line of lines) {
15
+ if (
16
+ line === 'Error' || line.includes(' (node:') || line.includes(` (${__filename}`)
17
+ ) {
18
+ continue
19
+ }
20
+ const match = line.match(/\(([^)]+)\)$/)
21
+ if (match) {
22
+ binFilePath = match[1].replace(/:\d+:\d+$/, '')
23
+ }
24
+ break
18
25
  }
19
26
  }
20
27
 
@@ -120,7 +120,7 @@ async function getSelectedProjectsGraph(filter = commander.program.getOptionValu
120
120
 
121
121
  var name = "jiek";
122
122
  var type = "module";
123
- var version = "2.1.13-alpha.3";
123
+ var version = "2.2.0";
124
124
  var description$1 = "A lightweight toolkit for compiling and managing libraries based on `package.json` metadata and suitable for `Monorepo`.";
125
125
  var author = "YiJie <yijie4188@gmail.com>";
126
126
  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.1.13-alpha.3";
113
+ var version = "2.2.0";
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";
@@ -4684,12 +4684,12 @@ const { type: _resolvedBuilderOptionsType, ...noTypeResolvedBuilderOptions } = r
4684
4684
  const withMinify = (output, onlyOncePlugins = []) => {
4685
4685
  const minify = build?.output?.minify ?? MINIFY_DEFAULT_VALUE;
4686
4686
  output.plugins = output.plugins ?? [];
4687
+ const notOnlyOncePlugins = [...output.plugins];
4688
+ output.plugins.push(...onlyOncePlugins);
4687
4689
  if (minify === false) {
4688
- output.plugins.push(...onlyOncePlugins);
4689
4690
  return [output];
4690
4691
  }
4691
4692
  const minifyPlugin = resolvedMinifyOptions.type === "esbuild" ? import('rollup-plugin-esbuild').then(({ minify: minify2 }) => minify2(noTypeResolvedMinifyOptions)) : resolvedMinifyOptions.type === "swc" ? import('rollup-plugin-swc3').then(({ minify: minify2 }) => minify2(noTypeResolvedMinifyOptions)) : import('@rollup/plugin-terser').then(({ default: minify2 }) => minify2(noTypeResolvedMinifyOptions));
4692
- const notOnlyOncePlugins = output.plugins;
4693
4693
  return minify === "only-minify" ? [{
4694
4694
  ...output,
4695
4695
  // TODO replace suffix when pubish to npm and the `build.output.minify` is 'only-minify'
@@ -4698,6 +4698,7 @@ const withMinify = (output, onlyOncePlugins = []) => {
4698
4698
  throw new Error("entryFileNames must be a function");
4699
4699
  })(),
4700
4700
  plugins: [
4701
+ ...output.plugins,
4701
4702
  ...notOnlyOncePlugins,
4702
4703
  minifyPlugin
4703
4704
  ]
@@ -4668,12 +4668,12 @@ const { type: _resolvedBuilderOptionsType, ...noTypeResolvedBuilderOptions } = r
4668
4668
  const withMinify = (output, onlyOncePlugins = []) => {
4669
4669
  const minify = build?.output?.minify ?? MINIFY_DEFAULT_VALUE;
4670
4670
  output.plugins = output.plugins ?? [];
4671
+ const notOnlyOncePlugins = [...output.plugins];
4672
+ output.plugins.push(...onlyOncePlugins);
4671
4673
  if (minify === false) {
4672
- output.plugins.push(...onlyOncePlugins);
4673
4674
  return [output];
4674
4675
  }
4675
4676
  const minifyPlugin = resolvedMinifyOptions.type === "esbuild" ? import('rollup-plugin-esbuild').then(({ minify: minify2 }) => minify2(noTypeResolvedMinifyOptions)) : resolvedMinifyOptions.type === "swc" ? import('rollup-plugin-swc3').then(({ minify: minify2 }) => minify2(noTypeResolvedMinifyOptions)) : import('@rollup/plugin-terser').then(({ default: minify2 }) => minify2(noTypeResolvedMinifyOptions));
4676
- const notOnlyOncePlugins = output.plugins;
4677
4677
  return minify === "only-minify" ? [{
4678
4678
  ...output,
4679
4679
  // TODO replace suffix when pubish to npm and the `build.output.minify` is 'only-minify'
@@ -4682,6 +4682,7 @@ const withMinify = (output, onlyOncePlugins = []) => {
4682
4682
  throw new Error("entryFileNames must be a function");
4683
4683
  })(),
4684
4684
  plugins: [
4685
+ ...output.plugins,
4685
4686
  ...notOnlyOncePlugins,
4686
4687
  minifyPlugin
4687
4688
  ]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jiek",
3
3
  "type": "module",
4
- "version": "2.2.0",
4
+ "version": "2.2.1",
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",
@@ -83,8 +83,8 @@
83
83
  "jsonc-parser": "^3.2.1",
84
84
  "koa": "^2.15.3",
85
85
  "rollup": "^4.0.0",
86
- "@jiek/pkger": "^0.2.1",
87
- "@jiek/utils": "^0.2.3"
86
+ "@jiek/utils": "^0.2.3",
87
+ "@jiek/pkger": "^0.2.1"
88
88
  },
89
89
  "peerDependenciesMeta": {
90
90
  "@pnpm/filter-workspace-packages": {
@@ -199,9 +199,12 @@ const withMinify = (
199
199
  onlyOncePlugins: OutputPluginOption[] = []
200
200
  ): OutputOptions[] => {
201
201
  const minify = build?.output?.minify ?? MINIFY_DEFAULT_VALUE
202
+
202
203
  output.plugins = output.plugins ?? []
204
+ const notOnlyOncePlugins = [...output.plugins]
205
+ output.plugins.push(...onlyOncePlugins)
206
+
203
207
  if (minify === false) {
204
- output.plugins.push(...onlyOncePlugins)
205
208
  return [output]
206
209
  }
207
210
 
@@ -213,7 +216,6 @@ const withMinify = (
213
216
  ? import('rollup-plugin-swc3').then(({ minify }) => minify(noTypeResolvedMinifyOptions as any))
214
217
  // eslint-disable-next-line ts/no-unsafe-argument
215
218
  : import('@rollup/plugin-terser').then(({ default: minify }) => minify(noTypeResolvedMinifyOptions as any))
216
- const notOnlyOncePlugins = output.plugins
217
219
  return minify === 'only-minify'
218
220
  ? [{
219
221
  ...output,
@@ -226,6 +228,7 @@ const withMinify = (
226
228
  throw new Error('entryFileNames must be a function')
227
229
  })(),
228
230
  plugins: [
231
+ ...output.plugins,
229
232
  ...notOnlyOncePlugins,
230
233
  minifyPlugin
231
234
  ]