Socket
Socket
Sign inDemoInstall

@11ty/eleventy

Package Overview
Dependencies
Maintainers
1
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@11ty/eleventy - npm Package Compare versions

Comparing version 2.0.0-canary.30 to 2.0.0-canary.31

2

package.json
{
"name": "@11ty/eleventy",
"version": "2.0.0-canary.30",
"version": "2.0.0-canary.31",
"description": "Transform a directory of templates into HTML.",

@@ -5,0 +5,0 @@ "publishConfig": {

@@ -393,5 +393,13 @@ const { TemplatePath } = require("@11ty/eleventy-utils");

this.eleventyServe.setOutputDir(this.outputDir);
// TODO
// this.eleventyServe.setWatcherOptions(this.getChokidarConfig());
this.templateData = new TemplateData(this.inputDir, this.eleventyConfig);
this.templateData.extensionMap = this.extensionMap;
if (this.env) {
this.templateData.environmentVariables = this.env;
}
this.templateData.setFileSystemSearch(this.fileSystemSearch);
this.eleventyFiles = new EleventyFiles(

@@ -407,2 +415,4 @@ this.inputDir,

this.eleventyFiles.extensionMap = this.extensionMap;
// This needs to be set before init or it’ll construct a new one
this.eleventyFiles.templateData = this.templateData;
this.eleventyFiles.init();

@@ -416,10 +426,2 @@

this.templateData = new TemplateData(this.inputDir, this.eleventyConfig);
this.templateData.extensionMap = this.extensionMap;
if (this.env) {
this.templateData.environmentVariables = this.env;
}
this.templateData.setFileSystemSearch(this.fileSystemSearch);
this.eleventyFiles.templateData = this.templateData;
this.writer = new TemplateWriter(

@@ -465,8 +467,3 @@ this.inputDir,

let data = this.templateData.cacheData();
this.needsInit = false;
// …why does it return this
return data;
}

@@ -914,5 +911,5 @@

let dataDir = this.templateData.getDataDir();
let dataDir = TemplatePath.stripLeadingDotSlash(this.templateData.getDataDir());
function filterOutGlobalDataFiles(path) {
return !dataDir || path.indexOf(dataDir) === -1;
return !dataDir || !TemplatePath.stripLeadingDotSlash(path).startsWith(dataDir);
}

@@ -931,6 +928,4 @@

// Deps from Global Data (that aren’t in the global data directory, everything is watched there)
this.watchTargets.addDependencies(
this.templateData.getWatchPathCache(),
filterOutGlobalDataFiles
);
let globalDataDeps = this.templateData.getWatchPathCache();
this.watchTargets.addDependencies(globalDataDeps, filterOutGlobalDataFiles);

@@ -937,0 +932,0 @@ this.watchTargets.addDependencies(

@@ -56,7 +56,5 @@ const fs = require("graceful-fs");

this.transforms = [];
this.templateData = templateData;
if (this.templateData) {
this.templateData.setInputDir(this.inputDir);
}
this.setTemplateData(templateData);
this.isVerbose = true;

@@ -78,2 +76,9 @@ this.isDryRun = false;

setTemplateData(templateData) {
this.templateData = templateData;
if (this.templateData) {
this.templateData.setInputDir(this.inputDir);
}
}
get logger() {

@@ -80,0 +85,0 @@ if (!this._logger) {

@@ -126,8 +126,2 @@ const fs = require("fs");

async cacheData() {
this.clearData();
return this.getData();
}
_getGlobalDataGlobByExtension(dir, extension) {

@@ -355,3 +349,3 @@ return TemplateGlob.normalizePath(

async getData() {
async getGlobalData() {
let rawImports = this.getRawImports();

@@ -429,6 +423,2 @@

async getGlobalData() {
return this.getData();
}
getUserDataExtensions() {

@@ -435,0 +425,0 @@ if (!this.config.dataExtensions) {

@@ -161,2 +161,4 @@ const { TemplatePath } = require("@11ty/eleventy-utils");

wasCached = true;
// TODO reset other constructor things here like inputDir/outputDir/extensionMap/
tmpl.setTemplateData(this.templateData);
} else {

@@ -163,0 +165,0 @@ tmpl = new Template(

@@ -101,3 +101,3 @@ const chalk = require("kleur");

this.libraryAmendments = {};
this.serverPassthroughCopyBehavior = "passthrough";
this.serverPassthroughCopyBehavior = "copy"; // or "passthrough"
this.urlTransforms = [];

@@ -104,0 +104,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc