@bigcommerce/stencil-cli 5.2.4 → 5.3.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.
@@ -26,7 +26,7 @@ const applyExternalPath = (templateName, templates) => {
26
26
  const replacePartialNames = (content, partialRoute) => {
27
27
  return content.replace(
28
28
  includeRegex,
29
- (__, partialName) => `{{> ${defineBaseRoute(partialRoute)}/${partialName} }}`,
29
+ (__, partialName) => `{{> '${defineBaseRoute(partialRoute)}/${partialName}' }}`,
30
30
  );
31
31
  };
32
32
  const trimPartial = (partial) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigcommerce/stencil-cli",
3
- "version": "5.2.4",
3
+ "version": "5.3.0",
4
4
  "description": "CLI tool to run BigCommerce Stores locally for theme development.",
5
5
  "main": "index.js",
6
6
  "engines": {
@@ -11,7 +11,8 @@
11
11
  "lint": "eslint . && prettier --check . --ignore-unknown",
12
12
  "lint-and-fix": "eslint . --fix && prettier --write . --ignore-unknown",
13
13
  "test": "jest",
14
- "test-with-coverage": "jest --coverage --verbose"
14
+ "test-with-coverage": "jest --coverage --verbose",
15
+ "release": "semantic-release"
15
16
  },
16
17
  "bin": {
17
18
  "stencil": "./bin/stencil.js",
@@ -67,6 +68,7 @@
67
68
  "front-matter": "^4.0.2",
68
69
  "glob": "^7.1.6",
69
70
  "graceful-fs": "^4.2.4",
71
+ "husky": "^8.0.1",
70
72
  "image-size": "^0.9.1",
71
73
  "inquirer": "^8.1.5",
72
74
  "js-yaml": "^4.1.0",
@@ -86,8 +88,14 @@
86
88
  "yauzl": "^2.10.0"
87
89
  },
88
90
  "devDependencies": {
89
- "@commitlint/cli": "^11.0.0",
90
- "@commitlint/config-conventional": "^11.0.0",
91
+ "@commitlint/cli": "^17.1.2",
92
+ "@commitlint/config-conventional": "^17.1.0",
93
+ "@semantic-release/changelog": "^6.0.1",
94
+ "@semantic-release/commit-analyzer": "^9.0.2",
95
+ "@semantic-release/git": "^10.0.1",
96
+ "@semantic-release/github": "^8.0.6",
97
+ "@semantic-release/npm": "^9.0.1",
98
+ "@semantic-release/release-notes-generator": "^10.0.3",
91
99
  "axios-mock-adapter": "^1.21.2",
92
100
  "conventional-changelog-cli": "^2.2.2",
93
101
  "eslint": "^7.10.0",
@@ -97,18 +105,9 @@
97
105
  "eslint-plugin-jest": "^24.0.2",
98
106
  "eslint-plugin-node": "^11.1.0",
99
107
  "eslint-plugin-prettier": "^3.1.4",
100
- "husky": "^4.3.0",
101
108
  "jest": "^27.5.1",
102
- "lint-staged": "^10.4.0",
103
- "prettier": "2.1.2"
104
- },
105
- "husky": {
106
- "hooks": {
107
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
108
- "pre-commit": "lint-staged"
109
- }
110
- },
111
- "lint-staged": {
112
- "*": "npm run lint-and-fix"
109
+ "prettier": "2.1.2",
110
+ "semantic-release": "^19.0.5",
111
+ "semantic-release-github-pullrequest": "^1.3.0"
113
112
  }
114
113
  }
@@ -71,14 +71,18 @@ internals.sha1sum = (input) => {
71
71
  */
72
72
  internals.getResponse = async (request) => {
73
73
  const storeUrlObj = new URL(request.app.storeUrl);
74
+ const fullUrl = Object.assign(new URL(request.url.toString()), {
75
+ port: storeUrlObj.port,
76
+ host: storeUrlObj.host,
77
+ protocol: storeUrlObj.protocol,
78
+ });
79
+ const withoutPageQuery = new URL(fullUrl.toString());
80
+ withoutPageQuery.searchParams.delete('page');
81
+
74
82
  const { customLayouts } = internals.options;
75
83
 
76
84
  const httpOpts = {
77
- url: Object.assign(new URL(request.url.toString()), {
78
- port: storeUrlObj.port,
79
- host: storeUrlObj.host,
80
- protocol: storeUrlObj.protocol,
81
- }).toString(),
85
+ url: withoutPageQuery.toString(),
82
86
  headers: internals.buildReqHeaders({
83
87
  request,
84
88
  stencilOptions: { get_template_file: true, get_data_only: true },
@@ -95,7 +99,7 @@ internals.getResponse = async (request) => {
95
99
  };
96
100
 
97
101
  const responseArgs = {
98
- httpOpts,
102
+ httpOpts: { ...httpOpts, url: fullUrl.toString() },
99
103
  storeUrlObj,
100
104
  };
101
105