chore(deps): update node version to 14

This commit is contained in:
Danny Coates 2020-10-15 09:41:53 -07:00
Родитель a2d95f1411
Коммит 6c2b253c11
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4C442633C62E00CB
35 изменённых файлов: 91 добавлений и 938 удалений

Просмотреть файл

@ -85,7 +85,7 @@ jobs:
test-package:
resource_class: medium+
docker:
- image: circleci/node:12
- image: circleci/node:14
- image: redis
- image: memcached
- image: pafortin/goaws
@ -108,7 +108,7 @@ jobs:
test-many:
resource_class: medium+
docker:
- image: circleci/node:12
- image: circleci/node:14
- image: circleci/mysql:5.7.27
- image: jdlk7/firestore-emulator
- image: memcached
@ -208,7 +208,7 @@ jobs:
deploy-packages:
resource_class: small
docker:
- image: circleci/node:12
- image: circleci/node:14
environment:
DOCKER_BUILDKIT: 1
steps:
@ -229,7 +229,7 @@ jobs:
build-and-deploy-fxa-circleci:
resource_class: small
docker:
- image: circleci/node:12
- image: circleci/node:14
environment:
DOCKER_BUILDKIT: 1
steps:
@ -261,7 +261,7 @@ jobs:
build-and-deploy-storybooks:
resource_class: small
docker:
- image: circleci/node:12
- image: circleci/node:14
steps:
- base-install:
package: many

Просмотреть файл

@ -118,7 +118,7 @@ To update dependencies use [yarn up](https://yarnpkg.com/cli/up) or `yarn worksp
> Required developer dependencies:
> [Git](http://git-scm.com/book/en/v2/Getting-Started-Installing-Git),
> [node.js **12+** with npm 6](http://nodejs.org/),
> [node.js **14+**](http://nodejs.org/),
> [Python 2.6+](https://www.python.org/),
> [Java 8+](https://www.java.com/en/download/),
> [Rust nightly+](https://doc.rust-lang.org/1.5.0/book/nightly-rust.html),
@ -172,14 +172,14 @@ sudo service docker restart
#### Installing Node.js
We currently use Node 12.
We currently use Node 14.
See https://nodejs.org
Alternatively, the [Node Version Manager](https://github.com/nvm-sh/nvm) makes working with different versions of Node easy.
```
nvm install 12
nvm alias default 12
nvm install 14
nvm alias default 14
```
#### Installing Java

Просмотреть файл

@ -1,4 +1,4 @@
FROM node:12-slim
FROM node:14-slim
RUN set -x \
&& addgroup --gid 10001 app \

Просмотреть файл

@ -1,4 +1,4 @@
FROM circleci/node:12-stretch-browsers
FROM circleci/node:14-stretch-browsers
USER root
RUN apt-get update && apt-get install -y \

Просмотреть файл

@ -1,4 +1,4 @@
FROM node:12-slim
FROM node:14-slim
RUN set -x \
&& addgroup --gid 10001 app \

Просмотреть файл

@ -30,7 +30,7 @@
"diffparser": "^2.0.1",
"husky": "^4.2.5",
"lint-staged": "^10.2.11",
"node-fetch": "^2.6.0",
"node-fetch": "^2.6.1",
"nps": "^5.10.0",
"pm2": "^4.4.1",
"prettier": "^2.0.5",
@ -38,8 +38,7 @@
"semver": "^7.3.2"
},
"engines": {
"node": "^12.18.0",
"npm": ">=6.4.1"
"node": "^14.15.0"
},
"fxa": {
"moduleDependencies": {
@ -117,7 +116,8 @@
"resolutions": {
"gobbledygook": "git://github.com/mozilla-fxa/gobbledygook.git#354042684056e57ca77f036989e907707a36cff2",
"tap/typescript": "3.9.7",
"@types/node": "12.12.38",
"http-proxy": "^1.18.1"
"@types/node": "^14.14.5",
"http-proxy": "^1.18.1",
"browserid-crypto": "git://github.com/mozilla-fxa/browserid-crypto.git#5979544d13eeb15a02d0b9a6a7a08a698d54d37d"
}
}

Просмотреть файл

@ -28,10 +28,6 @@
"redis": "^2.8.0",
"request": "^2.88.2"
},
"engines": {
"node": ">=12",
"npm": ">=6.4.1"
},
"devDependencies": {
"audit-filter": "0.5.0",
"eslint": "^6.8.0",

Просмотреть файл

@ -11,9 +11,6 @@
"homepage": "https://github.com/mozilla/fxa/tree/main/packages/browserid-verifier/",
"bugs": "https://github.com/mozilla/fxa/issues/",
"main": "lib/server.js",
"engines": {
"node": ">=12"
},
"dependencies": {
"async": "3.2.0",
"body-parser": "^1.19.0",

Просмотреть файл

@ -25,10 +25,6 @@
"express": "^4.17.1",
"morgan": "^1.10.0"
},
"engines": {
"node": ">=12",
"npm": ">=6.4.1"
},
"devDependencies": {
"audit-filter": "0.5.0",
"eslint": "^6.8.0",

Просмотреть файл

@ -146,7 +146,7 @@ if (proxyUrl) {
const STATIC_INDEX_HTML = fs.readFileSync(
path.join(STATIC_DIRECTORY, 'index.html'),
{ encoding: 'UTF-8' }
{ encoding: 'utf-8' }
);
['/', '/email-blocks'].forEach((route) => {

Просмотреть файл

@ -22,9 +22,6 @@
"type": "git",
"url": "git+https://github.com/mozilla/fxa.git"
},
"engines": {
"node": ">=12"
},
"author": "Mozilla (https://mozilla.org/)",
"license": "MPL-2.0",
"bugs": {
@ -66,7 +63,7 @@
"@types/chance": "^1.1.0",
"@types/convict": "^5.2.1",
"@types/graphql": "^14.5.0",
"@types/node": "^13.9.1",
"@types/node": "^14.14.5",
"@types/rimraf": "3.0.0",
"@types/supertest": "^2.0.10",
"@types/yargs": "^15.0.5",

Просмотреть файл

@ -17,15 +17,16 @@
"license": "MPL-2.0",
"dependencies": {
"@peculiar/webcrypto": "^1.1.2",
"abab": "^2.0.0",
"abab": "^2.0.5",
"abort-controller": "^3.0.0",
"node-fetch": "^2.6.0"
"node-fetch": "^2.6.1"
},
"devDependencies": {
"@types/assert": "^1.5.2",
"@types/fast-text-encoding": "^1",
"@types/mocha": "^7",
"@types/node-fetch": "^2",
"@types/node": "^14.14.5",
"@types/node-fetch": "^2.5.7",
"asmcrypto.js": "^0.22.0",
"fast-text-encoding": "^1.0.3",
"mocha": "^7.1.2",

Просмотреть файл

@ -1,34 +1,25 @@
import http from 'http'
import https from 'https'
import http from 'http';
import https from 'https';
import { Crypto } from '@peculiar/webcrypto';
import fetch, { Headers } from 'node-fetch';
import { btoa } from 'abab';
import AbortController from 'abort-controller';
import AuthClient from './lib/client';
declare global {
namespace NodeJS {
interface Global {
fetch: typeof fetch,
AbortController: typeof AbortController,
Headers: typeof Headers,
crypto: Crypto,
btoa: typeof btoa
}
}
}
http.globalAgent = new http.Agent({
keepAlive: true
})
keepAlive: true,
});
https.globalAgent = new https.Agent({
keepAlive: true
})
keepAlive: true,
});
global.crypto = new Crypto();
// @ts-ignore
global.fetch = fetch;
global.AbortController = AbortController;
// @ts-ignore
global.Headers = Headers;
// @ts-ignore
global.btoa = btoa;
export default AuthClient;

Просмотреть файл

@ -10,7 +10,7 @@ Includes:
## Prerequisites
- node.js 12
- node.js 14
- npm
- MySQL (we use version 5.6.42 in production)

Просмотреть файл

@ -57,9 +57,6 @@
"restify-clients": "^2.6.9",
"sinon": "^9.0.3"
},
"engines": {
"node": ">=12"
},
"keywords": [
"fxa",
"firefox",

Просмотреть файл

@ -23,14 +23,6 @@ const UTM_PREFIX = 'fx-';
const X_SES_CONFIGURATION_SET = 'X-SES-CONFIGURATION-SET';
const X_SES_MESSAGE_TAGS = 'X-SES-MESSAGE-TAGS';
// Polyfill Intl.NumberFormat until we are using Node >= 13
if (parseInt(process.versions.node) > 12) {
console.error('Time to remove the intl polyfill module!!1!');
} else {
const IntlPolyfill = require('intl');
Intl.NumberFormat = IntlPolyfill.NumberFormat;
}
module.exports = function (log, config, oauthdb) {
const oauthClientInfo = require('./oauth_client_info')(log, config, oauthdb);
const verificationReminders = require('../verification-reminders')(
@ -201,7 +193,7 @@ module.exports = function (log, config, oauthdb) {
// The exception could be a verror wrapped one.
const cause = e.cause ? e.cause() : e;
// If the language tag is not something Intl can handle, use 'en-US'.
if (cause.message.endsWith('is not a structurally valid language tag')) {
if (cause.message.endsWith('Incorrect locale information provided')) {
return getLocalizedCurrencyString(amountInCents, currency, 'en-US');
}
throw e;

Просмотреть файл

@ -31,9 +31,6 @@
"type": "git",
"url": "https://github.com/mozilla/fxa.git"
},
"engines": {
"node": ">=12"
},
"bugs": "https://github.com/mozilla/fxa/issues/",
"homepage": "https://github.com/mozilla/fxa/tree/main/packages/fxa-auth-server",
"license": "MPL-2.0",
@ -72,7 +69,6 @@
"hkdf": "0.0.2",
"hot-shots": "^7.6.0",
"i18n-abide": "0.0.26",
"intl": "1.2.5",
"ioredis": "^4.17.3",
"jed": "0.5.4",
"jsonwebtoken": "^8.4.0",
@ -119,7 +115,7 @@
"@types/memcached": "^2.2.6",
"@types/mocha": "^7.0.2",
"@types/nock": "^11.1.0",
"@types/node": "^12.11.7",
"@types/node": "^14.14.5",
"@types/request": "2.48.5",
"@types/safe-regex": "1.1.2",
"@types/verror": "^1.10.3",

Просмотреть файл

@ -21,7 +21,7 @@ const settingsIndexPath = join(
if (env !== 'development') {
settingsIndexFile = readFileSync(settingsIndexPath, {
encoding: 'UTF-8',
encoding: 'utf-8',
});
}

Просмотреть файл

@ -58,8 +58,5 @@
"sinon": "^9.0.3",
"tap": "^14.10.8",
"walk": "2.3.x"
},
"engines": {
"node": ">=12"
}
}

Просмотреть файл

@ -20,8 +20,5 @@
},
"devDependencies": {
"audit-filter": "^0.5.0"
},
"engines": {
"node": ">=12"
}
}

Просмотреть файл

@ -42,8 +42,5 @@
"prettier": "^2.0.5",
"proxyquire": "^2.1.3",
"sinon": "^9.0.3"
},
"engines": {
"node": ">=12"
}
}

Просмотреть файл

@ -22,9 +22,6 @@
"type": "git",
"url": "git+https://github.com/mozilla/fxa.git"
},
"engines": {
"node": ">=12"
},
"author": "Mozilla (https://mozilla.org/)",
"license": "MPL-2.0",
"bugs": {
@ -81,7 +78,7 @@
"@types/convict": "^5.2.1",
"@types/express": "^4.17.8",
"@types/jest": "^26.0.13",
"@types/node": "^14.0.27",
"@types/node": "^14.14.5",
"@types/passport": "^1",
"@types/passport-jwt": "^3.0.3",
"@types/rimraf": "3.0.0",

Просмотреть файл

@ -46,8 +46,5 @@
"prettier": "^2.0.5",
"rimraf": "^3.0.2",
"sinon": "^9.0.3"
},
"engines": {
"node": ">=12"
}
}

Просмотреть файл

@ -17,9 +17,6 @@
"type": "git",
"url": "git+https://github.com/mozilla/fxa.git"
},
"engines": {
"node": ">=12"
},
"author": "Mozilla (https://mozilla.org/)",
"license": "MPL-2.0",
"bugs": {
@ -63,7 +60,7 @@
"@types/graphql-upload": "8.0.3",
"@types/ioredis": "^4.17.3",
"@types/mocha": "^8.0.2",
"@types/node": "^12.x",
"@types/node": "^14.14.5",
"@types/proxyquire": "^1.3.28",
"@types/sinon": "9.0.8",
"@types/superagent": "4.1.10",

Просмотреть файл

@ -17,9 +17,6 @@
"type": "git",
"url": "git+https://github.com/mozilla/fxa.git"
},
"engines": {
"node": ">=12"
},
"bugs": {
"url": "https://github.com/mozilla/fxa/issues"
},
@ -42,7 +39,7 @@
"devDependencies": {
"@types/chai": "^4.2.11",
"@types/mocha": "^7.0.2",
"@types/node": "^12.12.7",
"@types/node": "^14.14.5",
"@types/sinon": "9.0.8",
"audit-filter": "^0.5.0",
"chai": "^4.2.0",

Просмотреть файл

@ -51,7 +51,7 @@
"@types/classnames": "^2.2.9",
"@types/jest": "^24.9.1",
"@types/jsdom": "^12.2.4",
"@types/node": "^12.12.7",
"@types/node": "^14.14.5",
"@types/react": "^16.9.53",
"@types/react-dom": "^16.9.4",
"@types/react-redux": "^7.1.5",
@ -144,9 +144,6 @@
"typedi": "^0.8.0",
"uuid": "^8.3.0"
},
"engines": {
"node": ">=12"
},
"readmeFilename": "README.md",
"jest": {
"collectCoverageFrom": [

Просмотреть файл

@ -241,7 +241,7 @@ module.exports = () => {
const STATIC_INDEX_HTML = fs.readFileSync(
path.join(STATIC_DIRECTORY, 'index.html'),
{ encoding: 'UTF-8' }
{ encoding: 'utf-8' }
);
INDEX_ROUTES.forEach((route) => {

Просмотреть файл

@ -174,11 +174,13 @@ describe('CancelSubscriptionPanel', () => {
expect(queryAllByText('no more').length).toBe(2);
expect(
queryByText(
'Fromage pecorino blue castello FPN after September 13, 2019, sorry dude.'
'Fromage pecorino blue castello FPN after 13mh dhen t-Sultain 2019, sorry dude.'
)
).toBeInTheDocument();
expect(
queryByText("Stilton when everybody's FPN on September 13, 2019.")
queryByText(
"Stilton when everybody's FPN on 13mh dhen t-Sultain 2019."
)
).toBeInTheDocument();
expect(queryByText('haha never mind')).toBeInTheDocument();
});

Просмотреть файл

@ -66,8 +66,5 @@
"bugs": "https://github.com/mozilla/fxa/issues",
"homepage": "https://github.com/mozilla/fxa/tree/main/packages/fxa-profile-server",
"author": "Sean McArthur <sean.monstar@gmail.com>",
"engines": {
"node": ">=12"
},
"license": "MPL-2.0"
}

Просмотреть файл

@ -43,7 +43,7 @@
"@types/classnames": "^2.2.9",
"@types/file-loader": "^4.2.0",
"@types/jest": "^24.9.1",
"@types/node": "^13.13.0",
"@types/node": "^14.14.5",
"@types/prettier": "2.1.1",
"@types/react": "^16.9.53",
"@types/react-dom": "^16.9.6",
@ -80,8 +80,5 @@
"license": "MPL-2.0",
"bugs": {
"url": "https://github.com/mozilla/fxa/issues"
},
"engines": {
"node": ">=12"
}
}

Просмотреть файл

@ -69,7 +69,7 @@
"@types/classnames": "^2.2.10",
"@types/jest": "^24.9.1",
"@types/lodash.groupby": "^4",
"@types/node": "^12.12.35",
"@types/node": "^14.14.5",
"@types/react": "^16.9.53",
"@types/react-dom": "^16.9.6",
"@types/react-test-renderer": "^16",

Просмотреть файл

@ -32,9 +32,6 @@
"bugs": {
"url": "https://github.com/mozilla/fxa/issues"
},
"engines": {
"node": ">=12"
},
"homepage": "https://github.com/mozilla/fxa/tree/main/packages/fxa-shared#readme",
"devDependencies": {
"@nestjs/testing": "^7.4.4",
@ -46,7 +43,7 @@
"@types/lodash.pick": "^4",
"@types/mocha": "^7.0.2",
"@types/mysql": "^2",
"@types/node": "^12.12.38",
"@types/node": "^14.14.5",
"@types/proxyquire": "^1.3.28",
"@types/redis": "^2.8.27",
"@types/sinon": "9.0.8",

Просмотреть файл

@ -20,15 +20,8 @@ const MS_IN_SEC = 1000;
const queryValidator = joi
.object()
.keys({
requestTicket: joi
.number()
.integer()
.optional(),
uid: joi
.string()
.required()
.hex()
.length(32),
requestTicket: joi.number().integer().optional(),
uid: joi.string().required().hex().length(32),
})
.required();
@ -128,7 +121,7 @@ class SupportController {
const accountInfoReqPromises = [
`${this.config.authdbUrl}/account/${uid}`,
`${this.config.authdbUrl}/account/${uid}/devices`,
].map(url => requests.get({ ...opts, url }));
].map((url) => requests.get({ ...opts, url }));
try {
[account, devices] = await Promise.all(accountInfoReqPromises);
@ -156,7 +149,7 @@ class SupportController {
return h.response('<h1>Unable to fetch subscriptions</h1>').code(500);
}
const formattedSubscriptions = subscriptions.map(s => ({
const formattedSubscriptions = subscriptions.map((s) => ({
...s,
created: String(new Date(s.created * MS_IN_SEC)),
current_period_end: String(new Date(s.current_period_end * MS_IN_SEC)),
@ -174,7 +167,7 @@ class SupportController {
...authServerRequestOptions,
url: `${this.config.authServer.url}${this.config.authServer.signinLocationsSearchPath}?uid=${uid}`,
});
signinLocations = locations.map(v => ({
signinLocations = locations.map((v) => ({
...v,
lastAccessTime: new Date(v.lastAccessTime),
}));
@ -201,7 +194,7 @@ class SupportController {
const context = {
created: String(new Date(account.createdAt)),
devices: devices.map(d => {
devices: devices.map((d) => {
return {
created: String(new Date(d.createdAt)),
name: d.name,
@ -239,7 +232,7 @@ export function init(
}
const templateDir = path.join(rootDir, 'lib', 'templates');
const pageTemplate = fs.readFileSync(path.join(templateDir, 'index.html'), {
encoding: 'UTF-8',
encoding: 'utf-8',
});
const template = handlebars.compile(pageTemplate);

Просмотреть файл

@ -19,9 +19,6 @@
"type": "git",
"url": "git://github.com/mozilla/fxa.git"
},
"engines": {
"node": ">=12"
},
"bugs": "https://github.com/mozilla/fxa/issues/",
"homepage": "https://github.com/mozilla/fxa/",
"license": "MPL-2.0",
@ -49,7 +46,7 @@
"@types/hapi__hapi": "^19.0.4",
"@types/hapi__joi": "17.1.6",
"@types/mocha": "^8.0.2",
"@types/node": "^12.12.7",
"@types/node": "^14.14.5",
"@types/request-promise-native": "^1.0.17",
"audit-filter": "^0.5.0",
"chai": "^4.2.0",

839
yarn.lock

Разница между файлами не показана из-за своего большого размера Загрузить разницу