@marko/compiler 5.37.17 → 5.37.18

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/dist/config.js CHANGED
@@ -165,10 +165,6 @@ var _lassoPackageRoot = require("lasso-package-root");
165
165
 
166
166
 
167
167
 
168
-
169
-
170
-
171
-
172
168
 
173
169
 
174
170
 
@@ -220,10 +216,6 @@ var _config = _interopRequireDefault(require("./taglib/config"));const config =
220
216
  */resolveVirtualDependency: null, /**
221
217
  * Compiling a Marko template may require other (used) Marko templates to compile.
222
218
  * To prevent compiling templates more than once, most of the compilation is cached.
223
- *
224
- * The default cache strategy is to clear the cache on every macrotask.
225
- * If the default cache is overwritten it is up to the user to determine when the
226
- * cache is cleared.
227
219
  */cache: new Map(), /**
228
220
  * A regexp or function that receives an import path that matches file types known to be client side assets.
229
221
  */hydrateIncludeImports: /\.(css|less|s[ac]ss|styl|png|jpe?g|gif|svg|ico|webp|avif|mp4|webm|ogg|mp3|wav|flac|aac|woff2?|eot|ttf|otf)$/, /**
package/dist/index.js CHANGED
@@ -26,7 +26,6 @@ async function compile(src, filename, config) {
26
26
  const markoConfig = loadMarkoConfig(config);
27
27
  const babelConfig = await loadBabelConfig(filename, markoConfig);
28
28
  const babelResult = await babel.transformAsync(src, babelConfig);
29
- scheduleDefaultClear(markoConfig);
30
29
  return buildResult(src, filename, markoConfig.errorRecovery, babelResult);
31
30
  }
32
31
 
@@ -34,7 +33,6 @@ function compileSync(src, filename, config) {
34
33
  const markoConfig = loadMarkoConfig(config);
35
34
  const babelConfig = loadBabelConfigSync(filename, markoConfig);
36
35
  const babelResult = babel.transformSync(src, babelConfig);
37
- scheduleDefaultClear(markoConfig);
38
36
  return buildResult(src, filename, markoConfig.errorRecovery, babelResult);
39
37
  }
40
38
 
@@ -154,25 +152,10 @@ function buildResult(src, filename, errorRecovery, babelResult) {
154
152
  return { ast, map, code, meta };
155
153
  }
156
154
 
157
- let clearingDefaultCache = false;
158
- function scheduleDefaultClear(config) {
159
- if (
160
- !clearingDefaultCache && (
161
- clearingDefaultCache = isDefaultCache(config)))
162
- {
163
- setImmediate(_clearDefaults);
164
- }
165
- }
166
-
167
155
  function _clearDefaults() {
168
- clearingDefaultCache = false;
169
156
  globalConfig.cache.clear();
170
157
  }
171
158
 
172
- function isDefaultCache(config) {
173
- return !config.cache || config.cache === globalConfig.cache;
174
- }
175
-
176
159
  function getFs(config) {
177
160
  return config.fileSystem || globalConfig.fileSystem;
178
161
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/compiler",
3
- "version": "5.37.17",
3
+ "version": "5.37.18",
4
4
  "description": "Marko template to JS compiler.",
5
5
  "keywords": [
6
6
  "babel",