houdini 0.15.3 → 0.15.4
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 +6 -0
- package/build/cmd.js +9 -4
- package/build/common/config.js +5 -0
- package/build/preprocess-cjs/index.js +6 -1
- package/build/preprocess-esm/index.js +6 -1
- package/package.json +1 -1
- package/src/common/config.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# houdini
|
|
2
2
|
|
|
3
|
+
## 0.15.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#378](https://github.com/HoudiniGraphql/houdini/pull/378) [`6e71762`](https://github.com/HoudiniGraphql/houdini/commit/6e717629e0059cead070a92db9a6b81c91a163d2) Thanks [@AlecAivazis](https://github.com/AlecAivazis)! - always treat layout files as routes
|
|
8
|
+
|
|
3
9
|
## 0.15.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/build/cmd.js
CHANGED
|
@@ -14245,6 +14245,10 @@ For more information, visit this link: https://www.houdinigraphql.com/guides/mig
|
|
|
14245
14245
|
if (!posixify(filepath).startsWith(posixify(path$h.join(this.projectRoot, routesDir)))) {
|
|
14246
14246
|
return false;
|
|
14247
14247
|
}
|
|
14248
|
+
// always consider layouts as routes
|
|
14249
|
+
if (layout_pattern.test(path$h.parse(filepath).name)) {
|
|
14250
|
+
return true;
|
|
14251
|
+
}
|
|
14248
14252
|
// if there is a route function from the config
|
|
14249
14253
|
if (this.configIsRoute) {
|
|
14250
14254
|
return this.configIsRoute(filepath);
|
|
@@ -14635,7 +14639,8 @@ var LogLevel;
|
|
|
14635
14639
|
LogLevel["ShortSummary"] = "short-summary";
|
|
14636
14640
|
LogLevel["Quiet"] = "quiet";
|
|
14637
14641
|
})(LogLevel || (LogLevel = {}));
|
|
14638
|
-
const posixify = (str) => str.replace(/\\/g, '/');
|
|
14642
|
+
const posixify = (str) => str.replace(/\\/g, '/');
|
|
14643
|
+
const layout_pattern = /^__layout(?:-([a-zA-Z0-9_-]+))?(?:@([a-zA-Z0-9_-]+))?$/;
|
|
14639
14644
|
|
|
14640
14645
|
function getRootType(type) {
|
|
14641
14646
|
// if the type is non-null, unwrap and go again
|
|
@@ -72960,7 +72965,7 @@ export * from "${definitionsDir}"
|
|
|
72960
72965
|
|
|
72961
72966
|
async function metaGenerator(config) {
|
|
72962
72967
|
const meta = {
|
|
72963
|
-
version: '0.15.
|
|
72968
|
+
version: '0.15.4',
|
|
72964
72969
|
};
|
|
72965
72970
|
await writeFile(config.metaFilePath, JSON.stringify(meta));
|
|
72966
72971
|
}
|
|
@@ -74666,7 +74671,7 @@ async function runPipeline(config, docs) {
|
|
|
74666
74671
|
}
|
|
74667
74672
|
catch { }
|
|
74668
74673
|
// if the previous version is different from the current version
|
|
74669
|
-
const versionChanged = previousVersion && previousVersion !== '0.15.
|
|
74674
|
+
const versionChanged = previousVersion && previousVersion !== '0.15.4';
|
|
74670
74675
|
await runPipeline$1(config, [
|
|
74671
74676
|
typeCheck,
|
|
74672
74677
|
uniqueDocumentNames,
|
|
@@ -74693,7 +74698,7 @@ async function runPipeline(config, docs) {
|
|
|
74693
74698
|
if (config.logLevel === LogLevel.Quiet) ;
|
|
74694
74699
|
else if (versionChanged) {
|
|
74695
74700
|
console.log('💣 Detected new version of Houdini. Regenerating all documents...');
|
|
74696
|
-
console.log('🎉 Welcome to 0.15.
|
|
74701
|
+
console.log('🎉 Welcome to 0.15.4!');
|
|
74697
74702
|
// if the user is coming from a version pre-15, point them to the migration guide
|
|
74698
74703
|
const major = parseInt(previousVersion.split('.')[1]);
|
|
74699
74704
|
if (major < 15) {
|
package/build/common/config.js
CHANGED
|
@@ -138,6 +138,10 @@ For more information, visit this link: https://www.houdinigraphql.com/guides/mig
|
|
|
138
138
|
if (!posixify(filepath).startsWith(posixify(path_1.default.join(this.projectRoot, routesDir)))) {
|
|
139
139
|
return false;
|
|
140
140
|
}
|
|
141
|
+
// always consider layouts as routes
|
|
142
|
+
if (layout_pattern.test(path_1.default.parse(filepath).name)) {
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
141
145
|
// if there is a route function from the config
|
|
142
146
|
if (this.configIsRoute) {
|
|
143
147
|
return this.configIsRoute(filepath);
|
|
@@ -532,3 +536,4 @@ var LogLevel;
|
|
|
532
536
|
LogLevel["Quiet"] = "quiet";
|
|
533
537
|
})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
|
|
534
538
|
const posixify = (str) => str.replace(/\\/g, '/');
|
|
539
|
+
const layout_pattern = /^__layout(?:-([a-zA-Z0-9_-]+))?(?:@([a-zA-Z0-9_-]+))?$/;
|
|
@@ -12052,6 +12052,10 @@ For more information, visit this link: https://www.houdinigraphql.com/guides/mig
|
|
|
12052
12052
|
if (!posixify(filepath).startsWith(posixify(path__default["default"].join(this.projectRoot, routesDir)))) {
|
|
12053
12053
|
return false;
|
|
12054
12054
|
}
|
|
12055
|
+
// always consider layouts as routes
|
|
12056
|
+
if (layout_pattern.test(path__default["default"].parse(filepath).name)) {
|
|
12057
|
+
return true;
|
|
12058
|
+
}
|
|
12055
12059
|
// if there is a route function from the config
|
|
12056
12060
|
if (this.configIsRoute) {
|
|
12057
12061
|
return this.configIsRoute(filepath);
|
|
@@ -12442,7 +12446,8 @@ var LogLevel;
|
|
|
12442
12446
|
LogLevel["ShortSummary"] = "short-summary";
|
|
12443
12447
|
LogLevel["Quiet"] = "quiet";
|
|
12444
12448
|
})(LogLevel || (LogLevel = {}));
|
|
12445
|
-
const posixify = (str) => str.replace(/\\/g, '/');
|
|
12449
|
+
const posixify = (str) => str.replace(/\\/g, '/');
|
|
12450
|
+
const layout_pattern = /^__layout(?:-([a-zA-Z0-9_-]+))?(?:@([a-zA-Z0-9_-]+))?$/;
|
|
12446
12451
|
|
|
12447
12452
|
(typeof process !== 'undefined' && process.hrtime)
|
|
12448
12453
|
? () => {
|
|
@@ -12020,6 +12020,10 @@ For more information, visit this link: https://www.houdinigraphql.com/guides/mig
|
|
|
12020
12020
|
if (!posixify(filepath).startsWith(posixify(path$h.join(this.projectRoot, routesDir)))) {
|
|
12021
12021
|
return false;
|
|
12022
12022
|
}
|
|
12023
|
+
// always consider layouts as routes
|
|
12024
|
+
if (layout_pattern.test(path$h.parse(filepath).name)) {
|
|
12025
|
+
return true;
|
|
12026
|
+
}
|
|
12023
12027
|
// if there is a route function from the config
|
|
12024
12028
|
if (this.configIsRoute) {
|
|
12025
12029
|
return this.configIsRoute(filepath);
|
|
@@ -12410,7 +12414,8 @@ var LogLevel;
|
|
|
12410
12414
|
LogLevel["ShortSummary"] = "short-summary";
|
|
12411
12415
|
LogLevel["Quiet"] = "quiet";
|
|
12412
12416
|
})(LogLevel || (LogLevel = {}));
|
|
12413
|
-
const posixify = (str) => str.replace(/\\/g, '/');
|
|
12417
|
+
const posixify = (str) => str.replace(/\\/g, '/');
|
|
12418
|
+
const layout_pattern = /^__layout(?:-([a-zA-Z0-9_-]+))?(?:@([a-zA-Z0-9_-]+))?$/;
|
|
12414
12419
|
|
|
12415
12420
|
(typeof process !== 'undefined' && process.hrtime)
|
|
12416
12421
|
? () => {
|
package/package.json
CHANGED
package/src/common/config.ts
CHANGED
|
@@ -175,6 +175,11 @@ For more information, visit this link: https://www.houdinigraphql.com/guides/mig
|
|
|
175
175
|
return false
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
+
// always consider layouts as routes
|
|
179
|
+
if (layout_pattern.test(path.parse(filepath).name)) {
|
|
180
|
+
return true
|
|
181
|
+
}
|
|
182
|
+
|
|
178
183
|
// if there is a route function from the config
|
|
179
184
|
if (this.configIsRoute) {
|
|
180
185
|
return this.configIsRoute(filepath)
|
|
@@ -680,3 +685,5 @@ export enum LogLevel {
|
|
|
680
685
|
}
|
|
681
686
|
|
|
682
687
|
const posixify = (str: string) => str.replace(/\\/g, '/')
|
|
688
|
+
|
|
689
|
+
const layout_pattern = /^__layout(?:-([a-zA-Z0-9_-]+))?(?:@([a-zA-Z0-9_-]+))?$/
|