@11ty/client 4.0.0-alpha.6 → 4.0.0-alpha.7

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,4 +1,4 @@
1
- /*! Eleventy v4.0.0-alpha.6 (@11ty/client/liquid Engine Bundle) */
1
+ /*! Eleventy v4.0.0-alpha.7 (@11ty/client/liquid Engine Bundle) */
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -4561,7 +4561,7 @@ var Tokenizer = class {
4561
4561
  }
4562
4562
  *readFileNameTemplate(options) {
4563
4563
  const { outputDelimiterLeft } = options;
4564
- const htmlStopStrings = [",", " ", outputDelimiterLeft];
4564
+ const htmlStopStrings = [",", " ", "\r", "\n", " ", outputDelimiterLeft];
4565
4565
  const htmlStopStringSet = new Set(htmlStopStrings);
4566
4566
  while (this.p < this.N && !htmlStopStringSet.has(this.peek())) {
4567
4567
  yield this.match(outputDelimiterLeft) ? this.readOutputToken(options) : this.readHTMLToken(htmlStopStrings);
@@ -5111,24 +5111,28 @@ var Loader = class {
5111
5111
  }
5112
5112
  *candidates(file, dirs, currentFile, enforceRoot) {
5113
5113
  const { fs: fs3, extname } = this.options;
5114
- if (this.shouldLoadRelative(file) && currentFile) {
5115
- const referenced = fs3.resolve(this.dirname(currentFile), file, extname);
5114
+ const isAllowed = /* @__PURE__ */ __name((filepath) => {
5115
+ if (!enforceRoot)
5116
+ return true;
5116
5117
  for (const dir of dirs) {
5117
- if (!enforceRoot || this.contains(dir, referenced)) {
5118
- yield referenced;
5119
- break;
5120
- }
5118
+ if (this.contains(dir, filepath))
5119
+ return true;
5121
5120
  }
5121
+ return false;
5122
+ }, "isAllowed");
5123
+ if (this.shouldLoadRelative(file) && currentFile) {
5124
+ const referenced = fs3.resolve(this.dirname(currentFile), file, extname);
5125
+ if (isAllowed(referenced))
5126
+ yield referenced;
5122
5127
  }
5123
5128
  for (const dir of dirs) {
5124
5129
  const referenced = fs3.resolve(dir, file, extname);
5125
- if (!enforceRoot || this.contains(dir, referenced)) {
5130
+ if (isAllowed(referenced))
5126
5131
  yield referenced;
5127
- }
5128
5132
  }
5129
5133
  if (fs3.fallback !== void 0) {
5130
5134
  const filepath = fs3.fallback(file);
5131
- if (filepath !== void 0)
5135
+ if (filepath !== void 0 && isAllowed(filepath))
5132
5136
  yield filepath;
5133
5137
  }
5134
5138
  }
@@ -1,4 +1,4 @@
1
- /*! Eleventy v4.0.0-alpha.6 (@11ty/client/md Engine Bundle) */
1
+ /*! Eleventy v4.0.0-alpha.7 (@11ty/client/md Engine Bundle) */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
4
4
  var __export = (target, all) => {
@@ -3643,7 +3643,13 @@ function linkify2(state, silent) {
3643
3643
  if (!link2) return false;
3644
3644
  let url = link2.url;
3645
3645
  if (url.length <= proto.length) return false;
3646
- url = url.replace(/\*+$/, "");
3646
+ let urlEnd = url.length;
3647
+ while (urlEnd > 0 && url.charCodeAt(urlEnd - 1) === 42) {
3648
+ urlEnd--;
3649
+ }
3650
+ if (urlEnd !== url.length) {
3651
+ url = url.slice(0, urlEnd);
3652
+ }
3647
3653
  const fullUrl = state.md.normalizeLink(url);
3648
3654
  if (!state.md.validateLink(fullUrl)) return false;
3649
3655
  if (!silent) {
@@ -1,4 +1,4 @@
1
- /*! Eleventy v4.0.0-alpha.6 (@11ty/client/njk Engine Bundle) */
1
+ /*! Eleventy v4.0.0-alpha.7 (@11ty/client/njk Engine Bundle) */
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- /*! Eleventy v4.0.0-alpha.6 (i18n Plugin) */
1
+ /*! Eleventy v4.0.0-alpha.7 (i18n Plugin) */
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@11ty/client",
3
3
  "description": "Run Eleventy in your browser.",
4
- "version": "4.0.0-alpha.6",
4
+ "version": "4.0.0-alpha.7",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "provenance": true
@@ -37,7 +37,7 @@
37
37
  "bugs": "https://github.com/11ty/eleventy/issues",
38
38
  "homepage": "https://www.11ty.dev/",
39
39
  "devDependencies": {
40
- "@11ty/package-bundler": "^0.5.1",
40
+ "@11ty/package-bundler": "^0.5.5",
41
41
  "@vitest/browser": "^4.0.5",
42
42
  "@vitest/browser-playwright": "^4.0.5",
43
43
  "playwright": "^1.56.1",