@angular/language-service
Advanced tools
Comparing version 14.3.0 to 16.2.12
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/language-service/api" /> | ||
/** | ||
@@ -28,3 +27,3 @@ * @module | ||
} | ||
export declare type GetTcbResponse = { | ||
export type GetTcbResponse = { | ||
/** | ||
@@ -47,4 +46,4 @@ * The filename of the SourceFile this typecheck block belongs to. | ||
}; | ||
export declare type GetComponentLocationsForTemplateResponse = ts.DocumentSpan[]; | ||
export declare type GetTemplateLocationForComponentResponse = ts.DocumentSpan | undefined; | ||
export type GetComponentLocationsForTemplateResponse = ts.DocumentSpan[]; | ||
export type GetTemplateLocationForComponentResponse = ts.DocumentSpan | undefined; | ||
/** | ||
@@ -58,3 +57,4 @@ * `NgLanguageService` describes an instance of an Angular language service, | ||
getTemplateLocationForComponent(fileName: string, position: number): GetTemplateLocationForComponentResponse; | ||
getTypescriptLanguageService(): ts.LanguageService; | ||
} | ||
export declare function isNgLanguageService(ls: ts.LanguageService | NgLanguageService): ls is NgLanguageService; |
@@ -8,10 +8,7 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/language-service" /> | ||
import * as ts from 'typescript/lib/tsserverlibrary'; | ||
declare const factory: ts.server.PluginModuleFactory; | ||
/** | ||
* Tsserver expects `@angular/language-service` to provide a factory function | ||
* as the default export of the package. See | ||
* https://github.com/microsoft/TypeScript/blob/f4d0ea6539edb6d8f70b626132d6f9ac1ac4281a/src/server/project.ts#L1611 | ||
*/ | ||
import {factory} from './plugin-factory'; | ||
// Tsserver expects `@angular/language-service` to provide a factory function | ||
// as the default export of the package. | ||
export = factory; |
36
index.js
@@ -8,31 +8,7 @@ /** | ||
*/ | ||
(function (factory) { | ||
if (typeof module === "object" && typeof module.exports === "object") { | ||
var v = factory(require, exports); | ||
if (v !== undefined) module.exports = v; | ||
} | ||
else if (typeof define === "function" && define.amd) { | ||
define("@angular/language-service", ["require", "exports"], factory); | ||
} | ||
})(function (require, exports) { | ||
"use strict"; | ||
const factory = (tsModule) => { | ||
let plugin; | ||
return { | ||
create(info) { | ||
plugin = require(`./bundles/language-service.js`)(tsModule); | ||
return plugin.create(info); | ||
}, | ||
getExternalFiles(project) { | ||
var _a, _b; | ||
return (_b = (_a = plugin === null || plugin === void 0 ? void 0 : plugin.getExternalFiles) === null || _a === void 0 ? void 0 : _a.call(plugin, project)) !== null && _b !== void 0 ? _b : []; | ||
}, | ||
onConfigurationChanged(config) { | ||
var _a; | ||
(_a = plugin === null || plugin === void 0 ? void 0 : plugin.onConfigurationChanged) === null || _a === void 0 ? void 0 : _a.call(plugin, config); | ||
}, | ||
}; | ||
}; | ||
return factory; | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9sYW5ndWFnZS1zZXJ2aWNlL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRzs7Ozs7Ozs7Ozs7SUFVSCxNQUFNLE9BQU8sR0FBa0MsQ0FBQyxRQUFRLEVBQWdCLEVBQUU7UUFDeEUsSUFBSSxNQUFvQixDQUFDO1FBRXpCLE9BQU87WUFDTCxNQUFNLENBQUMsSUFBZ0M7Z0JBQ3JDLE1BQU0sR0FBRyxPQUFPLENBQUMsK0JBQStCLENBQUMsQ0FBQyxRQUFRLENBQUMsQ0FBQztnQkFDNUQsT0FBTyxNQUFNLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDO1lBQzdCLENBQUM7WUFDRCxnQkFBZ0IsQ0FBQyxPQUEwQjs7Z0JBQ3pDLE9BQU8sTUFBQSxNQUFBLE1BQU0sYUFBTixNQUFNLHVCQUFOLE1BQU0sQ0FBRSxnQkFBZ0IsdURBQUcsT0FBTyxDQUFDLG1DQUFJLEVBQUUsQ0FBQztZQUNuRCxDQUFDO1lB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5cbiAgcmV0dXJuIHtcbiAgICBjcmVhdGUoaW5mbzogdHMuc2VydmVyLlBsdWdpbkNyZWF0ZUluZm8pOiBOZ0xhbmd1YWdlU2VydmljZSB7XG4gICAgICBwbHVnaW4gPSByZXF1aXJlKGAuL2J1bmRsZXMvbGFuZ3VhZ2Utc2VydmljZS5qc2ApKHRzTW9kdWxlKTtcbiAgICAgIHJldHVybiBwbHVnaW4uY3JlYXRlKGluZm8pO1xuICAgIH0sXG4gICAgZ2V0RXh0ZXJuYWxGaWxlcyhwcm9qZWN0OiB0cy5zZXJ2ZXIuUHJvamVjdCk6IHN0cmluZ1tdIHtcbiAgICAgIHJldHVybiBwbHVnaW4/LmdldEV4dGVybmFsRmlsZXM/Lihwcm9qZWN0KSA/PyBbXTtcbiAgICB9LFxuICAgIG9uQ29uZmlndXJhdGlvbkNoYW5nZWQoY29uZmlnOiBQbHVnaW5Db25maWcpOiB2b2lkIHtcbiAgICAgIHBsdWdpbj8ub25Db25maWd1cmF0aW9uQ2hhbmdlZD8uKGNvbmZpZyk7XG4gICAgfSxcbiAgfTtcbn07XG5cbi8qKlxuICogVHNzZXJ2ZXIgZXhwZWN0cyBgQGFuZ3VsYXIvbGFuZ3VhZ2Utc2VydmljZWAgdG8gcHJvdmlkZSBhIGZhY3RvcnkgZnVuY3Rpb25cbiAqIGFzIHRoZSBkZWZhdWx0IGV4cG9ydCBvZiB0aGUgcGFja2FnZS4gU2VlXG4gKiBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvYmxvYi9mNGQwZWE2NTM5ZWRiNmQ4ZjcwYjYyNjEzMmQ2ZjlhYzFhYzQyODFhL3NyYy9zZXJ2ZXIvcHJvamVjdC50cyNMMTYxMVxuICovXG5leHBvcnQgPSBmYWN0b3J5O1xuIl19 | ||
const {factory} = require('./factory_bundle'); | ||
// Tsserver expects `@angular/language-service` to provide a factory function | ||
// as the default export of the package. | ||
module.exports = factory; |
{ | ||
"name": "@angular/language-service", | ||
"version": "14.3.0", | ||
"version": "16.2.12", | ||
"description": "Angular - language services", | ||
@@ -10,4 +10,17 @@ "main": "./index.js", | ||
"engines": { | ||
"node": "^14.15.0 || >=16.10.0" | ||
"node": "^16.14.0 || >=18.10.0" | ||
}, | ||
"exports": { | ||
".": { | ||
"types": "./index.d.ts", | ||
"default": "./index.js" | ||
}, | ||
"./package.json": { | ||
"default": "./package.json" | ||
}, | ||
"./api": { | ||
"types": "./api.d.ts", | ||
"default": "./api_bundle.js" | ||
} | ||
}, | ||
"repository": { | ||
@@ -14,0 +27,0 @@ "type": "git", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
15990141
10
0
18
1169