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.1-alpha.2 to 2.0.1-alpha.3

6

package.json
{
"name": "@11ty/eleventy",
"version": "2.0.1-alpha.2",
"version": "2.0.1-alpha.3",
"description": "A simpler (static) site generator.",

@@ -101,2 +101,3 @@ "publishConfig": {

"@11ty/eleventy-utils": "^1.0.1",
"@11ty/lodash-custom": "^4.17.21",
"@iarna/toml": "^2.2.5",

@@ -119,5 +120,2 @@ "@sindresorhus/slugify": "^1.1.2",

"liquidjs": "^10.6.1",
"lodash.chunk": "^4.2.0",
"lodash.get": "^4.4.2",
"lodash.set": "^4.3.2",
"luxon": "^3.3.0",

@@ -124,0 +122,0 @@ "markdown-it": "^13.0.1",

@@ -1,3 +0,2 @@

const lodashGet = require("lodash.get");
const lodashSet = require("lodash.set");
const { set: lodashSet, get: lodashGet } = require("@11ty/lodash-custom");

@@ -42,8 +41,3 @@ const ComputedDataQueue = require("./ComputedDataQueue");

addTemplateString(
key,
renderFn,
declaredDependencies = [],
symbolParseFn = undefined
) {
addTemplateString(key, renderFn, declaredDependencies = [], symbolParseFn = undefined) {
this.add(key, renderFn, declaredDependencies, symbolParseFn);

@@ -54,5 +48,3 @@ this.templateStringKeyLookup[key] = true;

async resolveVarOrder(data) {
let proxyByTemplateString = new ComputedDataTemplateString(
this.computedKeys
);
let proxyByTemplateString = new ComputedDataTemplateString(this.computedKeys);
let proxyByProxy = new ComputedDataProxy(this.computedKeys);

@@ -59,0 +51,0 @@

@@ -1,3 +0,2 @@

const lodashSet = require("lodash.set");
const lodashGet = require("lodash.get");
const { set: lodashSet, get: lodashGet } = require("@11ty/lodash-custom");
const { isPlainObject } = require("@11ty/eleventy-utils");

@@ -4,0 +3,0 @@

@@ -1,2 +0,3 @@

const lodashSet = require("lodash.set");
const { set: lodashSet } = require("@11ty/lodash-custom");
const debug = require("debug")("Eleventy:ComputedDataTemplateString");

@@ -41,6 +42,3 @@

for (let split of splits) {
let varName = split.slice(
0,
split.indexOf(this.suffix) < 0 ? 0 : split.indexOf(this.suffix)
);
let varName = split.slice(0, split.indexOf(this.suffix) < 0 ? 0 : split.indexOf(this.suffix));
if (varName) {

@@ -47,0 +45,0 @@ vars.add(varName);

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

};
await this.config.events.emit("beforeBuild", eventsArg);

@@ -1207,2 +1208,3 @@ await this.config.events.emit("eleventy.before", eventsArg);

eventsArg.uses = this.eleventyConfig.usesGraph.map;
await this.config.events.emit("afterBuild", eventsArg);

@@ -1209,0 +1211,0 @@ await this.config.events.emit("eleventy.after", eventsArg);

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

class JavaScript extends TemplateEngine {
// which data keys to bind to `this` in JavaScript template functions
// static DATA_KEYS_TO_BIND = ["page", "eleventy"];
static DATA_KEYS_TO_BIND = ["page", "eleventy"];
constructor(name, dirs, config) {

@@ -54,3 +58,5 @@ super(name, dirs, config);

} else {
return { render: mod };
return {
render: mod,
};
}

@@ -72,3 +78,2 @@ } else if ("data" in mod || "render" in mod) {

let inst = this._getInstance(mod);
if (inst) {

@@ -116,8 +121,7 @@ this.instances[inputPath] = inst;

return function (...args) {
if (inst && inst.page) {
this.page = inst.page;
for (let key of JavaScript.DATA_KEYS_TO_BIND) {
if (inst && inst[key]) {
this[key] = inst[key];
}
}
if (inst && inst.eleventy) {
this.eleventy = inst.eleventy;
}

@@ -143,5 +147,9 @@ return fn.call(this, ...args);

// only blow away existing inst.page if it has a page.url
if (!inst.page || inst.page.url) {
inst.page = data.page;
for (let key of JavaScript.DATA_KEYS_TO_BIND) {
if (!inst[key] && data[key]) {
// only blow away existing inst.page if it has a page.url
if (key !== "page" || !inst.page || inst.page.url) {
inst[key] = data[key];
}
}
}

@@ -148,0 +156,0 @@ Object.assign(inst, this.getJavaScriptFunctions(inst));

@@ -365,3 +365,3 @@ const NunjucksLib = require("nunjucks");

/* Outputs an Array of lodash.get selectors */
/* Outputs an Array of lodash get selectors */
parseForSymbols(str) {

@@ -368,0 +368,0 @@ const { parser, nodes } = NunjucksLib;

@@ -1,4 +0,2 @@

const lodashChunk = require("lodash.chunk");
const lodashGet = require("lodash.get");
const lodashSet = require("lodash.set");
const { set: lodashSet, get: lodashGet, chunk: lodashChunk } = require("@11ty/lodash-custom");
const { isPlainObject } = require("@11ty/eleventy-utils");

@@ -5,0 +3,0 @@

@@ -9,4 +9,3 @@ const fs = require("graceful-fs");

const normalize = require("normalize-path");
const lodashGet = require("lodash.get");
const lodashSet = require("lodash.set");
const { set: lodashSet, get: lodashGet } = require("@11ty/lodash-custom");
const { DateTime } = require("luxon");

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

@@ -7,3 +7,3 @@ const os = require("os");

const matter = require("gray-matter");
const lodashSet = require("lodash.set");
const { set: lodashSet } = require("@11ty/lodash-custom");
const { TemplatePath } = require("@11ty/eleventy-utils");

@@ -10,0 +10,0 @@

const fs = require("fs");
const path = require("path");
const lodashset = require("lodash.set");
const lodashget = require("lodash.get");
const { set: lodashset, get: lodashget } = require("@11ty/lodash-custom");
const { TemplatePath, isPlainObject } = require("@11ty/eleventy-utils");

@@ -6,0 +5,0 @@

const pkg = require("../package.json");
const semver = require("semver");
const lodashset = require("lodash.set");
const { set: lodashset } = require("@11ty/lodash-custom");

@@ -5,0 +5,0 @@ class TemplateDataInitialGlobalData {

@@ -80,2 +80,6 @@ const DependencyGraph = require("dependency-graph").DepGraph;

}
// Fixes #2851
if (str.startsWith("collections['") || str.startsWith('collections["')) {
return str.slice("collections['".length, -2);
}
}

@@ -82,0 +86,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