Socket
Socket
Sign inDemoInstall

@angular/tsc-wrapped

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular/tsc-wrapped - npm Package Compare versions

Comparing version 4.2.3 to 4.2.4

2

package.json
{
"name": "@angular/tsc-wrapped",
"version": "4.2.3",
"version": "4.2.4",
"description": "Wraps the tsc CLI, allowing extensions.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/angular/angular/blob/master/tools/@angular/tsc-wrapped",

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

var functionDeclaration = node;
if (isExported(functionDeclaration)) {
if (isExported(functionDeclaration) && functionDeclaration.name) {
if (!metadata)

@@ -343,0 +343,0 @@ metadata = {};

@@ -578,5 +578,2 @@ "use strict";

describe('with interpolations', function () {
function createSource(text) {
return ts.createSourceFile('', text, ts.ScriptTarget.Latest, true);
}
function e(expr, prefix) {

@@ -740,6 +737,17 @@ var source = createSource((prefix || '') + " export let value = " + expr + ";");

it('should be able to collect a short-hand property value', function () {
var source = ts.createSourceFile('', "\n const children = { f1: 1 };\n export const r = [\n {path: ':locale', children}\n ];\n ", ts.ScriptTarget.Latest, true);
var source = createSource("\n const children = { f1: 1 };\n export const r = [\n {path: ':locale', children}\n ];\n ");
var metadata = collector.getMetadata(source);
expect(metadata.metadata).toEqual({ r: [{ path: ':locale', children: { f1: 1 } }] });
});
// #17518
it('should skip a default function', function () {
var source = createSource("\n export default function () {\n\n const mainRoutes = [\n {name: 'a', abstract: true, component: 'main'},\n\n {name: 'a.welcome', url: '/welcome', component: 'welcome'}\n ];\n\n return mainRoutes;\n\n }");
var metadata = collector.getMetadata(source);
expect(metadata).toBeUndefined();
});
it('should skip a named default export', function () {
var source = createSource("\n function mainRoutes() {\n\n const mainRoutes = [\n {name: 'a', abstract: true, component: 'main'},\n\n {name: 'a.welcome', url: '/welcome', component: 'welcome'}\n ];\n\n return mainRoutes;\n\n }\n\n exports = foo;\n ");
var metadata = collector.getMetadata(source);
expect(metadata).toBeUndefined();
});
});

@@ -806,2 +814,5 @@ function override(fileName, content) {

};
function createSource(text) {
return ts.createSourceFile('', text, ts.ScriptTarget.Latest, true);
}
//# sourceMappingURL=collector.spec.js.map

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