@fluent/bundle
Advanced tools
Comparing version 0.16.0 to 0.16.1
# Changelog | ||
## @fluent/bundle 0.16.1 (April 9, 2021) | ||
- Separate FluentNumber/Datetime opts when used in DATETIME/NUMBER. (#526) | ||
## @fluent/bundle 0.16.0 (July 1, 2020) | ||
@@ -4,0 +8,0 @@ |
@@ -66,3 +66,3 @@ /** | ||
} | ||
if (arg instanceof FluentNumber || arg instanceof FluentDateTime) { | ||
if (arg instanceof FluentNumber) { | ||
return new FluentNumber(arg.valueOf(), { | ||
@@ -73,2 +73,7 @@ ...arg.opts, | ||
} | ||
if (arg instanceof FluentDateTime) { | ||
return new FluentNumber(arg.valueOf(), { | ||
...values(opts, NUMBER_ALLOWED) | ||
}); | ||
} | ||
throw new TypeError("Invalid argument to NUMBER"); | ||
@@ -131,3 +136,3 @@ } | ||
} | ||
if (arg instanceof FluentNumber || arg instanceof FluentDateTime) { | ||
if (arg instanceof FluentDateTime) { | ||
return new FluentDateTime(arg.valueOf(), { | ||
@@ -138,3 +143,8 @@ ...arg.opts, | ||
} | ||
if (arg instanceof FluentNumber) { | ||
return new FluentDateTime(arg.valueOf(), { | ||
...values(opts, DATETIME_ALLOWED) | ||
}); | ||
} | ||
throw new TypeError("Invalid argument to DATETIME"); | ||
} |
@@ -11,2 +11,2 @@ /** | ||
export { FluentResource } from "./resource.js"; | ||
export { FluentValue, FluentType, FluentFunction, FluentNumber, FluentDateTime } from "./types.js"; | ||
export { FluentValue, FluentType, FluentFunction, FluentNone, FluentNumber, FluentDateTime } from "./types.js"; |
@@ -11,2 +11,2 @@ /** | ||
export { FluentResource } from "./resource.js"; | ||
export { FluentType, FluentNumber, FluentDateTime } from "./types.js"; | ||
export { FluentType, FluentNone, FluentNumber, FluentDateTime } from "./types.js"; |
17
index.js
@@ -1,2 +0,2 @@ | ||
/* @fluent/bundle@0.16.0 */ | ||
/* @fluent/bundle@0.16.1 */ | ||
(function (global, factory) { | ||
@@ -463,3 +463,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
} | ||
if (arg instanceof FluentNumber || arg instanceof FluentDateTime) { | ||
if (arg instanceof FluentNumber) { | ||
return new FluentNumber(arg.valueOf(), { | ||
@@ -470,2 +470,7 @@ ...arg.opts, | ||
} | ||
if (arg instanceof FluentDateTime) { | ||
return new FluentNumber(arg.valueOf(), { | ||
...values(opts, NUMBER_ALLOWED) | ||
}); | ||
} | ||
throw new TypeError("Invalid argument to NUMBER"); | ||
@@ -528,3 +533,3 @@ } | ||
} | ||
if (arg instanceof FluentNumber || arg instanceof FluentDateTime) { | ||
if (arg instanceof FluentDateTime) { | ||
return new FluentDateTime(arg.valueOf(), { | ||
@@ -535,2 +540,7 @@ ...arg.opts, | ||
} | ||
if (arg instanceof FluentNumber) { | ||
return new FluentDateTime(arg.valueOf(), { | ||
...values(opts, DATETIME_ALLOWED) | ||
}); | ||
} | ||
throw new TypeError("Invalid argument to DATETIME"); | ||
@@ -1136,2 +1146,3 @@ } | ||
exports.FluentDateTime = FluentDateTime; | ||
exports.FluentNone = FluentNone; | ||
exports.FluentNumber = FluentNumber; | ||
@@ -1138,0 +1149,0 @@ exports.FluentResource = FluentResource; |
{ | ||
"name": "@fluent/bundle", | ||
"description": "Localization library for expressive translations.", | ||
"version": "0.16.0", | ||
"version": "0.16.1", | ||
"homepage": "https://projectfluent.org", | ||
@@ -46,5 +46,5 @@ "author": "Mozilla <l10n-drivers@mozilla.org>", | ||
"devDependencies": { | ||
"@fluent/dedent": "^0.1.0", | ||
"@fluent/dedent": "^0.3.0", | ||
"sinon": "^4.2.2" | ||
} | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
2722
131195
20
1