Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

simple-nunjucks-loader

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-nunjucks-loader - npm Package Compare versions

Comparing version 2.0.3 to 3.0.0

lib/cjs/asset-path/AssetPath.js

12

lib/cjs/ast/get-assets.js

@@ -10,14 +10,14 @@ "use strict";

var _getNodesValues = require("./get-nodes-values");
var _constants = require("../constants");
var _isUnique = require("../utils/is-unique");
var _StaticExtension = require("../static-extension/StaticExtension");
var _getFirstExistedPath = require("../utils/get-first-existed-path");
var _getPossiblePaths = require("../utils/get-possible-paths");
var _getFirstExistedPath = require("../utils/get-first-existed-path");
var _isUnique = require("../utils/is-unique");
var _constants = require("../constants");
var _getNodesValues = require("./get-nodes-values");
var _StaticExtension = require("../static-extension/StaticExtension");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -24,0 +24,0 @@

@@ -8,7 +8,7 @@ "use strict";

var _getDependenciesTemplates = require("./get-dependencies-templates");
var _getFirstExistedPath = require("../utils/get-first-existed-path");
var _getPossiblePaths = require("../utils/get-possible-paths");
var _getFirstExistedPath = require("../utils/get-first-existed-path");
var _getDependenciesTemplates = require("./get-dependencies-templates");

@@ -15,0 +15,0 @@ /**

@@ -10,4 +10,2 @@ "use strict";

var _indexOf = require("../utils/index-of");
/**

@@ -31,3 +29,3 @@ * Filter list of nodes

function filterNodes(list, callback) {
return nodesOfType.map((0, _toListItem.toListItem)(list, callback)).filter(Boolean).filter(([addonName], i, list) => i === (0, _indexOf.indexOf)(list, ([name]) => addonName === name));
return nodesOfType.map((0, _toListItem.toListItem)(list, callback)).filter(Boolean).filter(([addonName], i, list) => i === list.findIndex(([name]) => addonName === name));
}

@@ -34,0 +32,0 @@

@@ -8,6 +8,6 @@ "use strict";

var _nunjucks = _interopRequireDefault(require("nunjucks"));
var _getUsagesOf = require("./get-usages-of");
var _nunjucks = _interopRequireDefault(require("nunjucks"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -14,0 +14,0 @@

@@ -8,6 +8,6 @@ "use strict";

var _nunjucks = _interopRequireDefault(require("nunjucks"));
var _getUsagesOf = require("./get-usages-of");
var _nunjucks = _interopRequireDefault(require("nunjucks"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -14,0 +14,0 @@

@@ -8,6 +8,6 @@ "use strict";

var _nunjucks = _interopRequireDefault(require("nunjucks"));
var _getUsagesOf = require("./get-usages-of");
var _nunjucks = _interopRequireDefault(require("nunjucks"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -14,0 +14,0 @@

@@ -8,6 +8,2 @@ "use strict";

var _loaderUtils = require("loader-utils");
var _schemaUtils = _interopRequireDefault(require("schema-utils"));
var _schema = _interopRequireDefault(require("./schema"));

@@ -21,14 +17,5 @@

try {
loaderOptions = (0, _loaderUtils.getOptions)(loader);
loaderOptions = loader.getOptions(_schema.default);
} catch (e) {
callback(e);
}
try {
(0, _schemaUtils.default)(_schema.default, loaderOptions, {
name: 'Simple Nunjucks Loader',
baseDataPath: 'options'
});
} catch (e) {
callback(e);
return null;

@@ -35,0 +22,0 @@ }

@@ -10,17 +10,17 @@ "use strict";

var _getDependencies = require("./precompile/get-dependencies");
var _constants = require("./constants");
var _getImportPath = require("./utils/get-import-path");
var _getLoaderOptions = require("./get-loader-options");
var _getModuleOutput = require("./output/get-module-output");
var _getTemplateImports = require("./output/get-template-imports");
var _toAssetsUuid = require("./output/to-assets-uuid");
var _constants = require("./constants");
var _getDependencies = require("./precompile/get-dependencies");
var _getTemplateImports = require("./output/get-template-imports");
var _contants = require("./static-extension/contants");
var _getModuleOutput = require("./output/get-module-output");
var _getImportPath = require("./utils/get-import-path");

@@ -27,0 +27,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -10,3 +10,3 @@ "use strict";

var _assets = require("./assets");
var _constants = require("../constants");

@@ -17,3 +17,3 @@ var _getImportStr = require("../utils/get-import-str");

var _constants = require("../constants");
var _assets = require("./assets");

@@ -20,0 +20,0 @@ var _getDynamicPathRegexp = require("./get-dynamic-path-regexp");

@@ -10,2 +10,4 @@ "use strict";

var _constants = require("../constants");
var _getImportStr = require("../utils/get-import-str");

@@ -15,4 +17,2 @@

var _constants = require("../constants");
var _getModuleOutput = require("./get-module-output");

@@ -19,0 +19,0 @@

@@ -10,6 +10,6 @@ "use strict";

var _constants = require("../constants");
var _getImportStr = require("../utils/get-import-str");
var _constants = require("../constants");
var _toVar = require("../utils/to-var");

@@ -16,0 +16,0 @@

@@ -10,6 +10,6 @@ "use strict";

var _constants = require("../constants");
var _getImportStr = require("../utils/get-import-str");
var _constants = require("../constants");
var _toVar = require("../utils/to-var");

@@ -16,0 +16,0 @@

@@ -8,6 +8,6 @@ "use strict";

var _path = _interopRequireDefault(require("path"));
var _loaderUtils = require("loader-utils");
var _path = _interopRequireDefault(require("path"));
var _getImportStr = require("../utils/get-import-str");

@@ -14,0 +14,0 @@

@@ -10,6 +10,6 @@ "use strict";

var _constants = require("../constants");
var _getImportStr = require("../utils/get-import-str");
var _constants = require("../constants");
var _toVar = require("../utils/to-var");

@@ -16,0 +16,0 @@

@@ -8,14 +8,14 @@ "use strict";

var _getRuntimeImport = require("./get-runtime-import");
var _getAssets = require("./get-assets");
var _getTemplateDependenciesImport = require("./get-template-dependencies-import");
var _getExtensions = require("./get-extensions");
var _getFilters = require("./get-filters");
var _getGlobals = require("./get-globals");
var _getAssets = require("./get-assets");
var _getRuntimeImport = require("./get-runtime-import");
var _getExtensions = require("./get-extensions");
var _getTemplateDependenciesImport = require("./get-template-dependencies-import");
var _getFilters = require("./get-filters");
function getTemplateImports(loader, esModule, {

@@ -22,0 +22,0 @@ assets,

@@ -8,11 +8,7 @@ "use strict";

var _localVarPrecompile = require("./local-var-precompile");
var _getAssets = require("../ast/get-assets");
var _getAddonsMeta = require("./get-addons-meta");
var _configureEnvironment = require("./configure-environment");
var _getNodes = require("../ast/get-nodes");
var _getUsedGlobals = require("../ast/get-used-globals");
var _getTemplatesImports = require("../ast/get-templates-imports");

@@ -23,8 +19,12 @@ var _getUsedExtensions = require("../ast/get-used-extensions");

var _getAssets = require("../ast/get-assets");
var _getUsedGlobals = require("../ast/get-used-globals");
var _getTemplatesImports = require("../ast/get-templates-imports");
var _hasAsyncTags = require("../ast/has-async-tags");
var _configureEnvironment = require("./configure-environment");
var _getAddonsMeta = require("./get-addons-meta");
var _localVarPrecompile = require("./local-var-precompile");
/**

@@ -31,0 +31,0 @@ * @typedef {Object} NunjucksOptions

@@ -8,6 +8,6 @@ "use strict";

var _nunjucksSlim = _interopRequireDefault(require("nunjucks/browser/nunjucks-slim"));
var _WebpackPrecompiledLoader = require("./WebpackPrecompiledLoader");
var _nunjucksSlim = _interopRequireDefault(require("nunjucks/browser/nunjucks-slim"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -14,0 +14,0 @@

{
"title": "Simple Nunjucks Loader options",
"type": "object",

@@ -3,0 +4,0 @@ "properties": {

@@ -8,4 +8,2 @@ "use strict";

var _contants = require("./contants");
var _getModule = require("../utils/get-module");

@@ -15,2 +13,4 @@

var _contants = require("./contants");
class StaticExtension {

@@ -17,0 +17,0 @@ constructor() {

@@ -12,2 +12,6 @@ "use strict";

var _constants = require("../constants");
var _getErrorCopy = require("./get-error-copy");
var _getGlob = require("./get-glob");

@@ -17,6 +21,2 @@

var _getErrorCopy = require("./get-error-copy");
var _constants = require("../constants");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -23,0 +23,0 @@

{
"name": "simple-nunjucks-loader",
"version": "2.0.3",
"version": "3.0.0",
"description": "Webpack loader for Nunjucks",

@@ -35,4 +35,3 @@ "main": "lib/cjs/loader.js",

"dependencies": {
"loader-utils": "^2.0.0",
"schema-utils": "^2.6.1"
"loader-utils": "^2.0.0"
},

@@ -46,18 +45,18 @@ "optionalDependencies": {

"devDependencies": {
"@babel/cli": "^7.7.4",
"@babel/core": "^7.7.4",
"@babel/preset-env": "^7.7.4",
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"@babel/preset-env": "^7.12.1",
"babel-eslint": "^10.0.3",
"coveralls": "^3.0.9",
"eslint": "^6.7.1",
"file-loader": "^5.0.2",
"jest": "^24.9.0",
"eslint": "^7.0.0",
"eslint-plugin-import": "^2.22.0",
"file-loader": "^6.2.0",
"jest": "^26.0.0",
"nunjucks": "^3.2.0",
"uuid": "^3.3.3",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10"
"uuid": "^8.0.0",
"webpack": "^5.0.0"
},
"engines": {
"node": ">= 8.9.0"
"node": ">= 10.13.0"
}
}

@@ -12,2 +12,4 @@ [![npm package][npm-image]][npm-url]

> For Webpack 4 support use loader 2.x version
## Install

@@ -14,0 +16,0 @@ ```bash

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