Comparing version 4.0.2 to 4.0.3
@@ -5,24 +5,18 @@ # Change Log | ||
### [4.0.2](https://www.github.com/yargs/y18n/compare/y18n-v4.0.1...y18n-v4.0.2) (2021-04-07) | ||
### [4.0.3](https://www.github.com/yargs/y18n/compare/y18n-v4.0.2...y18n-v4.0.3) (2021-04-07) | ||
### Bug Fixes | ||
* **security:** ensure entry exists for backport ([#120](https://www.github.com/yargs/y18n/issues/120)) ([b22c0df](https://www.github.com/yargs/y18n/commit/b22c0df59d0851d7be9fd1d51f6a5ee974c9fc94)) | ||
### [5.0.4](https://www.github.com/yargs/y18n/compare/v5.0.3...v5.0.4) (2020-10-16) | ||
### Bug Fixes | ||
* **exports:** node 13.0 and 13.1 require the dotted object form _with_ a string fallback ([#105](https://www.github.com/yargs/y18n/issues/105)) ([4f85d80](https://www.github.com/yargs/y18n/commit/4f85d80dbaae6d2c7899ae394f7ad97805df4886)) | ||
* **release:** 4.x.x should not enforce Node 10 ([#126](https://www.github.com/yargs/y18n/issues/126)) ([1e21a53](https://www.github.com/yargs/y18n/commit/1e21a536e9135d8403a47be88922157a706b7cde)) | ||
### [5.0.3](https://www.github.com/yargs/y18n/compare/v5.0.2...v5.0.3) (2020-10-16) | ||
### 4.0.1 (2020-11-30) | ||
### Bug Fixes | ||
* **exports:** node 13.0-13.6 require a string fallback ([#103](https://www.github.com/yargs/y18n/issues/103)) ([e39921e](https://www.github.com/yargs/y18n/commit/e39921e1017f88f5d8ea97ddea854ffe92d68e74)) | ||
* address prototype pollution issue ([#108](https://www.github.com/yargs/y18n/issues/108)) ([a9ac604](https://www.github.com/yargs/y18n/commit/a9ac604abf756dec9687be3843e2c93bfe581f25)) | ||
### [5.0.2](https://www.github.com/yargs/y18n/compare/v5.0.1...v5.0.2) (2020-10-01) | ||
<a name="4.0.0"></a> | ||
# [4.0.0](https://github.com/yargs/y18n/compare/v3.2.1...v4.0.0) (2017-10-10) | ||
@@ -32,33 +26,2 @@ | ||
* **deno:** update types for deno ^1.4.0 ([#100](https://www.github.com/yargs/y18n/issues/100)) ([3834d9a](https://www.github.com/yargs/y18n/commit/3834d9ab1332f2937c935ada5e76623290efae81)) | ||
### [5.0.1](https://www.github.com/yargs/y18n/compare/v5.0.0...v5.0.1) (2020-09-05) | ||
### Bug Fixes | ||
* main had old index path ([#98](https://www.github.com/yargs/y18n/issues/98)) ([124f7b0](https://www.github.com/yargs/y18n/commit/124f7b047ba9596bdbdf64459988304e77f3de1b)) | ||
## [5.0.0](https://www.github.com/yargs/y18n/compare/v4.0.0...v5.0.0) (2020-09-05) | ||
### ⚠ BREAKING CHANGES | ||
* exports maps are now used, which modifies import behavior. | ||
* drops Node 6 and 4. begin following Node.js LTS schedule (#89) | ||
### Features | ||
* add support for ESM and Deno [#95](https://www.github.com/yargs/y18n/issues/95)) ([4d7ae94](https://www.github.com/yargs/y18n/commit/4d7ae94bcb42e84164e2180366474b1cd321ed94)) | ||
### Build System | ||
* drops Node 6 and 4. begin following Node.js LTS schedule ([#89](https://www.github.com/yargs/y18n/issues/89)) ([3cc0c28](https://www.github.com/yargs/y18n/commit/3cc0c287240727b84eaf1927f903612ec80f5e43)) | ||
## [4.0.0](https://github.com/yargs/y18n/compare/v3.2.1...v4.0.0) (2017-10-10) | ||
### Bug Fixes | ||
* allow support for falsy values like 0 in tagged literal ([#45](https://github.com/yargs/y18n/issues/45)) ([c926123](https://github.com/yargs/y18n/commit/c926123)) | ||
@@ -65,0 +28,0 @@ |
{ | ||
"name": "y18n", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "the bare-bones internationalization library used by yargs", | ||
"exports": { | ||
".": [ | ||
{ | ||
"import": "./index.mjs", | ||
"require": "./build/index.cjs" | ||
}, | ||
"./build/index.cjs" | ||
] | ||
"main": "index.js", | ||
"scripts": { | ||
"pretest": "standard", | ||
"test": "nyc mocha", | ||
"coverage": "nyc report --reporter=text-lcov | coveralls", | ||
"release": "standard-version" | ||
}, | ||
"type": "module", | ||
"module": "./build/lib/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:yargs/y18n.git" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
@@ -21,51 +24,17 @@ "i18n", | ||
], | ||
"homepage": "https://github.com/yargs/y18n", | ||
"author": "Ben Coe <ben@npmjs.com>", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/yargs/y18n/issues" | ||
}, | ||
"repository": "yargs/y18n", | ||
"license": "ISC", | ||
"author": "Ben Coe <bencoe@gmail.com>", | ||
"main": "./build/index.cjs", | ||
"scripts": { | ||
"check": "standardx '**/*.ts' '**/*.cjs' '**/*.mjs'", | ||
"fix": "standardx --fix '**/*.ts' '**/*.cjs' '**/*.mjs'", | ||
"pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", | ||
"test": "c8 --reporter=text --reporter=html mocha test/*.cjs", | ||
"test:esm": "c8 --reporter=text --reporter=html mocha test/esm/*.mjs", | ||
"posttest": "npm run check", | ||
"coverage": "c8 report --check-coverage", | ||
"precompile": "rimraf build", | ||
"compile": "tsc", | ||
"postcompile": "npm run build:cjs", | ||
"build:cjs": "rollup -c", | ||
"prepare": "npm run compile" | ||
}, | ||
"homepage": "https://github.com/yargs/y18n", | ||
"devDependencies": { | ||
"@types/node": "^14.6.4", | ||
"@wessberg/rollup-plugin-ts": "^1.3.1", | ||
"c8": "^7.3.0", | ||
"chai": "^4.0.1", | ||
"cross-env": "^7.0.2", | ||
"gts": "^3.0.0", | ||
"mocha": "^8.0.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.26.10", | ||
"standardx": "^5.0.0", | ||
"ts-transform-default-export": "^1.0.2", | ||
"typescript": "^4.0.0" | ||
}, | ||
"files": [ | ||
"build", | ||
"index.mjs", | ||
"!*.d.ts" | ||
], | ||
"engines": { | ||
"node": ">=10" | ||
}, | ||
"standardx": { | ||
"ignore": [ | ||
"build" | ||
] | ||
"coveralls": "^3.0.0", | ||
"mocha": "^4.0.1", | ||
"nyc": "^11.0.1", | ||
"rimraf": "^2.5.0", | ||
"standard": "^10.0.0-beta.0", | ||
"standard-version": "^4.2.0" | ||
} | ||
} |
# y18n | ||
[![Build Status][travis-image]][travis-url] | ||
[![Coverage Status][coveralls-image]][coveralls-url] | ||
[![NPM version][npm-image]][npm-url] | ||
@@ -16,5 +18,5 @@ [![js-standard-style][standard-image]][standard-url] | ||
```js | ||
const __ = require('y18n')().__; | ||
var __ = require('y18n').__ | ||
console.log(__('my awesome string %s', 'foo')); | ||
console.log(__('my awesome string %s', 'foo')) | ||
``` | ||
@@ -29,7 +31,6 @@ | ||
```js | ||
const __ = require('y18n')().__; | ||
var __ = require('y18n').__ | ||
var str = 'foo' | ||
const str = 'foo'; | ||
console.log(__`my awesome string ${str}`); | ||
console.log(__`my awesome string ${str}`) | ||
``` | ||
@@ -44,5 +45,5 @@ | ||
```js | ||
const __n = require('y18n')().__n; | ||
var __n = require('y18n').__n | ||
console.log(__n('one fish %s', '%d fishes %s', 2, 'foo')); | ||
console.log(__n('one fish %s', '%d fishes %s', 2, 'foo')) | ||
``` | ||
@@ -54,19 +55,2 @@ | ||
## Deno Example | ||
As of `v5` `y18n` supports [Deno](https://github.com/denoland/deno): | ||
```typescript | ||
import y18n from "https://deno.land/x/y18n/deno.ts"; | ||
const __ = y18n({ | ||
locale: 'pirate', | ||
directory: './test/locales' | ||
}).__ | ||
console.info(__`Hi, ${'Ben'} ${'Coe'}!`) | ||
``` | ||
You will need to run with `--allow-read` to load alternative locales. | ||
## JSON Language Files | ||
@@ -118,8 +102,2 @@ | ||
## Supported Node.js Versions | ||
Libraries in this ecosystem make a best effort to track | ||
[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a | ||
post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a). | ||
## License | ||
@@ -129,2 +107,6 @@ | ||
[travis-url]: https://travis-ci.org/yargs/y18n | ||
[travis-image]: https://img.shields.io/travis/yargs/y18n.svg | ||
[coveralls-url]: https://coveralls.io/github/yargs/y18n | ||
[coveralls-image]: https://img.shields.io/coveralls/yargs/y18n.svg | ||
[npm-url]: https://npmjs.org/package/y18n | ||
@@ -131,0 +113,0 @@ [npm-image]: https://img.shields.io/npm/v/y18n.svg |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
7
1
10991
5
153
110
No