@corva/create-app 0.63.0-0 → 0.63.0-2

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.
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const { sync: spawnSync } = require('cross-spawn');
4
- const { resolve } = require('path');
5
4
 
6
5
  const cmd = 'node';
7
6
  const originalCwd = process.cwd();
@@ -13,7 +12,7 @@ const preparedOriginalArgs = process.argv
13
12
  // after changing the cwd need to pass the original path
14
13
  .concat(['--original-cwd', originalCwd])
15
14
  // leave spaces in place for arguments
16
- .map(a => (a.includes(' ') ? `"${a}"` : a));
15
+ .map((a) => (a.includes(' ') ? `"${a}"` : a));
17
16
 
18
17
  const args = ['--no-warnings', '--experimental-json-modules', 'cca.js'].concat(preparedOriginalArgs);
19
18
 
@@ -77,7 +77,8 @@ const transformPatternsIntoFileNames = async (dirName, patterns, ignoredFiles =
77
77
  */
78
78
  const resolveDataToZipUiApp = async (itemsToZip = [], { options, pkg, dirName, manifest }) => {
79
79
  const version = await getIncreasedVersion(pkg.version, options);
80
- const zipFileName = `${manifest.unix_name}-${version}.zip`;
80
+ const randomSuffix = generateRandomString(); // Random suffix is needed to not cause a conflict when we call 2 parallel commands at the same time.
81
+ const zipFileName = `${manifest.unix_name}-${version}-${randomSuffix}.zip`;
81
82
  const itemsToSave = [];
82
83
  const shouldUpdateVersion = version !== pkg.version;
83
84
 
@@ -93,12 +94,7 @@ const resolveDataToZipUiApp = async (itemsToZip = [], { options, pkg, dirName, m
93
94
  });
94
95
  }
95
96
 
96
- /**
97
- * Note: This random suffix is needed to not cause a conflict when
98
- * we call 2 parallel commands at the same time.
99
- * Example: CI simulteniously runs the release command to both QA and Prod envs
100
- */
101
- const tmpPackageForSourceName = `packageForSource_${generateRandomString()}.json`;
97
+ const tmpPackageForSourceName = `packageForSource_${randomSuffix}.json`;
102
98
 
103
99
  itemsToSave.push({
104
100
  name: tmpPackageForSourceName,
@@ -82,7 +82,7 @@ const semverVersionsMapping = {
82
82
  */
83
83
  export const resolveAppRuntime = (opts) => {
84
84
  if (opts.appType === APP_TYPES.UI) {
85
- const version = '16';
85
+ const version = '18';
86
86
 
87
87
  return {
88
88
  language: opts.useTypescript ? 'typescript' : 'javascript',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/create-app",
3
- "version": "0.63.0-0",
3
+ "version": "0.63.0-2",
4
4
  "private": false,
5
5
  "description": "Create an app to use it in CORVA.AI",
6
6
  "keywords": [
@@ -33,7 +33,8 @@
33
33
  "lint": "eslint . --resolve-plugins-relative-to $(pwd) --max-warnings 0",
34
34
  "lint:fix": "eslint . --fix",
35
35
  "release": "git add -A && standard-version -a",
36
- "release-rc": "npm run release -- --prerelease"
36
+ "release-rc": "npm run release -- --prerelease",
37
+ "test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest"
37
38
  },
38
39
  "lint-staged": {
39
40
  "*.js": "npm run lint:fix"
@@ -69,6 +70,7 @@
69
70
  "@corva/eslint-config-node": "^5.1.1",
70
71
  "@corva/node-sdk": "^8.0.1",
71
72
  "@types/cross-spawn": "^6.0.2",
73
+ "@types/jest": "^29.5.4",
72
74
  "@typescript-eslint/eslint-plugin": "^5.42.1",
73
75
  "@typescript-eslint/parser": "^5.42.1",
74
76
  "conventional-changelog-cli": "^2.1.0",
@@ -83,11 +85,12 @@
83
85
  "eslint-plugin-react-hooks": "^4.6.0",
84
86
  "eslint-plugin-require-sort": "^1.3.0",
85
87
  "husky": "^8.0.2",
86
- "jest": "^29.3.1",
88
+ "jest": "^29.6.4",
87
89
  "prettier": "^2.0.0",
88
90
  "prettier-plugin-packagejson": "^2.3.0",
89
91
  "standard-version": "^9.0.0",
90
- "typescript": "^4.8.4"
92
+ "typescript": "^4.8.4",
93
+ "zx": "^7.2.3"
91
94
  },
92
95
  "engines": {
93
96
  "node": ">=16"
@@ -1,4 +1,5 @@
1
1
  {
2
+ "root": true,
2
3
  "extends": "@corva/eslint-config-browser",
3
4
  "parserOptions": {
4
5
  "requireConfigFile": false,
@@ -1,4 +1,5 @@
1
1
  {
2
+ "root": true,
2
3
  "parser": "@typescript-eslint/parser",
3
4
  "parserOptions": {
4
5
  "ecmaVersion": 2020,