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

@vscode/l10n

Package Overview
Dependencies
Maintainers
7
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vscode/l10n - npm Package Compare versions

Comparing version 0.0.6 to 0.0.8

dist/browser.js

33

dist/main.d.ts
/**
* @public
* Must be run as soon as possible. Loads the bundle from the given URI or contents.
* @param config - The uri or contents of the bundle.
* Loads the bundle from the given contents. Must be run before the first call to any `l10n.t()` variant.
* **Note** The best way to set this is to pass the value of the VS Code API `vscode.l10n.contents`
* to the process that uses `@vscode/l10n`.
* @param config - An object that contains one property, contents, which should contain the contents of the bundle.
*/
export declare function config(config: {
uri: string | URL;
} | {
contents: string | l10nJsonFormat;

@@ -14,2 +14,27 @@ }): void;

* @public
* Loads the bundle from the given fsPath. Must be run before the first call to any `l10n.t()` variant.
* **Warning** This is not implemented in the browser and will throw an Error.
* **Note** The best way to set this is to pass the value of the VS Code API `vscode.l10n.uri.fsPath`
* to the process that uses `@vscode/l10n`.
* @param config - An object that contains one property, fsPath, which should be a path to a file that contains the bundle.
*/
export declare function config(config: {
fsPath: string;
}): void;
/**
* @public
* Loads the bundle from the given URI using an asynchronous fetch request.
* **Warning** Since this is an asynchronous API, you need to ensure that it resolves before
* the first call to any `l10n.t()` variant.
* **Note** The best way to set this is to pass the value of the VS Code API `vscode.l10n.uri.toString()`
* to the process that uses `@vscode/l10n`.
* @param config - An object that contains one property, uri, which should be a URL to the bundle.
*/
export declare function config(config: {
uri: string | URL;
}): Promise<void>;
/**
* @public
* The format of package.nls.json and l10n bundle files.

@@ -16,0 +41,0 @@ */

10

package.json
{
"name": "@vscode/l10n",
"version": "0.0.6",
"version": "0.0.8",
"description": "A helper library to assist in localizing subprocesses spun up by VS Code extensions",

@@ -14,3 +14,7 @@ "author": "Microsoft Corporation",

},
"main": "dist/main.js",
"main": "./dist/main.js",
"browser": {
"./dist/main.js": "./dist/browser.js",
"./src/node/reader": "./src/browser/reader"
},
"types": "dist/main.d.ts",

@@ -25,2 +29,3 @@ "files": [

"@types/node": "^18.7.8",
"@types/node-fetch": "^2.6.2",
"@typescript-eslint/eslint-plugin": "^4.28.0",

@@ -33,2 +38,3 @@ "@typescript-eslint/parser": "^4.28.0",

"mock-fs": "^5.1.4",
"node-fetch": "^2.6.7",
"rimraf": "^3.0.2",

@@ -35,0 +41,0 @@ "ts-node": "^10.9.1",

@@ -5,3 +5,5 @@ # @vscode/l10n

> NOTE: You should _NOT_ use this library in your extension's main process. The translations are loaded into the main process by VS Code itself.
> **Note**
>
> You should _NOT_ use this library in your extension's main process. The translations are loaded into the main process by VS Code itself.

@@ -8,0 +10,0 @@ ## Usage

Sorry, the diff of this file is too big to display

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