@servicetitan/startup 22.7.0 → 22.8.0

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.
@@ -11,7 +11,7 @@ const getDefaultBuildVersion = (branchName, commitHash) => {
11
11
  if (/^\d+$/.test(ch)) {
12
12
  ch = parseInt(ch, 10).toString(10);
13
13
  }
14
- return `${branchName}.${ch}`;
14
+ return `${branchName.replace(/\W/g, '')}.${ch}`;
15
15
  };
16
16
  exports.getDefaultBuildVersion = getDefaultBuildVersion;
17
17
  //# sourceMappingURL=publish.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../src/cli/utils/publish.ts"],"names":[],"mappings":";;;AAAO,MAAM,sBAAsB,GAAG,CAAC,UAAkB,EAAE,UAAkB,EAAE,EAAE;IAC7E,IAAI,EAAE,GAAG,UAAU,CAAC;IAEpB;;;;OAIG;IACH,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;QAClB,EAAE,GAAG,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;KACtC;IACD,OAAO,GAAG,UAAU,IAAI,EAAE,EAAE,CAAC;AACjC,CAAC,CAAC;AAZW,QAAA,sBAAsB,0BAYjC"}
1
+ {"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../src/cli/utils/publish.ts"],"names":[],"mappings":";;;AAAO,MAAM,sBAAsB,GAAG,CAAC,UAAkB,EAAE,UAAkB,EAAE,EAAE;IAC7E,IAAI,EAAE,GAAG,UAAU,CAAC;IAEpB;;;;OAIG;IACH,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;QAClB,EAAE,GAAG,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;KACtC;IACD,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;AACpD,CAAC,CAAC;AAZW,QAAA,sBAAsB,0BAYjC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/startup",
3
- "version": "22.7.0",
3
+ "version": "22.8.0",
4
4
  "description": "",
5
5
  "homepage": "https://docs.st.dev/docs/frontend/startup",
6
6
  "repository": {
@@ -32,12 +32,12 @@
32
32
  "@types/yargs": "~17.0.24"
33
33
  },
34
34
  "dependencies": {
35
- "@babel/preset-env": "~7.22.4",
35
+ "@babel/preset-env": "~7.22.5",
36
36
  "@jest/core": "~27.5.1",
37
37
  "@jest/types": "~27.5.1",
38
38
  "@lerna/exec": "~5.6.2",
39
- "@servicetitan/eslint-config": "22.7.0",
40
- "@servicetitan/stylelint-config": "22.7.0",
39
+ "@servicetitan/eslint-config": "22.8.0",
40
+ "@servicetitan/stylelint-config": "22.8.0",
41
41
  "@types/jest": "~27.4.0",
42
42
  "chalk": "~4.1.2",
43
43
  "chokidar": "~3.5.3",
@@ -49,7 +49,7 @@
49
49
  "execa": "~5.1.1",
50
50
  "fork-ts-checker-webpack-plugin": "~7.3.0",
51
51
  "glob": "~7.2.0",
52
- "html-webpack-plugin": "~5.5.1",
52
+ "html-webpack-plugin": "~5.5.3",
53
53
  "identity-obj-proxy": "~3.0.0",
54
54
  "jest": "~27.5.1",
55
55
  "jest-circus": "~27.5.1",
@@ -63,7 +63,7 @@
63
63
  "moment-locales-webpack-plugin": "~1.2.0",
64
64
  "portfinder": "~1.0.28",
65
65
  "prettier": "~2.7.1",
66
- "sass": "~1.62.1",
66
+ "sass": "~1.63.4",
67
67
  "sass-loader": "~12.6.0",
68
68
  "source-map-loader": "~3.0.1",
69
69
  "style-loader": "~3.3.3",
@@ -76,7 +76,7 @@
76
76
  "username": "~5.1.0",
77
77
  "webpack": "~5.78.0",
78
78
  "webpack-assets-manifest": "~5.1.0",
79
- "webpack-bundle-analyzer": "^4.8.0",
79
+ "webpack-bundle-analyzer": "^4.9.0",
80
80
  "webpack-dev-server": "~3.11.2",
81
81
  "webpack-filter-warnings-plugin": "~1.2.1",
82
82
  "webpack-merge": "~5.9.0",
@@ -91,5 +91,5 @@
91
91
  "cli": {
92
92
  "webpack": false
93
93
  },
94
- "gitHead": "e519bdec4693b7eeea5686ce40e418175b7930c5"
94
+ "gitHead": "21ecb06c077ea32b3f6babf3b1ac988c0076d7e2"
95
95
  }
@@ -13,4 +13,7 @@ describe('[Startup] utils:publish:getDefaultBuildVersion', () => {
13
13
  test('returns correct version for numeric identifiers', () => {
14
14
  expect(getDefaultBuildVersion('xxx', '1234')).toEqual('xxx.1234');
15
15
  });
16
+ test('removes non alphanumeric characters from branch name', () => {
17
+ expect(getDefaultBuildVersion('xxx/yyy', '1234')).toEqual('xxxyyy.1234');
18
+ });
16
19
  });
@@ -9,5 +9,5 @@ export const getDefaultBuildVersion = (branchName: string, commitHash: string) =
9
9
  if (/^\d+$/.test(ch)) {
10
10
  ch = parseInt(ch, 10).toString(10);
11
11
  }
12
- return `${branchName}.${ch}`;
12
+ return `${branchName.replace(/\W/g, '')}.${ch}`;
13
13
  };
@@ -0,0 +1,18 @@
1
+ {
2
+ // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3
+ // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
4
+
5
+ // List of extensions which should be recommended for users of this workspace.
6
+ "recommendations": [
7
+ "dbaeumer.vscode-eslint",
8
+ "esbenp.prettier-vscode",
9
+ "stylelint.vscode-stylelint",
10
+ "editorconfig.editorconfig",
11
+ "yoavbls.pretty-ts-errors",
12
+ "streetsidesoftware.code-spell-checker",
13
+ "eamodio.gitlens",
14
+ "pomber.git-file-history"
15
+ ],
16
+ // List of extensions recommended by VS Code that should not be recommended for users of this workspace.
17
+ "unwantedRecommendations": []
18
+ }
@@ -1,44 +1,22 @@
1
- const { execSync, spawnSync } = require('child_process');
1
+ const { spawnSync } = require('child_process');
2
2
 
3
- if (checkNpm()) {
4
- run('npm', ['i', '--no-audit', '--legacy-peer-deps']);
5
- } else {
6
- console.log(
7
- '\x1b[31m%s\x1b[0m',
8
- "Heads up! Your version of npm is outdated. Package installation is using npx to run npm v7, but you can install it directly by running 'npm i npm@7 -g' to make the process faster next time! \n"
9
- );
10
- run('npx', [
11
- '--cache',
12
- '"./node_modules/.npx-cache/"',
13
- 'npm@7',
14
- 'i',
15
- '--no-audit',
16
- '--legacy-peer-deps',
17
- ]);
18
- }
19
-
20
- function checkNpm() {
21
- try {
22
- const v = execSync('npm -v', { timeout: 10000 });
3
+ // CI env variable is automatically set by github actions ci
4
+ const installCommand = process.env.CI ? 'ci' : 'i';
23
5
 
24
- if (v == null) {
25
- return false;
26
- }
6
+ bootstrap();
27
7
 
28
- return v.toString().split('.')[0] >= 7;
29
- } catch (e) {
30
- return false;
31
- }
8
+ function bootstrap() {
9
+ run('npm', [installCommand]);
32
10
  }
33
11
 
34
12
  function run(command, args) {
35
- const { error, status } = spawnSync(command, args, { stdio: 'inherit', shell: true });
36
-
37
- if (error || status !== 0) {
38
- process.exitCode = status || 1;
39
-
40
- if (error) {
41
- throw error;
42
- }
13
+ // eslint-disable-next-line no-console
14
+ console.log('Run command:', command, args.join(' '));
15
+ const r = spawnSync(command, args, { stdio: 'inherit', shell: true });
16
+ if (r && r.error) {
17
+ throw r.error;
18
+ }
19
+ if (r && r.status !== 0) {
20
+ process.exit(r.status);
43
21
  }
44
22
  }
@@ -1,6 +1,5 @@
1
1
  {
2
- "packages": [
3
- "packages/*"
4
- ],
5
- "version": "0.0.0"
2
+ "packages": ["packages/*"],
3
+ "version": "0.0.0",
4
+ "useWorkspaces": true
6
5
  }
@@ -3,6 +3,10 @@
3
3
  "version": "0.0.0",
4
4
  "description": "Multi-package web application template",
5
5
  "private": true,
6
+ "engines": {
7
+ "node": ">=16",
8
+ "npm": ">=7"
9
+ },
6
10
  "scripts": {
7
11
  "bootstrap": "node bootstrap.js",
8
12
  "prestart": "npm run bootstrap",