diff --git a/packages/babel-preset/index.js b/packages/babel-preset/index.js
index d99430a3..71852e79 100644
--- a/packages/babel-preset/index.js
+++ b/packages/babel-preset/index.js
@@ -151,10 +151,7 @@ function preset(api, explicitOptions = {}) {
const intlOpts =
typeof options.intl === 'object'
? options.intl
- : {
- prefix: explicitOptions.prefix,
- messagesDir: 'build/messages',
- };
+ : { prefix: explicitOptions.prefix };
if (!development) {
presets.push([intlPreset, intlOpts]);
diff --git a/packages/babel-preset/intl-preset.js b/packages/babel-preset/intl-preset.js
index f70d5bd6..826a465f 100644
--- a/packages/babel-preset/intl-preset.js
+++ b/packages/babel-preset/intl-preset.js
@@ -1,14 +1,43 @@
+const { dirname } = require('path');
+
const intlPlugin = require('babel-plugin-react-intl').default;
+const readPkgUp = require('read-pkg-up');
+
+const PREFIXES = new Map();
+
+function getPrefixFromPackage(filename) {
+ const cwd = dirname(filename);
+
+ let prefix = PREFIXES.get(cwd);
+
+ if (prefix == null) {
+ const pkgUpResult = readPkgUp.sync({ cwd });
+ prefix = pkgUpResult ? `${pkgUpResult.packageJson.name}:` : '';
+
+ PREFIXES.set(cwd, prefix);
+ }
-const namespacePlugin = require('./namespace-plugin');
+ return prefix;
+}
module.exports = function reactIntlPreset(_, options = {}) {
const { prefix, ...rest } = options;
+ const normalizedPrefix =
+ !prefix || prefix.endsWith(':') ? prefix : `${prefix}:`;
return {
plugins: [
- [namespacePlugin, { prefix }],
- [intlPlugin, { extractSourceLocation: true, ...rest }],
+ [
+ intlPlugin,
+ {
+ // should be off generally but IDK what it will break right now, so soft deprecation
+ extractFromFormatMessageCall: false,
+ ...rest,
+ overrideIdFn: (id, _msg, _desc, filename) => {
+ return `${normalizedPrefix || getPrefixFromPackage(filename)}${id}`;
+ },
+ },
+ ],
],
};
};
diff --git a/packages/babel-preset/namespace-plugin.js b/packages/babel-preset/namespace-plugin.js
deleted file mode 100644
index 20c4402a..00000000
--- a/packages/babel-preset/namespace-plugin.js
+++ /dev/null
@@ -1,143 +0,0 @@
-const { dirname } = require('path');
-
-const readPkgUp = require('read-pkg-up');
-
-const DEFINE_MESSAGES = 'defineMessages';
-
-const COMPONENT_NAMES = ['FormattedMessage', 'FormattedHTMLMessage'];
-
-function getPrefix(state) {
- let { prefix } = state.opts;
- if (prefix && !prefix.endsWith(':')) prefix = `${prefix}:`;
- return prefix;
-}
-
-function referencesImport(path) {
- if (!(path.isIdentifier() || path.isJSXIdentifier())) return false;
- return COMPONENT_NAMES.some((name) =>
- path.referencesImport('react-intl', name),
- );
-}
-
-const PREFIXES = new Map();
-
-const PREFIX = Symbol('namespace prefix');
-
-function getPrefixFromPackage(filename) {
- for (const [root, prefix] of PREFIXES.entries()) {
- if (filename.startsWith(root)) {
- return prefix;
- }
- }
-
- const pkgUpResult = readPkgUp.sync({ cwd: dirname(filename) });
- if (!pkgUpResult) return '';
-
- const prefix = `${pkgUpResult.packageJson.name}:`;
- PREFIXES.set(dirname(pkgUpResult.path), prefix);
- return prefix;
-}
-
-function getMessagesObjectFromExpression(nodePath) {
- let currentPath = nodePath;
- while (
- currentPath.isTSAsExpression() ||
- currentPath.isTSTypeAssertion() ||
- currentPath.isTypeCastExpression()
- ) {
- currentPath = currentPath.get('expression');
- }
- return currentPath;
-}
-
-function isFormatMessageCall(callee) {
- if (!callee.isMemberExpression()) {
- return false;
- }
- const object = callee.get('object');
- const property = callee.get('property');
-
- return (
- property.isIdentifier() &&
- property.node.name === 'formatMessage' &&
- // things like `intl.formatMessage`
- ((object.isIdentifier() && object.node.name === 'intl') ||
- // things like `this.props.intl.formatMessage`
- (object.isMemberExpression() &&
- object.get('property').node.name === 'intl'))
- );
-}
-
-module.exports = function namespacePlugin({ types: t }) {
- return {
- pre(file) {
- const prefix =
- getPrefix(this) || getPrefixFromPackage(file.opts.filename);
-
- file.set(PREFIX, prefix);
- },
- visitor: {
- JSXOpeningElement(path, state) {
- const name = path.get('name');
- if (!referencesImport(name)) return;
-
- const prefix = state.file.get(PREFIX);
-
- const idAttr = path
- .get('attributes')
- .find(
- (attr) => attr.isJSXAttribute() && attr.node.name.name === 'id',
- );
-
- if (idAttr && !idAttr.node.value.value.startsWith(prefix)) {
- idAttr
- .get('value')
- .replaceWith(
- t.StringLiteral(`${prefix}${idAttr.node.value.value}`),
- );
- }
- },
-
- CallExpression(path, state) {
- const prefix = state.file.get(PREFIX);
- const callee = path.get('callee');
-
- function processMessageObject(messageObj) {
- if (!messageObj || !messageObj.isObjectExpression()) {
- return;
- }
-
- const idProp = messageObj.get('properties').find((p) => {
- // this may be a Literal or StringLiteral depending
- // on if the key is quoted or not
- const keyNode = p.get('key').node;
- return keyNode.name === 'id' || keyNode.value === 'id';
- });
-
- const value = idProp && idProp.get('value');
-
- if (value && !value.node.value.startsWith(prefix)) {
- value.replaceWith(
- t.StringLiteral(`${prefix}${value.node.value}`), // eslint-disable-line new-cap
- );
- }
- }
-
- if (callee.isIdentifier() && callee.node.name === DEFINE_MESSAGES) {
- getMessagesObjectFromExpression(path.get('arguments')[0])
- .get('properties')
- .map((prop) => prop.get('value'))
- .forEach(processMessageObject);
- } else if (isFormatMessageCall(callee)) {
- const messageDescriptor = getMessagesObjectFromExpression(
- path.get('arguments')[0],
- );
-
- if (messageDescriptor.isObjectExpression()) {
- processMessageObject(messageDescriptor);
- }
- }
- },
- },
- };
-};
diff --git a/packages/babel-preset/package.json b/packages/babel-preset/package.json
index c60ce896..7b170fa0 100644
--- a/packages/babel-preset/package.json
+++ b/packages/babel-preset/package.json
@@ -35,7 +35,7 @@
"@babel/preset-modules": "^0.1.2",
"@babel/preset-react": "^7.8.3",
"babel-plugin-dev-expression": "^0.2.2",
- "babel-plugin-react-intl": "^7.0.0",
+ "babel-plugin-react-intl": "^8.1.6",
"browserslist": "^4.8.3",
"lodash": "^4.17.15",
"read-pkg-up": "^7.0.1"
@@ -44,7 +44,7 @@
"@babel/cli": "^7.10.5",
"@babel/core": "^7.11.1",
"babel-jest": "^26.3.0",
- "babel-plugin-tester": "^9.2.0",
- "jest-cli": "^26.4.0"
+ "jest-cli": "^26.4.0",
+ "strip-indent": "^3.0.0"
}
}
diff --git a/packages/babel-preset/test/namespace-plugin.test.js b/packages/babel-preset/test/namespace-plugin.test.js
index e8c355f1..2a6fcf68 100644
--- a/packages/babel-preset/test/namespace-plugin.test.js
+++ b/packages/babel-preset/test/namespace-plugin.test.js
@@ -1,122 +1,117 @@
-import babelPluginTester from 'babel-plugin-tester';
+import { transformSync } from '@babel/core';
+import stripIndent from 'strip-indent';
-import namespacePlugin from '../namespace-plugin';
+import intlPreset from '../intl-preset';
-babelPluginTester({
- plugin: namespacePlugin,
- pluginName: 'namespacePlugin',
- snapshot: false,
- fixtures: false,
- babelOptions: {
- filename: 'foo.js',
- presets: ['@babel/react'],
- },
- tests: {
- 'define messages': {
- code: `
- import { defineMessages } from 'react-intl';
+describe('intl tests', () => {
+ test.each([
+ [
+ 'define messages',
+ {
+ code: `
+ import { defineMessages } from 'react-intl';
- const messages = defineMessages({
- title: {
- id: 'title',
- },
- body: {
- id: 'body',
- },
- });
+ const messages = defineMessages({
+ title: {
+ id: 'title',
+ },
+ body: {
+ id: 'body',
+ },
+ });
- export { messages };
- `,
- output: `
- import { defineMessages } from 'react-intl';
- const messages = defineMessages({
- title: {
- id: '@4c/babel-preset:title',
- },
- body: {
- id: '@4c/babel-preset:body',
- },
- });
- export { messages };
- `,
- },
-
- FormattedMessages: {
- code: `
- import { FormattedMessage, FormattedHTMLMessage } from 'react-intl';
+ export { messages };
+ `,
+ output: `
+ import { defineMessages } from 'react-intl';
+ const messages = defineMessages({
+ title: {
+ "id": "@4c/babel-preset:title"
+ },
+ body: {
+ "id": "@4c/babel-preset:body"
+ }
+ });
+ export { messages };
+ `,
+ },
+ ],
- ;
- ;
- `,
- output: `
- import { FormattedMessage, FormattedHTMLMessage } from 'react-intl';
+ [
+ 'FormattedMessages',
+ {
+ code: `
+ import { FormattedMessage } from 'react-intl';
- /*#__PURE__*/
- React.createElement(FormattedMessage, {
- id: '@4c/babel-preset:title',
- });
+ ;
+ `,
+ output: `
+ import { FormattedMessage } from 'react-intl';
- /*#__PURE__*/
- React.createElement(FormattedHTMLMessage, {
- id: '@4c/babel-preset:body',
- });
- `,
- },
- 'intl.formatMessage': {
- code: `
- const intl = useIntl()
+ /*#__PURE__*/
+ React.createElement(FormattedMessage, {
+ id: "@4c/babel-preset:title"
+ });
- intl.formatMessage({
- id: "title"
- })
- `,
- output: `
- const intl = useIntl();
- intl.formatMessage({
- id: '@4c/babel-preset:title',
- });
- `,
- },
+ `,
+ },
+ ],
+ [
+ 'intl.formatMessage',
+ {
+ options: {
+ extractFromFormatMessageCall: true,
+ },
+ code: `
+ const intl = useIntl()
- 'provided prefix': {
- pluginOptions: {
- prefix: 'cool-pkg',
+ intl.formatMessage({
+ id: "title"
+ })
+ `,
+ output: `
+ const intl = useIntl();
+ intl.formatMessage({
+ "id": "@4c/babel-preset:title"
+ });
+ `,
},
- code: `
- import { defineMessages } from 'react-intl';
+ ],
- const messages = defineMessages({
- title: {
- id: 'title',
- },
- });
+ [
+ 'provided prefix',
+ {
+ options: {
+ prefix: 'cool-pkg',
+ },
+ code: `
+ import { defineMessages } from 'react-intl';
- export { messages };
- `,
- output: `
- import { defineMessages } from 'react-intl';
- const messages = defineMessages({
- title: {
- id: 'cool-pkg:title',
- },
- });
- export { messages };
- `,
- },
- 'quoted strings': {
- code: `
- const intl = useIntl()
+ const messages = defineMessages({
+ title: {
+ id: 'title',
+ },
+ });
+
+ export { messages };
+ `,
+ output: `
+ import { defineMessages } from 'react-intl';
+ const messages = defineMessages({
+ title: {
+ "id": "cool-pkg:title"
+ }
+ });
+ export { messages };
+ `,
+ },
+ ],
+ ])('%s', (name, { code, output, options = {} }) => {
+ const result = transformSync(stripIndent(code), {
+ filename: 'foo.js',
+ presets: ['@babel/react', [intlPreset, options]],
+ }).code;
- intl.formatMessage({
- "id": "title"
- })
- `,
- output: `
- const intl = useIntl();
- intl.formatMessage({
- id: '@4c/babel-preset:title',
- });
- `,
- },
- },
+ expect(result.trim()).toEqual(stripIndent(output).trim());
+ });
});
diff --git a/yarn.lock b/yarn.lock
index 38006869..f8e688b4 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1077,17 +1077,30 @@
unique-filename "^1.1.1"
which "^1.3.1"
-"@formatjs/intl-numberformat@^4.1.0":
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/@formatjs/intl-numberformat/-/intl-numberformat-4.1.0.tgz#ab896564acdd896315d673f23cf5b57441175edd"
- integrity sha512-kHMjrMfGO0/EoQf5ldzLPZvxCRXWHgqkd2XTT+IsHpVhVCoCTv3oNDcsXWvxbFZRkAtRQTs02T+VSKCnDFJEzw==
+"@formatjs/ecma402-abstract@^1.0.2":
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.0.2.tgz#7d416490a4ce5140eb2973036893a0049f2f277b"
+ integrity sha512-tH8BsSARtrNc6RHFwEVn3C6yjqv1gmoktzGCJdxM/r0RFtJENcyFj/IjJ4mi1/wlY3uJl7UPt7JwiyMlSbNdlA==
dependencies:
- "@formatjs/intl-utils" "^3.1.0"
+ "@types/es-abstract" "^1.17.1"
+ es-abstract "^1.17.6"
-"@formatjs/intl-utils@^3.1.0":
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/@formatjs/intl-utils/-/intl-utils-3.1.0.tgz#759012e2e444f7fbeb61f5148a8d95202713d82e"
- integrity sha512-Q7+ksGpN6Dzp+W4qPai6OcUJ6pka2jPICJ0WlStFdy1RKGm90basrjSmox4xUR9DnMsWE5AfaiSu95nohCTLXw==
+"@formatjs/intl-numberformat@^5.5.2":
+ version "5.5.2"
+ resolved "https://registry.yarnpkg.com/@formatjs/intl-numberformat/-/intl-numberformat-5.5.2.tgz#5ebd4f211c224979520f587ae425677a886d0ad1"
+ integrity sha512-Zu9VmopKDJ/ztZP5A5gcV8YmoAaIZCjK4h0GgcV5FpTcIqGry/JypedGlkgoxJDDXzWM9f8bsH/L9V/5Pk/6UQ==
+ dependencies:
+ "@formatjs/ecma402-abstract" "^1.0.2"
+ "@types/es-abstract" "^1.17.1"
+ es-abstract "^1.17.6"
+
+"@formatjs/ts-transformer@^2.7.6":
+ version "2.7.6"
+ resolved "https://registry.yarnpkg.com/@formatjs/ts-transformer/-/ts-transformer-2.7.6.tgz#63d9adb2f94a20c69eaf079496d1a262c4310adf"
+ integrity sha512-e3H8V3MnjFtgKicuW1CB3n4khZLB4g0gZmRRDaKkFZikf29q+RBYPXX8Q5aCIIbwI1btOZlen1A+HzhfisjlkQ==
+ dependencies:
+ intl-messageformat-parser "^6.0.1"
+ typescript "^3.8"
"@iarna/cli@^1.2.0":
version "1.2.0"
@@ -2323,6 +2336,18 @@
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
+"@types/es-abstract@^1.17.1":
+ version "1.17.1"
+ resolved "https://registry.yarnpkg.com/@types/es-abstract/-/es-abstract-1.17.1.tgz#0bdb5585287f0736d58f910f193f24bdb7bec0de"
+ integrity sha512-EDbuWgrS1wq0y2qhw8Bll2F5d6iN1e3ULzfz6Tctu9Np135zdWOzb7NUuB5DzQoNLtCYw51Cp9pnRoqdn0dNXw==
+ dependencies:
+ "@types/es-to-primitive" "*"
+
+"@types/es-to-primitive@*":
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/@types/es-to-primitive/-/es-to-primitive-1.2.2.tgz#d669d2ed1c67414cfbd75c45925d78ce9e1da013"
+ integrity sha512-PVQF+wlxOaVKZ/XZfS55gfvkFQzRQYqwAkmf9fLNC4ww0VxY+/FUXFCNAkqY1QH7uAppNePWzWkmCryKBhXdHw==
+
"@types/eslint-visitor-keys@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d"
@@ -2333,13 +2358,6 @@
resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==
-"@types/fs-extra@^8.1.0":
- version "8.1.1"
- resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.1.1.tgz#1e49f22d09aa46e19b51c0b013cb63d0d923a068"
- integrity sha512-TcUlBem321DFQzBNuz8p0CLLKp0VvF/XH9E4KHNmgwyp4E3AfgI5cjiIVZWlbfThBop2qxFIh4+LeY6hVWWZ2w==
- dependencies:
- "@types/node" "*"
-
"@types/glob@^7.1.1":
version "7.1.1"
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575"
@@ -2990,19 +3008,18 @@ babel-plugin-jest-hoist@^26.2.0:
"@types/babel__core" "^7.0.0"
"@types/babel__traverse" "^7.0.6"
-babel-plugin-react-intl@^7.0.0:
- version "7.5.13"
- resolved "https://registry.yarnpkg.com/babel-plugin-react-intl/-/babel-plugin-react-intl-7.5.13.tgz#0aed317f774d2b57adf5a701ba9f8aafbf492ebf"
- integrity sha512-EEJ2GpoMejnZFDmDZrI9G1tXvIWPTzM9nEA8ec57kyF5H9jYQsqStFemoiu7ZiaYhKc1bxMSYjDVHM2FqJ/TzQ==
+babel-plugin-react-intl@^8.1.6:
+ version "8.1.6"
+ resolved "https://registry.yarnpkg.com/babel-plugin-react-intl/-/babel-plugin-react-intl-8.1.6.tgz#5c8f321935b26035316886a9f103caa1de6df38f"
+ integrity sha512-eg3zlrx+rGOegeICO3tM2QRvnwBriOo8A0OonuWmgOKbIQg2c4oT1zXWHnw5TD8E/Lvm0T/0g97kJvdntwJuKA==
dependencies:
"@babel/core" "^7.9.0"
"@babel/helper-plugin-utils" "^7.8.3"
"@babel/types" "^7.9.5"
+ "@formatjs/ts-transformer" "^2.7.6"
"@types/babel__core" "^7.1.7"
- "@types/fs-extra" "^8.1.0"
"@types/schema-utils" "^2.4.0"
- fs-extra "^9.0.0"
- intl-messageformat-parser "^5.0.9"
+ intl-messageformat-parser "^6.0.1"
schema-utils "^2.6.6"
babel-plugin-tester@^9.2.0:
@@ -4332,22 +4349,22 @@ error-ex@^1.2.0, error-ex@^1.3.1:
dependencies:
is-arrayish "^0.2.1"
-es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.5:
- version "1.17.5"
- resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9"
- integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==
+es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.5, es-abstract@^1.17.6:
+ version "1.17.6"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.6.tgz#9142071707857b2cacc7b89ecb670316c3e2d52a"
+ integrity sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==
dependencies:
es-to-primitive "^1.2.1"
function-bind "^1.1.1"
has "^1.0.3"
has-symbols "^1.0.1"
- is-callable "^1.1.5"
- is-regex "^1.0.5"
+ is-callable "^1.2.0"
+ is-regex "^1.1.0"
object-inspect "^1.7.0"
object-keys "^1.1.1"
object.assign "^4.1.0"
- string.prototype.trimleft "^2.1.1"
- string.prototype.trimright "^2.1.1"
+ string.prototype.trimend "^1.0.1"
+ string.prototype.trimstart "^1.0.1"
es-to-primitive@^1.2.1:
version "1.2.1"
@@ -5754,12 +5771,12 @@ internal-slot@^1.0.2:
has "^1.0.3"
side-channel "^1.0.2"
-intl-messageformat-parser@^5.0.9:
- version "5.0.9"
- resolved "https://registry.yarnpkg.com/intl-messageformat-parser/-/intl-messageformat-parser-5.0.9.tgz#a26628db3993a21d077f4e21adc6ccc981953eaa"
- integrity sha512-vyGrHtKWXWFMtMwV5b7idE0gDT0KnP1m5GtERIGs/uIl7C3p88/GvwqB9GT8p+jpOXUrYtocxPwZMO/va1IxAA==
+intl-messageformat-parser@^6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/intl-messageformat-parser/-/intl-messageformat-parser-6.0.1.tgz#148035b312d001ce5fe38d0ce9c288463ff3f463"
+ integrity sha512-GineXkDgpyE5berz2aA79pzc2ClgjfPuxF2Nc+dNMNSDl/1V7laXoo+dZ1hE/NHKYt2TR3wNHE7GyNkAICSp9Q==
dependencies:
- "@formatjs/intl-numberformat" "^4.1.0"
+ "@formatjs/intl-numberformat" "^5.5.2"
into-stream@^5.0.0:
version "5.1.1"
@@ -5827,10 +5844,10 @@ is-buffer@^1.1.5:
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
-is-callable@^1.1.4, is-callable@^1.1.5:
- version "1.1.5"
- resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab"
- integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==
+is-callable@^1.1.4, is-callable@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb"
+ integrity sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==
is-ci@^1.0.10:
version "1.2.1"
@@ -6029,12 +6046,12 @@ is-redirect@^1.0.0:
resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24"
integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=
-is-regex@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae"
- integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==
+is-regex@^1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9"
+ integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==
dependencies:
- has "^1.0.3"
+ has-symbols "^1.0.1"
is-regexp@^1.0.0:
version "1.0.0"
@@ -10001,7 +10018,7 @@ string.prototype.matchall@^4.0.2:
regexp.prototype.flags "^1.3.0"
side-channel "^1.0.2"
-string.prototype.trimend@^1.0.0:
+string.prototype.trimend@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913"
integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==
@@ -10009,25 +10026,7 @@ string.prototype.trimend@^1.0.0:
define-properties "^1.1.3"
es-abstract "^1.17.5"
-string.prototype.trimleft@^2.1.1:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz#4408aa2e5d6ddd0c9a80739b087fbc067c03b3cc"
- integrity sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==
- dependencies:
- define-properties "^1.1.3"
- es-abstract "^1.17.5"
- string.prototype.trimstart "^1.0.0"
-
-string.prototype.trimright@^2.1.1:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz#c76f1cef30f21bbad8afeb8db1511496cfb0f2a3"
- integrity sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==
- dependencies:
- define-properties "^1.1.3"
- es-abstract "^1.17.5"
- string.prototype.trimend "^1.0.0"
-
-string.prototype.trimstart@^1.0.0:
+string.prototype.trimstart@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54"
integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==
@@ -10554,6 +10553,11 @@ typescript-workspace-plugin@^2.0.1:
resolved "https://registry.yarnpkg.com/typescript-workspace-plugin/-/typescript-workspace-plugin-2.0.1.tgz#3d88be1c35a7fdf2c0160c8cf569ca8993439a12"
integrity sha512-xjIYNFlPIA7IWXvnOFJoAeHPbPJSo0AiQDCRJzaAp3+xZwz6maTgeRLB0oEHVtCqz4Q1CDN6U9kh/2z8sxdDBQ==
+typescript@^3.8:
+ version "3.9.7"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
+ integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==
+
uglify-js@^3.1.4:
version "3.9.3"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.9.3.tgz#4a285d1658b8a2ebaef9e51366b3a0f7acd79ec2"