New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

polymer-bundler

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

polymer-bundler - npm Package Compare versions

Comparing version 2.0.0-pre.12 to 2.0.0-pre.13

9

CHANGELOG.md

@@ -8,2 +8,11 @@ # Change Log

## 2.0.0-pre.13 - 2017-05-01
- BREAKING: Bundler now supports "lazy imports" aka `<link rel="lazy-import">`.
URLs which are imported lazily are implicitly treated as entrypoints. This
is a breaking change because, previously, Bundler would incorrectly treat
lazy imports just like regular imports.
- BREAKING: Bundler now inlines Scripts and CSS by default. Pass `inlineCss`
and `inlineScripts` as `false` explicitly to disable.
- Fixed an issue where `exclude` option did not actually support folder names.
## 2.0.0-pre.12 - 2017-04-14

@@ -10,0 +19,0 @@ - BREAKING: Public API change. The `bundle()` method now takes a manifest

2

lib/ast-utils.js

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

"use strict";
/**

@@ -14,3 +15,2 @@ * @license

*/
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -17,0 +17,0 @@ const dom5 = require("dom5");

@@ -34,3 +34,3 @@ #!/usr/bin/env node

multiple: true,
description: 'Exclude a subpath from root. Use multiple times to exclude multiple paths. Tags to excluded paths are kept'
description: 'URL to exclude from inlining. Use multiple times to exclude multiple files and folders. HTML tags referencing excluded URLs are preserved.'
},

@@ -37,0 +37,0 @@ {

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

"use strict";
/**

@@ -14,3 +15,2 @@ * @license

*/
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -17,0 +17,0 @@ /**

@@ -80,3 +80,3 @@ import { Analyzer } from 'polymer-analyzer';

*/
private _bundleDocument(docBundle, bundleManifest, bundleImports?);
private _bundleDocument(docBundle, bundleManifest);
/**

@@ -83,0 +83,0 @@ * Creates a hidden container <div> to which inlined content will be

@@ -55,4 +55,6 @@ "use strict";

this.stripComments = Boolean(opts.stripComments);
this.enableCssInlining = Boolean(opts.inlineCss);
this.enableScriptInlining = Boolean(opts.inlineScripts);
this.enableCssInlining =
opts.inlineCss === undefined ? true : opts.inlineCss;
this.enableScriptInlining =
opts.inlineScripts === undefined ? true : opts.inlineScripts;
this.rewriteUrlsInTemplates = Boolean(opts.rewriteUrlsInTemplates);

@@ -74,3 +76,3 @@ this.sourcemaps = Boolean(opts.sourcemaps);

const bundle = { url: bundleUrl, bundle: bundleEntry[1] };
const bundledAst = yield this._bundleDocument(bundle, manifest, bundle.bundle.files);
const bundledAst = yield this._bundleDocument(bundle, manifest);
bundledDocuments.set(bundleUrl, { ast: bundledAst, files: Array.from(bundle.bundle.files) });

@@ -179,3 +181,3 @@ }

*/
_bundleDocument(docBundle, bundleManifest, bundleImports) {
_bundleDocument(docBundle, bundleManifest) {
return __awaiter(this, void 0, void 0, function* () {

@@ -231,2 +233,8 @@ let document = yield this._prepareBundleDocument(docBundle);

bundle.files.delete(exclude);
const excludeAsFolder = exclude.endsWith('/') ? exclude : exclude + '/';
for (const file of bundle.files) {
if (file.startsWith(excludeAsFolder)) {
bundle.files.delete(file);
}
}
}

@@ -233,0 +241,0 @@ }

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

"use strict";
/**

@@ -14,3 +15,2 @@ * @license

*/
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -17,0 +17,0 @@ exports.default = {

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

/**
* @license
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/
import { Analyzer } from 'polymer-analyzer';

@@ -6,2 +19,10 @@ import { UrlString } from './url-utils';

}
/**
* Analyzes all entrypoints and determines each of their transitive
* dependencies.
* @param entrypoints Urls of entrypoints to analyze.
* @param analyzer
* @return a dependency index of every entrypoint, including entrypoints that
* were discovered as lazy entrypoints in the graph.
*/
export declare function buildDepsIndex(entrypoints: UrlString[], analyzer: Analyzer): Promise<DepsIndex>;

@@ -24,68 +24,70 @@ "use strict";

*/
const assert_1 = require("assert");
const polymer_analyzer_1 = require("polymer-analyzer");
function _getTransitiveDependencies(url, entrypoints, analyzer) {
return __awaiter(this, void 0, void 0, function* () {
const analysis = yield analyzer.analyze([url]);
const document = analysis.getDocument(url);
if (!(document instanceof polymer_analyzer_1.Document)) {
const message = document && document.message || 'unknown';
throw new Error(`Unable to get document ${url}: ${message}`);
/**
* For a given document, return a set of transitive dependencies, including
* all eagerly-loaded dependencies and lazy html imports encountered.
*/
function getHtmlDependencies(document) {
const deps = new Set();
const eagerDeps = new Set();
const lazyImports = new Set();
_getHtmlDependencies(document, true, deps, eagerDeps, lazyImports);
return { deps, eagerDeps, lazyImports };
}
function _getHtmlDependencies(document, viaEager, visited, visitedEager, lazyImports) {
const htmlImports = document.getFeatures({ kind: 'html-import', imported: false, externalPackages: true });
for (const htmlImport of htmlImports) {
const importUrl = htmlImport.document.url;
if (htmlImport.lazy) {
lazyImports.add(importUrl);
}
const imports = document.getFeatures({ kind: 'import', externalPackages: true, imported: true });
const eagerImports = new Set();
const lazyImports = new Set();
for (const htmlImport of imports) {
try {
console.assert(htmlImport.url, 'htmlImport: %s has no url', htmlImport);
}
catch (err) {
if (err instanceof assert_1.AssertionError) {
continue;
}
throw err;
}
switch (htmlImport.type) {
case 'html-import':
eagerImports.add(htmlImport.document.url);
break;
case 'lazy-html-import':
lazyImports.add(htmlImport.document.url);
break;
}
if (visitedEager.has(importUrl)) {
continue;
}
return { url: url, eager: eagerImports, lazy: lazyImports };
});
const isEager = viaEager && !htmlImport.lazy;
if (isEager) {
visitedEager.add(importUrl);
// In this case we've visited a node eagerly for the first time,
// so recurse
}
else if (visited.has(importUrl)) {
// In this case we're seeing a node lazily again, so don't recurse
continue;
}
visited.add(importUrl);
_getHtmlDependencies(htmlImport.document, isEager, visited, visitedEager, lazyImports);
}
}
/**
* Analyzes all entrypoints and determines each of their transitive
* dependencies.
* @param entrypoints Urls of entrypoints to analyze.
* @param analyzer
* @return a dependency index of every entrypoint, including entrypoints that
* were discovered as lazy entrypoints in the graph.
*/
function buildDepsIndex(entrypoints, analyzer) {
return __awaiter(this, void 0, void 0, function* () {
const entrypointToDependencies = new Map();
const dependenciesToEntrypoints = new Map();
const queue = Array.from(entrypoints);
const visitedEntrypoints = new Set();
while (queue.length > 0) {
const entrypoint = queue.shift();
if (visitedEntrypoints.has(entrypoint)) {
continue;
}
const dependencyEntry = yield _getTransitiveDependencies(entrypoint, entrypoints, analyzer);
const dependencies = new Set(dependencyEntry.eager);
dependencies.add(entrypoint);
entrypointToDependencies.set(entrypoint, dependencies);
for (const lazyDependency of dependencyEntry.lazy.values()) {
if (!visitedEntrypoints.has(lazyDependency)) {
queue.push(lazyDependency);
const depsIndex = { entrypointToDeps: new Map() };
const analysis = yield analyzer.analyze(entrypoints);
const allEntrypoints = new Set(entrypoints);
// Note: the following iteration takes place over a Set which may be added
// to from within the loop.
for (const entrypoint of allEntrypoints) {
const documentOrWarning = analysis.getDocument(entrypoint);
if (documentOrWarning instanceof polymer_analyzer_1.Document) {
const deps = getHtmlDependencies(documentOrWarning);
depsIndex.entrypointToDeps.set(entrypoint, new Set([entrypoint, ...deps.eagerDeps]));
// Add lazy imports to the set of all entrypoints, which supports
// recursive
for (const dep of deps.lazyImports) {
allEntrypoints.add(dep);
}
}
else {
const message = documentOrWarning && documentOrWarning.message || '';
console.warn(`Unable to get document ${entrypoint}: ${message}`);
}
}
entrypointToDependencies.forEach((dependencies, entrypoint, map) => {
for (const dependency of dependencies) {
if (!dependenciesToEntrypoints.has(dependency)) {
dependenciesToEntrypoints.set(dependency, new Set());
}
const entrypointSet = dependenciesToEntrypoints.get(dependency);
entrypointSet.add(entrypoint);
}
});
return { entrypointToDeps: entrypointToDependencies };
return depsIndex;
});

@@ -92,0 +94,0 @@ }

@@ -7,3 +7,4 @@ import { ASTNode } from 'parse5';

* Inline the contents of the html document returned by the link tag's href
* at the location of the link tag and then remove the link tag.
* at the location of the link tag and then remove the link tag. If the link
* is a `lazy-import` link, content will not be inlined.
*/

@@ -10,0 +11,0 @@ export declare function inlineHtmlImport(analyzer: Analyzer, document: Document, linkTag: ASTNode, visitedUrls: Set<UrlString>, docBundle: AssignedBundle, manifest: BundleManifest, enableSourcemaps: boolean, rewriteUrlsInTemplates?: boolean): Promise<void>;

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

* Inline the contents of the html document returned by the link tag's href
* at the location of the link tag and then remove the link tag.
* at the location of the link tag and then remove the link tag. If the link
* is a `lazy-import` link, content will not be inlined.
*/
function inlineHtmlImport(analyzer, document, linkTag, visitedUrls, docBundle, manifest, enableSourcemaps, rewriteUrlsInTemplates) {
return __awaiter(this, void 0, void 0, function* () {
const isLazy = dom5.getAttribute(linkTag, 'rel').match(/lazy-import/i);
const rawImportUrl = dom5.getAttribute(linkTag, 'href');

@@ -69,10 +71,20 @@ const importUrl = urlLib.resolve(document.url, rawImportUrl);

}
const importIsInAnotherBundle = importBundle.url !== docBundle.url;
// If we've previously visited a url that is part of another bundle, it
// means we've already handled that entire bundle.
const alreadyProcessedImportBundle = importIsInAnotherBundle &&
visitedUrls.has(importBundle.url) &&
// We just added resolvedImportUrl to the visitedUrls, so we'll exclude
// the case where resolved import url is not the import bundle. This
// scenario happens when importing a file from a bundle with the same
// name as the original import, like an entrypoint or lazy edge.
resolvedImportUrl !== importBundle.url;
// If the html import refers to a file which is bundled and has a different
// url, then lets just rewrite the href to point to the bundle url.
if (importBundle.url !== docBundle.url) {
// If we've previously visited a url that is part of another bundle, it
// means we've handled that entire bundle, so we guard against inlining any
// other file from that bundle by checking the visited urls for the bundle
// url itself.
if (visitedUrls.has(importBundle.url)) {
if (importIsInAnotherBundle) {
// We guard against inlining any other file from a bundle that has
// already been imported. A special exclusion is for lazy imports, which
// are not deduplicated here, since we can not infer developer's intent from
// here.
if (alreadyProcessedImportBundle && !isLazy) {
astUtils.removeElementAndNewline(linkTag);

@@ -87,4 +99,9 @@ return;

}
// If the analyzer could not load the import document, we can't inline it, so
// lets skip it.
// We don't actually inline a `lazy-import` because its loading is intended
// to be deferred until the client requests it.
if (isLazy) {
return;
}
// If the analyzer could not load the import document, we can't inline it,
// so lets skip it.
const htmlImport = findInSet(document.getFeatures({ kind: 'html-import', imported: true, externalPackages: true }), (i) => i.document && i.document.url === resolvedImportUrl);

@@ -91,0 +108,0 @@ if (!htmlImport) {

@@ -36,3 +36,3 @@ /**

exports.inlineJavascript = dom5_1.predicates.AND(dom5_1.predicates.NOT(dom5_1.predicates.hasAttr('src')), exports.jsMatcher);
exports.htmlImport = dom5_1.predicates.AND(dom5_1.predicates.hasTagName('link'), dom5_1.predicates.hasAttrValue('rel', 'import'), dom5_1.predicates.hasAttr('href'), dom5_1.predicates.OR(dom5_1.predicates.hasAttrValue('type', 'text/html'), dom5_1.predicates.hasAttrValue('type', 'html'), dom5_1.predicates.NOT(dom5_1.predicates.hasAttr('type'))));
exports.htmlImport = dom5_1.predicates.AND(dom5_1.predicates.hasTagName('link'), dom5_1.predicates.OR(dom5_1.predicates.hasAttrValue('rel', 'import'), dom5_1.predicates.hasAttrValue('rel', 'lazy-import')), dom5_1.predicates.hasAttr('href'), dom5_1.predicates.OR(dom5_1.predicates.hasAttrValue('type', 'text/html'), dom5_1.predicates.hasAttrValue('type', 'html'), dom5_1.predicates.NOT(dom5_1.predicates.hasAttr('type'))));
exports.stylesheetImport = dom5_1.predicates.AND(dom5_1.predicates.hasTagName('link'), dom5_1.predicates.hasAttrValue('rel', 'import'), dom5_1.predicates.hasAttr('href'), dom5_1.predicates.hasAttrValue('type', 'css'));

@@ -39,0 +39,0 @@ exports.hiddenDiv = dom5_1.predicates.AND(dom5_1.predicates.hasTagName('div'), dom5_1.predicates.hasAttr('hidden'), dom5_1.predicates.hasAttr('by-polymer-bundler'));

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

"use strict";
/**

@@ -14,3 +15,2 @@ * @license

*/
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -17,0 +17,0 @@ return new (P || (P = Promise))(function (resolve, reject) {

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

"use strict";
/**

@@ -14,3 +15,2 @@ * @license

*/
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -17,0 +17,0 @@ /// <reference path="../../node_modules/@types/chai/index.d.ts" />

@@ -125,3 +125,4 @@ "use strict";

test('svg is nested correctly', () => __awaiter(this, void 0, void 0, function* () {
const svg = dom5.query(yield bundle(inputPath), matchers.template)['content']
const opts = { inlineScripts: false, inlineCss: false };
const svg = dom5.query(yield bundle(inputPath, opts), matchers.template)['content']
.childNodes[1];

@@ -141,2 +142,20 @@ assert.equal(svg.childNodes.filter(dom5.isElement).length, 6);

}));
test('lazy imports are treated like entrypoints', () => __awaiter(this, void 0, void 0, function* () {
const bundler = new bundler_1.Bundler({
analyzer: new polymer_analyzer_1.Analyzer({ urlLoader: new polymer_analyzer_1.FSUrlLoader('test/html/imports') })
});
const manifest = yield bundler.generateManifest(['lazy-imports.html']);
const documents = yield bundler.bundle(manifest);
const lazyImports = parse5.serialize(documents.get('lazy-imports.html').ast);
assert.include(lazyImports, '<link rel="lazy-import" href="lazy-imports/lazy-import-1.html">', 'lazy-imports.html should keep link to lazy-import-1.html');
assert.include(lazyImports, '<link rel="lazy-import" href="lazy-imports/lazy-import-2.html">', 'lazy-imports.html should keep link to lazy-import-2.html');
const lazyImport1 = parse5.serialize(documents.get('lazy-imports/lazy-import-1.html').ast);
assert.include(lazyImport1, '<link rel="import" href="../shared_bundle_1.html">', 'lazy-import-1.html should have a link to shared_bundle_1.html');
assert.include(lazyImport1, '<link rel="lazy-import" href="shared-eager-and-lazy-import-1.html">', 'lazy-import-1.html should keep link to lazy-import shared-eager-and-lazy-import-1.html');
const lazyImport2 = parse5.serialize(documents.get('lazy-imports/lazy-import-2.html').ast);
assert.include(lazyImport2, '<link rel="import" href="../shared_bundle_1.html">', 'lazy-import-2.html should have a link to shared_bundle_1.html');
assert.include(lazyImport2, '<link rel="import" href="shared-eager-and-lazy-import-1.html">', 'lazy-import-2.html should keep link to import shared-eager-and-lazy-import-1.html');
const sharedEagerBundle = parse5.serialize(documents.get('shared_bundle_1.html').ast);
assert.include(sharedEagerBundle, '<div id="shared-eager-import-2">');
}));
test('Handle <base> tag', () => __awaiter(this, void 0, void 0, function* () {

@@ -165,4 +184,4 @@ const span = preds.AND(preds.hasTagName('span'), preds.hasAttrValue('href', 'imports/hello'));

}));
test('Scripts are not inlined by default', () => __awaiter(this, void 0, void 0, function* () {
const scripts = dom5.queryAll(yield bundle('test/html/external.html'), matchers.externalJavascript);
test('Scripts are not inlined if specified', () => __awaiter(this, void 0, void 0, function* () {
const scripts = dom5.queryAll(yield bundle('test/html/external.html', { inlineScripts: false }), matchers.externalJavascript);
assert.isAbove(scripts.length, 0, 'scripts were inlined');

@@ -188,3 +207,3 @@ scripts.forEach(function (s) {

test('Imports and scripts are ordered correctly', () => __awaiter(this, void 0, void 0, function* () {
const doc = yield bundle('test/html/order-test.html');
const doc = yield bundle('test/html/order-test.html', { inlineScripts: false });
const expectedOrder = [

@@ -296,3 +315,3 @@ 'first-script',

const linkMatcher = preds.AND(preds.hasTagName('link'), preds.hasAttrValue('rel', 'import'));
const options = { excludes: ['test/html/imports/'] };
const options = { excludes: ['imports/'] };
const doc = yield bundle('test/html/default.html', options);

@@ -305,2 +324,3 @@ const links = dom5.queryAll(doc, linkMatcher);

assert.equal(links.length, 1);
assert.equal(dom5.getAttribute(links[0], 'href'), 'imports/simple-import.html');
}));

@@ -307,0 +327,0 @@ });

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -24,53 +32,54 @@ /**

suite('Bundler', () => {
const common = 'test/html/shards/polymer_style_project/common.html';
const dep1 = 'test/html/shards/polymer_style_project/dep1.html';
const dep2 = 'test/html/shards/polymer_style_project/dep2.html';
const endpoint1 = 'test/html/shards/polymer_style_project/endpoint1.html';
const endpoint2 = 'test/html/shards/polymer_style_project/endpoint2.html';
let analyzer;
beforeEach(() => {
analyzer = new polymer_analyzer_1.Analyzer({ urlLoader: new polymer_analyzer_1.FSUrlLoader() });
});
const expectedEntrypointsToDeps = new Map([
[common, new Set([common])],
[endpoint1, new Set([common, dep1, endpoint1])],
[endpoint2, new Set([common, dep2, endpoint1, endpoint2, dep1])],
]);
const deepMapSetEqual = (actual, expected) => {
// Check keys
const actualEntries = Array.from(actual.entries());
const expectedEntries = Array.from(expected.entries());
// Iterate and check values
const sortEntry = (a, b) => a[0].localeCompare(b[0]);
actualEntries.sort(sortEntry);
expectedEntries.sort(sortEntry);
if (actualEntries.length !== expectedEntries.length) {
throw new chai.AssertionError(`Expected ${expectedEntries.length} entries, ` +
`got ${actualEntries.length} instead`);
}
for (let i = 0; i < actualEntries.length; i++) {
const actualEntry = actualEntries[i];
const expectedEntry = expectedEntries[i];
if (actualEntry[0] !== expectedEntry[0]) {
throw 'keys mismatched';
function serializeMap(map) {
let s = '';
for (const key of Array.from(map.keys()).sort()) {
const set = map.get(key);
s = s + `${key}:\n`;
for (const value of Array.from(set).sort()) {
s = s + ` - ${value}\n`;
}
if (actualEntry[1].size !== expectedEntry[1].size) {
throw new chai.AssertionError(`Wrong number of entries for key: ${actualEntry[0]}`);
}
for (const setEntry of actualEntry[1].values()) {
if (!expectedEntry[1].has(setEntry)) {
throw new chai.AssertionError(`Found unexpected key: ${setEntry}`);
}
}
}
};
return s;
}
suite('Deps index tests', () => {
test('with 3 endpoints, all deps are properly assigned to the index', () => {
return deps_index_1.buildDepsIndex([common, endpoint1, endpoint2], analyzer)
.then((index) => {
deepMapSetEqual(index.entrypointToDeps, expectedEntrypointsToDeps);
test('with 3 endpoints', () => __awaiter(this, void 0, void 0, function* () {
const common = 'common.html';
const dep1 = 'dep1.html';
const dep2 = 'dep2.html';
const endpoint1 = 'endpoint1.html';
const endpoint2 = 'endpoint2.html';
const analyzer = new polymer_analyzer_1.Analyzer({
urlLoader: new polymer_analyzer_1.FSUrlLoader('test/html/shards/polymer_style_project')
});
});
const expectedEntrypointsToDeps = new Map([
[common, new Set([common])],
[endpoint1, new Set([common, dep1, endpoint1])],
[endpoint2, new Set([common, dep2, endpoint1, endpoint2, dep1])],
]);
const index = yield deps_index_1.buildDepsIndex([common, endpoint1, endpoint2], analyzer);
chai.assert.deepEqual(serializeMap(index.entrypointToDeps), serializeMap(expectedEntrypointsToDeps));
}));
// Deps index currently treats lazy imports as eager imports.
test('with lazy imports', () => __awaiter(this, void 0, void 0, function* () {
const entrypoint = 'lazy-imports.html';
const lazyImport1 = 'lazy-imports/lazy-import-1.html';
const lazyImport2 = 'lazy-imports/lazy-import-2.html';
const shared1 = 'lazy-imports/shared-eager-import-1.html';
const shared2 = 'lazy-imports/shared-eager-import-2.html';
const shared3 = 'lazy-imports/shared-eager-and-lazy-import-1.html';
const deeply1 = 'lazy-imports/deeply-lazy-import-1.html';
const deeply2 = 'lazy-imports/deeply-lazy-imports-eager-import-1.html';
const analyzer = new polymer_analyzer_1.Analyzer({ urlLoader: new polymer_analyzer_1.FSUrlLoader('test/html/imports') });
const expectedEntrypointsToDeps = new Map([
[entrypoint, new Set([entrypoint])],
[lazyImport1, new Set([lazyImport1, shared1, shared2])],
[lazyImport2, new Set([lazyImport2, shared1, shared2, shared3])],
[shared3, new Set([shared3])],
[deeply1, new Set([deeply1, deeply2])],
]);
const index = yield deps_index_1.buildDepsIndex([entrypoint], analyzer);
chai.assert.deepEqual(serializeMap(index.entrypointToDeps), serializeMap(expectedEntrypointsToDeps));
}));
});
});
//# sourceMappingURL=deps-index_test.js.map

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

"use strict";
/**

@@ -14,3 +15,2 @@ * @license

*/
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -17,0 +17,0 @@ /// <reference path="../../node_modules/@types/chai/index.d.ts" />

{
"name": "polymer-bundler",
"version": "2.0.0-pre.12",
"version": "2.0.0-pre.13",
"description": "Process Web Components into one output file",

@@ -26,3 +26,3 @@ "main": "lib/bundler.js",

"path-posix": "^1.0.0",
"polymer-analyzer": "2.0.0-alpha.38",
"polymer-analyzer": "2.0.0-alpha.40",
"source-map": "^0.5.6"

@@ -29,0 +29,0 @@ },

@@ -90,3 +90,3 @@ [![NPM version](http://img.shields.io/npm/v/polymer-bundler.svg)](https://npmjs.org/package/polymer-bundler)

- `excludes`: An array of strings with regular expressions to exclude paths from being inlined.
- `excludes`: URLs to exclude from inlining. URLs may represent files or folders. HTML tags referencing excluded URLs are preserved.
- `inlineCss`: Inline external stylesheets.

@@ -93,0 +93,0 @@ - `inlineScripts`: Inline external scripts.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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