chore: remove Intl polyfills for Jest (#6364)

* chore: remove Intl polyfills for Jest

* Add node versions
This commit is contained in:
Joshua Chen 2022-01-15 09:56:10 +08:00 committed by GitHub
parent 83e0413290
commit eaab20cd1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 7 additions and 75 deletions

View File

@ -16,6 +16,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: yarn
- name: Installation
run: yarn

View File

@ -21,6 +21,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: yarn
- uses: preactjs/compressed-size-action@v2
with:

View File

@ -11,17 +11,14 @@ jobs:
publish-canary:
name: Publish Canary
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Needed to get the commit number with "git rev-list --count HEAD"
- name: Use Node.js ${{ matrix.node-version }}
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: '16'
cache: yarn
- name: Prepare git
run: |

View File

@ -14,6 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: yarn
- name: Installation
run: yarn

View File

@ -17,6 +17,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
cache: yarn
- name: Installation
run: yarn

View File

@ -31,7 +31,7 @@ export default {
transform: {
'^.+\\.[jt]sx?$': 'babel-jest',
},
setupFiles: ['./jest/stylelint-rule-test.js', './jest/polyfills.js'],
setupFiles: ['./jest/stylelint-rule-test.js'],
moduleNameMapper: {
// Jest can't resolve CSS or asset imports
'^.+\\.(css|jpg|jpeg|png|svg)$': '<rootDir>/jest/emptyModule.js',

View File

@ -1,19 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable import/no-extraneous-dependencies */
require('@formatjs/intl-pluralrules/polyfill');
require('@formatjs/intl-pluralrules/locale-data/en');
require('@formatjs/intl-pluralrules/locale-data/fr');
require('@formatjs/intl-numberformat/polyfill');
require('@formatjs/intl-numberformat/locale-data/en');
require('@formatjs/intl-numberformat/locale-data/fr');
require('@formatjs/intl-datetimeformat/polyfill');
require('@formatjs/intl-datetimeformat/add-all-tz');
require('@formatjs/intl-datetimeformat/locale-data/en');
require('@formatjs/intl-datetimeformat/locale-data/fr');

View File

@ -65,9 +65,6 @@
"@babel/plugin-transform-modules-commonjs": "^7.16.0",
"@babel/preset-typescript": "^7.16.0",
"@crowdin/cli": "^3.7.1",
"@formatjs/intl-datetimeformat": "^3.2.12",
"@formatjs/intl-numberformat": "^6.2.2",
"@formatjs/intl-pluralrules": "^4.0.11",
"@types/cssnano": "^4.0.0",
"@types/express": "^4.17.2",
"@types/fs-extra": "^9.0.6",

View File

@ -1466,53 +1466,6 @@
unique-filename "^1.1.1"
which "^1.3.1"
"@formatjs/ecma402-abstract@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.1.tgz#595ba3ef4ba38634c012b3ca01954f8d12eb4bf4"
integrity sha512-tgtNODZUGuUI6PAcnvaLZpGrZLVkXnnAvgzOiueYMzFdOdcOw4iH1WKhCe3+r6VR8rHKToJ2HksUGNCB+zt/bg==
dependencies:
"@formatjs/intl-localematcher" "0.2.22"
tslib "^2.1.0"
"@formatjs/ecma402-abstract@1.7.1":
version "1.7.1"
resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.7.1.tgz#1459a9dad654d5d5ec34765965b8e4f22ad6ff81"
integrity sha512-FjewVLB2DVEVCvvC7IMffzXVhysvi442i6ed0H7qcrT6xtUpO4vr0oZgpOmsv6D9I4Io0GVebIuySwteS/k3gg==
dependencies:
tslib "^2.1.0"
"@formatjs/intl-datetimeformat@^3.2.12":
version "3.3.5"
resolved "https://registry.yarnpkg.com/@formatjs/intl-datetimeformat/-/intl-datetimeformat-3.3.5.tgz#c812452bfddda88efa1ff554dc80f24abdbcbab6"
integrity sha512-JbjkS2OHSyrNgHBiELmaywZ9Yy03HwRj69adWrc9N6baAl/sN6INtyxU+uv3MhTjOEyMtw5FrFO5Juk9VY5o5A==
dependencies:
"@formatjs/ecma402-abstract" "1.7.1"
tslib "^2.1.0"
"@formatjs/intl-localematcher@0.2.22":
version "0.2.22"
resolved "https://registry.yarnpkg.com/@formatjs/intl-localematcher/-/intl-localematcher-0.2.22.tgz#300708cf7067dbd49f258467cc386c0b32437415"
integrity sha512-z+TvbHW8Q/g2l7/PnfUl0mV9gWxV4d0HT6GQyzkO5QI6QjCvCZGiztnmLX7zoyS16uSMvZ2PoMDfSK9xvZkRRA==
dependencies:
tslib "^2.1.0"
"@formatjs/intl-numberformat@^6.2.2":
version "6.2.10"
resolved "https://registry.yarnpkg.com/@formatjs/intl-numberformat/-/intl-numberformat-6.2.10.tgz#6180bbcbec5c694258241f3f8fe8b0fb02ce4045"
integrity sha512-b2pN56nxQ2JnYaT1ji8NYJbDv9rQmQ1BWHgyRJWIjKz6afYeeoVf/O7YIaDFawNOONgRrn5J1SFYtNdQzXJJkg==
dependencies:
"@formatjs/ecma402-abstract" "1.7.1"
tslib "^2.1.0"
"@formatjs/intl-pluralrules@^4.0.11":
version "4.3.0"
resolved "https://registry.yarnpkg.com/@formatjs/intl-pluralrules/-/intl-pluralrules-4.3.0.tgz#5739cd5192206a3567b38eca4569fc6025e729bc"
integrity sha512-SuTsUoQfAw9BIvAGm/5UWY0+ORCHhDHIb+tHttxB14sfNvKBiWqtOwQLs49YFwCvMXbUdlLh6HtxNXHWT4V9/w==
dependencies:
"@formatjs/ecma402-abstract" "1.11.1"
"@formatjs/intl-localematcher" "0.2.22"
tslib "^2.1.0"
"@hapi/hoek@^9.0.0":
version "9.2.1"
resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.2.1.tgz#9551142a1980503752536b5050fd99f4a7f13b17"