@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 Bundle) */
1
+ /*! Eleventy v4.0.0-alpha.7 (@11ty/client Bundle) */
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -42,6 +42,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
42
42
  // src/shims/process.cjs
43
43
  var require_process = __commonJS({
44
44
  "src/shims/process.cjs"(exports, module) {
45
+ "use strict";
45
46
  var process3 = module.exports = {};
46
47
  var cachedSetTimeout;
47
48
  var cachedClearTimeout;
@@ -2841,6 +2842,9 @@ var init_EventBus = __esm({
2841
2842
  });
2842
2843
 
2843
2844
  // ../../src/Util/Require.js
2845
+ function isCommonJSTypeScript(filePath, type) {
2846
+ return type === "cjs" && filePath.endsWith(".ts") || filePath.endsWith(".cts");
2847
+ }
2844
2848
  function getImportErrorMessage(filePath, type) {
2845
2849
  return `There was a problem importing '${import_node_path.default.relative(".", filePath)}' via ${type}`;
2846
2850
  }
@@ -2886,6 +2890,9 @@ async function dynamicImportAbsolutePath(absolutePath, options = {}) {
2886
2890
  );
2887
2891
  }
2888
2892
  }
2893
+ if (isCommonJSTypeScript(absolutePath, type)) {
2894
+ return requireCommonJsTypeScript(absolutePath);
2895
+ }
2889
2896
  let urlPath;
2890
2897
  try {
2891
2898
  let u = new URL(`file:${absolutePath}`);
@@ -2985,7 +2992,7 @@ var init_package = __esm({
2985
2992
  "../../package.json"() {
2986
2993
  package_default = {
2987
2994
  name: "@11ty/eleventy",
2988
- version: "4.0.0-alpha.6",
2995
+ version: "4.0.0-alpha.7",
2989
2996
  description: "A simpler static site generator.",
2990
2997
  publishConfig: {
2991
2998
  access: "public",
@@ -3082,44 +3089,44 @@ var init_package = __esm({
3082
3089
  },
3083
3090
  devDependencies: {
3084
3091
  "@11ty/eleventy-img": "^6.0.4",
3085
- "@11ty/eleventy-plugin-rss": "^2.0.4",
3092
+ "@11ty/eleventy-plugin-rss": "^3.0.0",
3086
3093
  "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.2",
3087
3094
  "@11ty/eleventy-plugin-webc": "^0.12.0-beta.7",
3088
- "@eslint/js": "^9.39.1",
3095
+ "@eslint/js": "^10.0.1",
3089
3096
  "@iarna/toml": "^2.2.5",
3090
3097
  "@mdx-js/node-loader": "^3.1.1",
3091
3098
  "@stylistic/eslint-plugin-js": "^4.4.1",
3092
- "@types/node": "^22.19.1",
3093
- "@vue/server-renderer": "^3.5.25",
3094
- "@zachleat/noop": "^1.0.6",
3099
+ "@types/node": "^25.5.0",
3100
+ "@vue/server-renderer": "^3.5.30",
3101
+ "@zachleat/noop": "^1.0.7",
3095
3102
  ava: "^6.4.1",
3096
- c8: "^10.1.3",
3103
+ c8: "^11.0.0",
3097
3104
  "cross-env": "^10.1.0",
3098
- eslint: "^9.39.1",
3105
+ eslint: "^10.1.0",
3099
3106
  "eslint-config-prettier": "^10.1.8",
3100
- globals: "^16.5.0",
3101
- "jsx-async-runtime": "^1.0.4",
3107
+ globals: "^17.4.0",
3108
+ "jsx-async-runtime": "^2.0.3",
3102
3109
  luxon: "^3.7.2",
3103
3110
  "markdown-it-abbr": "^2.0.0",
3104
3111
  "markdown-it-emoji": "^3.0.0",
3105
- marked: "^15.0.12",
3106
- "nano-staged": "^0.8.0",
3107
- prettier: "^3.7.1",
3112
+ marked: "^17.0.5",
3113
+ "nano-staged": "^0.9.0",
3114
+ prettier: "^3.8.1",
3108
3115
  pretty: "^2.0.0",
3109
- react: "^19.2.1",
3110
- "react-dom": "^19.2.1",
3111
- rimraf: "^6.1.2",
3112
- sass: "^1.94.2",
3116
+ react: "^19.2.4",
3117
+ "react-dom": "^19.2.4",
3118
+ sass: "^1.98.0",
3113
3119
  "simple-git-hooks": "^2.13.1",
3114
- tsx: "^4.20.6",
3120
+ tsx: "^4.21.0",
3115
3121
  typescript: "^5.9.3",
3116
- vue: "^3.5.25",
3117
- zod: "^3.25.76",
3118
- "zod-validation-error": "^3.5.4"
3122
+ vue: "^3.5.30",
3123
+ zod: "^4.3.6",
3124
+ "zod-validation-error": "^5.0.0"
3119
3125
  },
3120
3126
  dependencies: {
3121
- "@11ty/dependency-tree": "^4.0.1",
3122
- "@11ty/dependency-tree-esm": "^2.0.3",
3127
+ "@11ty/dependency-tree": "^4.0.2",
3128
+ "@11ty/dependency-tree-esm": "^2.0.4",
3129
+ "@11ty/dependency-tree-typescript": "^1.0.0",
3123
3130
  "@11ty/eleventy-dev-server": "^3.0.0-alpha.6",
3124
3131
  "@11ty/eleventy-plugin-bundle": "^3.0.7",
3125
3132
  "@11ty/eleventy-utils": "^2.0.7",
@@ -3129,25 +3136,25 @@ var init_package = __esm({
3129
3136
  "@11ty/nunjucks": "^4.0.0-alpha.1",
3130
3137
  "@11ty/parse-date-strings": "^2.0.6",
3131
3138
  "@11ty/posthtml-urls": "^1.0.2",
3132
- "@11ty/recursive-copy": "^5.0.0",
3139
+ "@11ty/recursive-copy": "^5.0.2",
3133
3140
  "@sindresorhus/slugify": "^3.0.0",
3134
3141
  "bcp-47-normalize": "^2.3.0",
3135
3142
  chokidar: "^5.0.0",
3136
3143
  debug: "^4.4.3",
3137
3144
  "dependency-graph": "^1.0.0",
3138
- entities: "^7.0.0",
3145
+ entities: "^8.0.0",
3139
3146
  "import-module-string": "^2.0.3",
3140
3147
  "iso-639-1": "^3.1.5",
3141
3148
  kleur: "^4.1.5",
3142
- liquidjs: "^10.24.0",
3143
- "markdown-it": "^14.1.0",
3149
+ liquidjs: "^10.25.0",
3150
+ "markdown-it": "^14.1.1",
3144
3151
  minimist: "^1.2.8",
3145
- moo: "^0.5.2",
3152
+ moo: "0.5.2",
3146
3153
  "node-retrieve-globals": "^6.0.1",
3147
3154
  picomatch: "^4.0.3",
3148
3155
  posthtml: "^0.16.7",
3149
3156
  "posthtml-match-helper": "^2.0.3",
3150
- semver: "^7.7.3",
3157
+ semver: "^7.7.4",
3151
3158
  tinyglobby: "^0.2.15"
3152
3159
  },
3153
3160
  overrides: {
@@ -3158,7 +3165,10 @@ var init_package = __esm({
3158
3165
  });
3159
3166
 
3160
3167
  // ../../src/Util/RequireUtils.core.js
3161
- function clearRequireCache(absolutePath) {
3168
+ function clearRequireCache() {
3169
+ }
3170
+ function requireCommonJsTypeScript() {
3171
+ throw new Error("TypeScript is not supported in this bundle of Eleventy.");
3162
3172
  }
3163
3173
  function importJsonSync(path9) {
3164
3174
  let rawInput = loadContents(path9);
@@ -3174,6 +3184,15 @@ var init_RequireUtils_core = __esm({
3174
3184
  }
3175
3185
  });
3176
3186
 
3187
+ // ../../src/Util/FeatureTests.core.cjs
3188
+ var require_FeatureTests_core = __commonJS({
3189
+ "../../src/Util/FeatureTests.core.cjs"(exports, module) {
3190
+ module.exports.isTypeScriptSupported = function() {
3191
+ return false;
3192
+ };
3193
+ }
3194
+ });
3195
+
3177
3196
  // ../../node_modules/kind-of/index.js
3178
3197
  var require_kind_of = __commonJS({
3179
3198
  "../../node_modules/kind-of/index.js"(exports, module) {
@@ -8032,6 +8051,7 @@ function coerce(version) {
8032
8051
  }
8033
8052
 
8034
8053
  // ../../src/Data/TemplateData.js
8054
+ var import_FeatureTests = __toESM(require_FeatureTests_core(), 1);
8035
8055
  var { set: lodashSet2, get: lodashGet } = import_lodash_custom2.default;
8036
8056
  var debugWarn = debug_default("Eleventy:Warnings");
8037
8057
  var debug3 = debug_default("Eleventy:TemplateData");
@@ -8154,10 +8174,20 @@ var TemplateData = class _TemplateData {
8154
8174
  globSuffixesWithLeadingDot.add(`${suffix.slice(1)}.mjs`);
8155
8175
  globSuffixesWithLeadingDot.add(`${suffix.slice(1)}.cjs`);
8156
8176
  globSuffixesWithLeadingDot.add(`${suffix.slice(1)}.js`);
8177
+ if ((0, import_FeatureTests.isTypeScriptSupported)()) {
8178
+ globSuffixesWithLeadingDot.add(`${suffix.slice(1)}.mts`);
8179
+ globSuffixesWithLeadingDot.add(`${suffix.slice(1)}.cts`);
8180
+ globSuffixesWithLeadingDot.add(`${suffix.slice(1)}.ts`);
8181
+ }
8157
8182
  } else {
8158
8183
  globSuffixesWithoutLeadingDot.add(`${suffix || ""}.mjs`);
8159
8184
  globSuffixesWithoutLeadingDot.add(`${suffix || ""}.cjs`);
8160
8185
  globSuffixesWithoutLeadingDot.add(`${suffix || ""}.js`);
8186
+ if ((0, import_FeatureTests.isTypeScriptSupported)()) {
8187
+ globSuffixesWithoutLeadingDot.add(`${suffix || ""}.mts`);
8188
+ globSuffixesWithoutLeadingDot.add(`${suffix || ""}.cts`);
8189
+ globSuffixesWithoutLeadingDot.add(`${suffix || ""}.ts`);
8190
+ }
8161
8191
  }
8162
8192
  }
8163
8193
  }
@@ -10658,7 +10688,7 @@ init_EleventyBaseError();
10658
10688
  init_debug();
10659
10689
  var import_eleventy_utils14 = __toESM(require_eleventy_utils(), 1);
10660
10690
  var debug10 = debug_default("Dev:Eleventy:Proxy");
10661
- var ProxySymbol = Symbol.for("11ty.ProxySymbol");
10691
+ var ProxySymbol = /* @__PURE__ */ Symbol.for("11ty.ProxySymbol");
10662
10692
  function wrapObject(target, fallback) {
10663
10693
  if (Object.isFrozen(target)) {
10664
10694
  return target;
@@ -14009,6 +14039,7 @@ var TemplateWriter_default = TemplateWriter;
14009
14039
 
14010
14040
  // ../../src/EleventyExtensionMap.js
14011
14041
  var import_eleventy_utils25 = __toESM(require_eleventy_utils(), 1);
14042
+ var import_FeatureTests2 = __toESM(require_FeatureTests_core(), 1);
14012
14043
  var EleventyExtensionMap = class {
14013
14044
  #engineManager;
14014
14045
  constructor(config) {
@@ -14218,6 +14249,11 @@ var EleventyExtensionMap = class {
14218
14249
  "11ty.cjs": { key: "11ty.js", extension: "11ty.cjs" },
14219
14250
  "11ty.mjs": { key: "11ty.js", extension: "11ty.mjs" }
14220
14251
  };
14252
+ if ((0, import_FeatureTests2.isTypeScriptSupported)()) {
14253
+ this._extensionToKeyMap["11ty.ts"] = { key: "11ty.js", extension: "11ty.ts" };
14254
+ this._extensionToKeyMap["11ty.cts"] = { key: "11ty.js", extension: "11ty.cts" };
14255
+ this._extensionToKeyMap["11ty.mts"] = { key: "11ty.js", extension: "11ty.mts" };
14256
+ }
14221
14257
  if ("extensionMap" in this.config) {
14222
14258
  for (let entry of this.config.extensionMap) {
14223
14259
  this._extensionToKeyMap[entry.extension] = entry;
@@ -14233,7 +14269,6 @@ var EleventyExtensionMap = class {
14233
14269
  var EleventyExtensionMap_default = EleventyExtensionMap;
14234
14270
 
14235
14271
  // ../../src/TemplateConfig.js
14236
- init_shim_consume_fs();
14237
14272
  var import_eleventy_utils28 = __toESM(require_eleventy_utils(), 1);
14238
14273
  init_debug();
14239
14274
 
@@ -15316,7 +15351,7 @@ var UserConfig = class {
15316
15351
  if (Array.isArray(fileExtension)) {
15317
15352
  extensions = fileExtension;
15318
15353
  } else {
15319
- extensions = [fileExtension];
15354
+ extensions = (fileExtension || "").split(",");
15320
15355
  }
15321
15356
  for (let extension of extensions) {
15322
15357
  if (this.extensionConflictMap[extension]) {
@@ -15805,6 +15840,7 @@ var ProjectTemplateFormats = class _ProjectTemplateFormats {
15805
15840
  var ProjectTemplateFormats_default = ProjectTemplateFormats;
15806
15841
 
15807
15842
  // ../../src/TemplateConfig.js
15843
+ var import_FeatureTests3 = __toESM(require_FeatureTests_core(), 1);
15808
15844
  var debug21 = debug_default("Eleventy:TemplateConfig");
15809
15845
  var debugDev5 = debug_default("Dev:Eleventy:TemplateConfig");
15810
15846
  var EleventyConfigError = class extends EleventyBaseError_default {
@@ -15837,6 +15873,11 @@ var TemplateConfig = class {
15837
15873
  "eleventy.config.mjs",
15838
15874
  "eleventy.config.cjs"
15839
15875
  ];
15876
+ if ((0, import_FeatureTests3.isTypeScriptSupported)()) {
15877
+ this.projectConfigPaths.push("eleventy.config.ts");
15878
+ this.projectConfigPaths.push("eleventy.config.mts");
15879
+ this.projectConfigPaths.push("eleventy.config.cts");
15880
+ }
15840
15881
  }
15841
15882
  if (customRootConfig) {
15842
15883
  this.customRootConfig = customRootConfig;
@@ -17022,7 +17063,11 @@ Verbose Output: ${this.verboseMode}`;
17022
17063
  } else if (this.loader == "cjs") {
17023
17064
  this.#isEsm = false;
17024
17065
  } else if (this.loader == "auto") {
17025
- this.#isEsm = this.projectPackageJson?.type === "module";
17066
+ if (typeof Deno !== "undefined") {
17067
+ this.#isEsm = this.projectPackageJson?.type !== "commonjs";
17068
+ } else {
17069
+ this.#isEsm = this.projectPackageJson?.type === "module";
17070
+ }
17026
17071
  } else {
17027
17072
  throw new Error("The 'loader' option must be one of 'esm', 'cjs', or 'auto'");
17028
17073
  }
@@ -17184,13 +17229,13 @@ Open an issue: https://github.com/11ty/eleventy/issues/new`);
17184
17229
  ret.push(
17185
17230
  `in ${chalk_client_default.bold(time.toFixed(2))} ${Pluralize_default(time.toFixed(2), "second", "seconds")}`
17186
17231
  );
17232
+ let cfgStr = this.#activeConfigurationPath ? `, ${import_eleventy_utils30.TemplatePath.stripLeadingDotSlash(this.#activeConfigurationPath)}` : " no config file";
17187
17233
  if (time >= 1 && writeCount > 1) {
17188
- ret.push(`(${(time * 1e3 / writeCount).toFixed(1)}ms each, v${pkg2.version})`);
17234
+ ret.push(
17235
+ chalk_client_default.gray(`(${(time * 1e3 / writeCount).toFixed(1)}ms each, v${pkg2.version}${cfgStr})`)
17236
+ );
17189
17237
  } else {
17190
- ret.push(`(v${_MinimalCore.getVersion()})`);
17191
- }
17192
- if (!this.#activeConfigurationPath) {
17193
- ret.push("(no config file)");
17238
+ ret.push(chalk_client_default.gray(`(v${_MinimalCore.getVersion()}${cfgStr})`));
17194
17239
  }
17195
17240
  return ret.join(" ");
17196
17241
  }