Socket
Socket
Sign inDemoInstall

@polymer/gen-typescript-declarations

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

@polymer/gen-typescript-declarations - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

3

CHANGELOG.md

@@ -9,2 +9,5 @@ # Changelog

## [1.2.2] - 2018-03-19
- Fix bad file path handling which broke Windows support.
## [1.2.1] - 2018-03-09

@@ -11,0 +14,0 @@ - Fix bug where if a package name was a prefix of one of its dependencies (e.g.

8

lib/gen-ts.js

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

const analyzer = require("polymer-analyzer");
const url = require("url");
const vscode_uri_1 = require("vscode-uri");
const closure_types_1 = require("./closure-types");

@@ -133,7 +133,7 @@ const ts = require("./ts-ast");

function analyzerUrlToRelativePath(analyzerUrl, rootDir) {
const parsed = url.parse(analyzerUrl);
if (parsed.protocol !== 'file:' || parsed.host || !parsed.path) {
const parsed = vscode_uri_1.default.parse(analyzerUrl);
if (parsed.scheme !== 'file' || parsed.authority || !parsed.fsPath) {
return undefined;
}
return path.relative(rootDir, parsed.path);
return path.relative(rootDir, parsed.fsPath);
}

@@ -140,0 +140,0 @@ /**

{
"name": "@polymer/gen-typescript-declarations",
"version": "1.2.1",
"version": "1.2.2",
"description": "Generate TypeScript type declarations for Polymer components.",

@@ -25,3 +25,4 @@ "main": "lib/gen-ts.js",

"minimatch": "^3.0.4",
"polymer-analyzer": "=3.0.0-pre.14"
"polymer-analyzer": "=3.0.0-pre.14",
"vscode-uri": "^1.0.3"
},

@@ -35,2 +36,3 @@ "devDependencies": {

"mocha": "^5.0.0",
"rimraf": "^2.6.2",
"source-map-support": "^0.5.0",

@@ -41,3 +43,3 @@ "tsc-then": "^1.0.1",

"scripts": {
"clean": "rm -rf lib",
"clean": "rimraf lib",
"format": "find src -name '*.ts' -not -path 'src/test/fixtures/*' -not -path 'src/test/goldens/*' | xargs clang-format --style=file -i",

@@ -44,0 +46,0 @@ "build": "npm run clean && tsc",

@@ -16,3 +16,3 @@ /**

import {Function as AnalyzerFunction} from 'polymer-analyzer/lib/javascript/function';
import * as url from 'url';
import Uri from 'vscode-uri';

@@ -187,7 +187,7 @@ import {closureParamToTypeScript, closureTypeToTypeScript} from './closure-types';

analyzerUrl: string, rootDir: string): string|undefined {
const parsed = url.parse(analyzerUrl);
if (parsed.protocol !== 'file:' || parsed.host || !parsed.path) {
const parsed = Uri.parse(analyzerUrl);
if (parsed.scheme !== 'file' || parsed.authority || !parsed.fsPath) {
return undefined;
}
return path.relative(rootDir, parsed.path);
return path.relative(rootDir, parsed.fsPath);
}

@@ -194,0 +194,0 @@

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