create-sitecore-jss 22.2.2-canary.1 → 22.2.2-canary.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.
@@ -45,6 +45,7 @@ const ejs_1 = require("ejs");
45
45
  const inquirer_1 = __importDefault(require("inquirer"));
46
46
  const helpers_1 = require("../utils/helpers");
47
47
  const diff_1 = require("diff");
48
+ const { version } = require('../../../package.json');
48
49
  const FILE_FOR_COPY_REGEXP = /(index\.html)$|\.(gif|jpg|jpeg|tiff|png|svg|ashx|ico|pdf|jar|eot|woff|ttf|woff2)$/;
49
50
  const transformFilename = (file, args) => {
50
51
  // eslint-disable-next-line guard-for-in
@@ -198,8 +199,12 @@ const transform = (templatePath, answers, options = {}) => __awaiter(void 0, voi
198
199
  if (!answers.appPrefix) {
199
200
  answers.appPrefix = false;
200
201
  }
202
+ // Don't expose canary build number in the generated app
203
+ const jssVersion = version.includes('canary')
204
+ ? version.replace(/(-canary\.\d+)$/, '-canary')
205
+ : version;
201
206
  // pass in helper to answers object
202
- const ejsData = Object.assign(Object.assign({}, answers), { helper: {
207
+ const ejsData = Object.assign(Object.assign({}, answers), { version: jssVersion, helper: {
203
208
  isDev: (0, helpers_1.isDevEnvironment)(answers.destination),
204
209
  getPascalCaseName: helpers_1.getPascalCaseName,
205
210
  getAppPrefix: helpers_1.getAppPrefix,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "<%- appName %>",
3
- "version": "22.2.2-canary",
3
+ "version": "<%- version %>",
4
4
  "description": "Application utilizing Sitecore JavaScript Services and Angular (angular-cli).",
5
5
  "config": {
6
6
  "appName": "<%- appName %>",
@@ -60,7 +60,7 @@
60
60
  "@apollo/client": "^3.3.12",
61
61
  "@ngx-translate/core": "~15.0.0",
62
62
  "@ngx-translate/http-loader": "~8.0.0",
63
- "@sitecore-jss/sitecore-jss-angular": "~22.2.2-canary",
63
+ "@sitecore-jss/sitecore-jss-angular": "~<%- version %>",
64
64
  "apollo-angular": "~6.0.0",
65
65
  "bootstrap": "^5.3.3",
66
66
  "core-js": "~3.37.1",
@@ -82,9 +82,9 @@
82
82
  "@angular/cli": "~17.3.8",
83
83
  "@angular/compiler-cli": "~17.3.11",
84
84
  "@angular/language-service": "~17.3.11",
85
- "@sitecore-jss/sitecore-jss-angular-schematics": "~22.2.2-canary",
86
- "@sitecore-jss/sitecore-jss-cli": "~22.2.2-canary",
87
- "@sitecore-jss/sitecore-jss-dev-tools": "~22.2.2-canary",
85
+ "@sitecore-jss/sitecore-jss-angular-schematics": "~<%- version %>",
86
+ "@sitecore-jss/sitecore-jss-cli": "~<%- version %>",
87
+ "@sitecore-jss/sitecore-jss-dev-tools": "~<%- version %>",
88
88
  "@types/isomorphic-fetch": "0.0.35",
89
89
  "@types/jasmine": "~3.6.7",
90
90
  "@types/jasminewd2": "~2.0.8",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "<%- appName %>",
3
3
  "description": "Application utilizing Sitecore JavaScript Services and Next.js",
4
- "version": "22.2.2-canary",
4
+ "version": "<%- version %>",
5
5
  "private": true,
6
6
  "config": {
7
7
  "appName": "<%- appName %>",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
- "@sitecore-jss/sitecore-jss-nextjs": "~22.2.2-canary",
28
+ "@sitecore-jss/sitecore-jss-nextjs": "~<%- version %>",
29
29
  "graphql": "~15.8.0",
30
30
  "graphql-tag": "^2.12.6",
31
31
  "next": "^14.2.7",
@@ -43,8 +43,8 @@
43
43
  "@graphql-codegen/typescript-operations": "^4.0.1",
44
44
  "@graphql-codegen/typescript-resolvers": "^4.0.1",
45
45
  "@graphql-typed-document-node/core": "^3.2.0",
46
- "@sitecore-jss/sitecore-jss-cli": "~22.2.2-canary",
47
- "@sitecore-jss/sitecore-jss-dev-tools": "~22.2.2-canary",
46
+ "@sitecore-jss/sitecore-jss-cli": "~<%- version %>",
47
+ "@sitecore-jss/sitecore-jss-dev-tools": "~<%- version %>",
48
48
  "@types/node": "^20.14.2",
49
49
  "@types/react": "^18.2.22",
50
50
  "@types/react-dom": "^18.0.5",
@@ -4,7 +4,7 @@
4
4
  "nprogress": "~0.2.0"
5
5
  },
6
6
  "devDependencies": {
7
- "@sitecore-jss/sitecore-jss-dev-tools": "~22.2.2-canary",
7
+ "@sitecore-jss/sitecore-jss-dev-tools": "~<%- version %>",
8
8
  "@types/nprogress": "^0.2.0"
9
9
  },
10
10
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-headless-ssr-experience-edge-sample",
3
- "version": "22.2.2-canary",
3
+ "version": "<%- version %>",
4
4
  "description": "Node server-side-rendering sample for running JSS apps under Node hosting using Experience Edge",
5
5
  "scripts": {
6
6
  "start": "ts-node ./src/index.ts"
@@ -19,7 +19,7 @@
19
19
  "homepage": "https://jss.sitecore.com",
20
20
  "license": "Apache-2.0",
21
21
  "dependencies": {
22
- "@sitecore-jss/sitecore-jss": "~22.2.2-canary",
22
+ "@sitecore-jss/sitecore-jss": "~<%- version %>",
23
23
  "compression": "^1.7.4",
24
24
  "express": "^4.18.2",
25
25
  "dotenv": "^16.0.3"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-headless-ssr-proxy-sample",
3
- "version": "22.2.2-canary",
3
+ "version": "<%- version %>",
4
4
  "description": "Node server-side-rendering proxy sample for running JSS apps under Node hosting",
5
5
  "scripts": {
6
6
  "start": "ts-node ./src/index.ts"
@@ -19,8 +19,8 @@
19
19
  "homepage": "https://jss.sitecore.com",
20
20
  "license": "Apache-2.0",
21
21
  "dependencies": {
22
- "@sitecore-jss/sitecore-jss": "~22.2.2-canary",
23
- "@sitecore-jss/sitecore-jss-proxy": "~22.2.2-canary",
22
+ "@sitecore-jss/sitecore-jss": "~<%- version %>",
23
+ "@sitecore-jss/sitecore-jss-proxy": "~<%- version %>",
24
24
  "agentkeepalive": "^4.2.1",
25
25
  "compression": "~1.7.4",
26
26
  "express": "~4.19.2",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "<%- appName %>",
3
3
  "description": "Application utilizing Sitecore JavaScript Services and React (create-react-app).",
4
- "version": "22.2.2-canary",
4
+ "version": "<%- version %>",
5
5
  "private": true,
6
6
  "config": {
7
7
  "appName": "<%- appName %>",
@@ -28,7 +28,7 @@
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
30
  "@apollo/client": "^3.7.1",
31
- "@sitecore-jss/sitecore-jss-react": "~22.2.2-canary",
31
+ "@sitecore-jss/sitecore-jss-react": "~<%- version %>",
32
32
  "axios": "^1.2.0",
33
33
  "bootstrap": "^5.2.3",
34
34
  "cross-fetch": "^3.1.5",
@@ -53,9 +53,9 @@
53
53
  "@babel/preset-env": "^7.20.2",
54
54
  "@babel/preset-react": "^7.18.6",
55
55
  "@babel/register": "~7.18.9",
56
- "@sitecore-jss/sitecore-jss-cli": "~22.2.2-canary",
57
- "@sitecore-jss/sitecore-jss-dev-tools": "~22.2.2-canary",
58
- "@sitecore-jss/sitecore-jss-rendering-host": "~22.2.2-canary",
56
+ "@sitecore-jss/sitecore-jss-cli": "~<%- version %>",
57
+ "@sitecore-jss/sitecore-jss-dev-tools": "~<%- version %>",
58
+ "@sitecore-jss/sitecore-jss-rendering-host": "~<%- version %>",
59
59
  "babel-loader": "~9.1.0",
60
60
  "babel-preset-react-app": "~10.0.1",
61
61
  "chalk": "~4.1.2",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "<%- appName %>",
3
- "version": "22.2.2-canary",
3
+ "version": "<%- version %>",
4
4
  "description": "A basic React Native app utilizing Sitecore JavaScript Services",
5
5
  "config": {
6
6
  "appName": "<%- appName %>",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@react-native-community/masked-view": "^0.1.10",
26
- "@sitecore-jss/sitecore-jss-react-native": "~22.2.2-canary",
26
+ "@sitecore-jss/sitecore-jss-react-native": "~<%- version %>",
27
27
  "prop-types": "^15.6.0",
28
28
  "react": "16.13.1",
29
29
  "react-native": "^0.63.4",
@@ -37,8 +37,8 @@
37
37
  },
38
38
  "private": true,
39
39
  "devDependencies": {
40
- "@sitecore-jss/sitecore-jss-cli": "~22.2.2-canary",
41
- "@sitecore-jss/sitecore-jss-dev-tools": "~22.2.2-canary",
40
+ "@sitecore-jss/sitecore-jss-cli": "~<%- version %>",
41
+ "@sitecore-jss/sitecore-jss-dev-tools": "~<%- version %>",
42
42
  "babel-core": "^6.26.0",
43
43
  "babel-eslint": "^8.2.1",
44
44
  "babel-plugin-inline-replace-variables": "^1.3.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "<%- appName %>",
3
- "version": "22.2.2-canary",
3
+ "version": "<%- version %>",
4
4
  "description": "Application utilizing Sitecore JavaScript Services and Vue (vue-cli).",
5
5
  "private": true,
6
6
  "config": {
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@apollo/client": "^3.7.4",
47
47
  "@panter/vue-i18next": "~0.15.2",
48
- "@sitecore-jss/sitecore-jss-vue": "~22.2.2-canary",
48
+ "@sitecore-jss/sitecore-jss-vue": "~<%- version %>",
49
49
  "@vue/apollo-composable": "4.0.0-beta.2",
50
50
  "@vue/apollo-option": "^4.0.0-alpha.20",
51
51
  "@vue/apollo-ssr": "^4.0.0-alpha.18",
@@ -64,8 +64,8 @@
64
64
  "devDependencies": {
65
65
  "@babel/eslint-parser": "^7.19.1",
66
66
  "@babel/register": "7.18.9",
67
- "@sitecore-jss/sitecore-jss-cli": "~22.2.2-canary",
68
- "@sitecore-jss/sitecore-jss-dev-tools": "~22.2.2-canary",
67
+ "@sitecore-jss/sitecore-jss-cli": "~<%- version %>",
68
+ "@sitecore-jss/sitecore-jss-dev-tools": "~<%- version %>",
69
69
  "@vue/cli-plugin-babel": "~5.0.8",
70
70
  "@vue/cli-plugin-eslint": "~5.0.8",
71
71
  "@vue/cli-service": "~5.0.8",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sitecore-jss",
3
- "version": "22.2.2-canary.1",
3
+ "version": "22.2.2-canary.2",
4
4
  "description": "Sitecore JSS initializer",
5
5
  "bin": "./dist/index.js",
6
6
  "scripts": {
@@ -50,6 +50,7 @@
50
50
  "@types/minimist": "^1.2.2",
51
51
  "@types/mocha": "^10.0.1",
52
52
  "@types/node": "^20.14.2",
53
+ "@types/proxyquire": "^1.3.31",
53
54
  "@types/sinon": "10.0.6",
54
55
  "@types/sinon-chai": "^3.2.9",
55
56
  "chai": "^4.3.7",
@@ -58,10 +59,11 @@
58
59
  "eslint": "^8.32.0",
59
60
  "mocha": "^10.2.0",
60
61
  "nyc": "^15.1.0",
62
+ "proxyquire": "^2.1.3",
61
63
  "sinon": "^15.0.1",
62
64
  "sinon-chai": "^3.7.0",
63
65
  "ts-node": "^10.9.1",
64
66
  "typescript": "~4.9.5"
65
67
  },
66
- "gitHead": "97e99adb31501ade767e6a955f913caa6715854b"
68
+ "gitHead": "a03eaf5e764b7e6f499d0ab4a7baf7ec0f0f04b2"
67
69
  }