arui-scripts 12.5.0-alfa.0 → 13.1.0-yarn2.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/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ # [13.1.0-yarn2.1](https://git.moscow.alfaintra.net/ef/arui-scripts/compare/v13.0.0...v13.1.0-yarn2.1) (2022-07-28)
2
+
3
+
4
+ ### Features
5
+
6
+ * **commands:** add yarn 2 support ([7773e38](https://git.moscow.alfaintra.net/ef/arui-scripts/commit/7773e38864652805e6e3bc672b36a04298915123))
7
+
8
+ # [13.0.0](https://git.moscow.alfaintra.net/ef/arui-scripts/compare/v12.5.0...v13.0.0) (2022-07-11)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **server:** disable minimization of server ([30e211b](https://git.moscow.alfaintra.net/ef/arui-scripts/commit/30e211ba8ae306164c33a262f48444972383e2f7))
14
+
15
+
16
+ ### Features
17
+
18
+ * **server:** disable source-map support banner by default ([c486695](https://git.moscow.alfaintra.net/ef/arui-scripts/commit/c486695d30b4fd7c96c891b1920a67db8c47d854))
19
+
20
+
21
+ ### BREAKING CHANGES
22
+
23
+ * **server:** source-map-support banner is no longer added by default
24
+ source-map-support significantly slow down code, especially if you use exceptions. In case you still need it you can use `installServerSourceMaps` option
25
+
1
26
  ## [12.4.1](https://git.moscow.alfaintra.net/ef/arui-scripts/compare/v12.4.0...v12.4.1) (2022-06-07)
2
27
 
3
28
 
package/README.md CHANGED
@@ -66,6 +66,7 @@ npm install arui-scripts --save-dev
66
66
  - `useServerHMR` - использовать ли HotModuleReplacement для сервера. По умолчанию `false`.
67
67
  - `clientServerPort` - порт WebpackDevServer и nginx итогового контейнера. По умолчанию `8080`.
68
68
  - `serverPort` - порт нодового сервера. Нужен для правильного проксирования запросов от дев сервера и nginx. По умолчанию `3000`.
69
+ - `installServerSourceMaps` - добавлять ли в серверную сборку пакет `source-map-support`. По умолчанию `false`.
69
70
  - `additionalBuildPath` - массив путей, которые попадут в архив при использовании команды `archive-build`. По умолчанию `['config']`.
70
71
  - `archiveName` - имя архива, который будет создан при использовании команды `archive-build`. По умолчанию `build.tar`.
71
72
  - `keepPropTypes` - если `true`, пакеты с prop-types не будут удалены из production билда.
@@ -51,7 +51,14 @@ const packageJsonPath = path_1.default.join(app_configs_1.default.cwd, packageJs
51
51
  console.time('Remove build dependencies time');
52
52
  // if yarn is available prune dev dependencies with yarn, otherwise use npm
53
53
  if (app_configs_1.default.useYarn && shelljs_1.default.which('yarn')) {
54
- yield exec_1.default('yarn install --production --ignore-optional --frozen-lockfile --ignore-scripts --prefer-offline');
54
+ try {
55
+ // if yarn 1 is used
56
+ yield exec_1.default('yarn install --production --ignore-optional --frozen-lockfile --ignore-scripts --prefer-offline');
57
+ }
58
+ catch (_a) {
59
+ // if yarn 2 is used
60
+ yield exec_1.default('yarn workspaces focus --production --all');
61
+ }
55
62
  }
56
63
  else {
57
64
  yield exec_1.default('npm prune --production');
@@ -74,7 +74,14 @@ const imageFullName = `${dockerRegistry ? `${dockerRegistry}/` : ''}${imageName}
74
74
  console.time('Remove dev dependencies time');
75
75
  // if yarn is available prune dev dependencies with yarn, otherwise use npm
76
76
  if (app_configs_1.default.useYarn && shelljs_1.default.which('yarn')) {
77
- yield exec_1.default('yarn install --production --ignore-optional --frozen-lockfile --ignore-scripts --prefer-offline');
77
+ try {
78
+ // if yarn 1 is used
79
+ yield exec_1.default('yarn install --production --ignore-optional --frozen-lockfile --ignore-scripts --prefer-offline');
80
+ }
81
+ catch (_a) {
82
+ // if yarn 2 is used
83
+ yield exec_1.default('yarn workspaces focus --production --all');
84
+ }
78
85
  }
79
86
  else {
80
87
  yield exec_1.default('npm prune --production');
@@ -52,6 +52,7 @@ function getDefaults() {
52
52
  useYarn: fs_1.default.existsSync(yarnLockFilePath),
53
53
  clientServerPort: 8080,
54
54
  serverPort: 3000,
55
+ installServerSourceMaps: false,
55
56
  debug: false,
56
57
  overridesPath: overridesPath ? [overridesPath] : [],
57
58
  statsOutputFilename: 'stats.json',
@@ -26,6 +26,7 @@ export declare type AppConfigs = {
26
26
  useYarn: boolean;
27
27
  clientServerPort: number;
28
28
  serverPort: number;
29
+ installServerSourceMaps: boolean;
29
30
  debug: boolean;
30
31
  overridesPath: string[];
31
32
  statsOutputFilename: string;
@@ -68,6 +68,9 @@ const config = apply_overrides_1.default(['webpack', 'webpackServer', 'webpackPr
68
68
  // dependencies list from package.json
69
69
  modulesFromFile: true,
70
70
  })],
71
+ optimization: {
72
+ minimize: false,
73
+ },
71
74
  resolve: {
72
75
  // This allows you to set a fallback for where Webpack should look for modules.
73
76
  // We placed these paths second because we want `node_modules` to "win"
@@ -182,7 +185,7 @@ const config = apply_overrides_1.default(['webpack', 'webpackServer', 'webpackPr
182
185
  raw: true,
183
186
  entryOnly: false
184
187
  }),
185
- new webpack_1.default.BannerPlugin({
188
+ app_configs_1.default.installServerSourceMaps && new webpack_1.default.BannerPlugin({
186
189
  banner: sourceMapSupportBanner,
187
190
  raw: true,
188
191
  entryOnly: false
@@ -602,8 +602,8 @@
602
602
  "affectsGlobalScope": true
603
603
  },
604
604
  "../src/configs/app-configs/types.ts": {
605
- "version": "26d68b5ad7a9a6e47346984c915611d452f560764aaec153e014bc8f6588221c",
606
- "signature": "d515261b42d96bab440c2b496fdbef1e4caf0fbdb16f32d3984d80fb37266d2d",
605
+ "version": "971c4e83c3d9e6eb875d69f26d47246934e9a9e51e4c295f37679790701b55cc",
606
+ "signature": "f1ce3ab92e7eed2176880c155177e9ada1c198b25cfda72665704103853f3935",
607
607
  "affectsGlobalScope": false
608
608
  },
609
609
  "../src/configs/util/try-resolve.ts": {
@@ -612,7 +612,7 @@
612
612
  "affectsGlobalScope": false
613
613
  },
614
614
  "../src/configs/app-configs/get-defaults.ts": {
615
- "version": "d3ac931c5bc4b57982ec4bf4505f63921b676fea862fa27f865d41afd01b4419",
615
+ "version": "0085f0e9325291e70ae41a52c4eeb53bd9ddc85d4538fb6345b1167297561d57",
616
616
  "signature": "32ce4848d302065a0608781a400430ff0f4fb5757a501c614f3ab8aaad45afd0",
617
617
  "affectsGlobalScope": false
618
618
  },
@@ -797,7 +797,7 @@
797
797
  "affectsGlobalScope": false
798
798
  },
799
799
  "../src/commands/archive-build/index.ts": {
800
- "version": "2b19da65c72de5ab026dda1bcaa7ca47aaa095115043ec3d2adb33b553f748f5",
800
+ "version": "53a1f66f56ea6840f036c80d206529fcb0cc7bb66c102f703a58aacf4849e1fd",
801
801
  "signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
802
802
  "affectsGlobalScope": false
803
803
  },
@@ -1217,7 +1217,7 @@
1217
1217
  "affectsGlobalScope": false
1218
1218
  },
1219
1219
  "../src/configs/webpack.server.prod.ts": {
1220
- "version": "31a12030bc3ac0a00a18a0d54f01110f431c46eec673d905487e8f6f70dc6076",
1220
+ "version": "c4d75b87d112706df811479c1275a2e723110b70deacd7acba94300dee97ef07",
1221
1221
  "signature": "293c406216d7a14873b09a48b71adadd5546d9060f5be7d148fe129bb57f13d1",
1222
1222
  "affectsGlobalScope": false
1223
1223
  },
@@ -1247,7 +1247,7 @@
1247
1247
  "affectsGlobalScope": false
1248
1248
  },
1249
1249
  "../src/commands/docker-build/index.ts": {
1250
- "version": "1b5c4842fdd8a6f8c3da38afa0b4eab277f567bd0161cb5cc01f707fc2f7e2a3",
1250
+ "version": "2c2ea99c9582ac64c16597b1ea91d5a4a14d767a52c55a23737b1b55ccf4dd67",
1251
1251
  "signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
1252
1252
  "affectsGlobalScope": false
1253
1253
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arui-scripts",
3
- "version": "12.5.0-alfa.0",
3
+ "version": "13.1.0-yarn2.1",
4
4
  "main": "./build/index.js",
5
5
  "typings": "./build/index.d.ts",
6
6
  "license": "MPL-2.0",