зеркало из https://github.com/mozilla/fxa.git
chore(node): upgrade to node 16 (#10799)
This commit is contained in:
Родитель
7746d433b9
Коммит
17e06a38d2
|
@ -4,13 +4,10 @@ MODULE=$1
|
|||
DIR=$(dirname "$0")
|
||||
cd "$DIR/.."
|
||||
|
||||
# npm install just enough to run these scripts
|
||||
npm i --ignore-scripts --no-optional --only=prod --no-package-lock
|
||||
yarn install --immutable
|
||||
node .circleci/modules-to-test.js | tee packages/test.list
|
||||
if ([[ "$MODULE" == "many" ]] && grep -e '.' packages/test.list > /dev/null) ||
|
||||
grep -e "$MODULE" -e 'all' packages/test.list > /dev/null; then
|
||||
./.circleci/assert-branch.sh
|
||||
./_scripts/create-version-json.sh
|
||||
|
||||
yarn install --immutable
|
||||
fi
|
||||
|
|
|
@ -86,7 +86,7 @@ jobs:
|
|||
test-package:
|
||||
resource_class: medium+
|
||||
docker:
|
||||
- image: circleci/node:14
|
||||
- image: circleci/node:16
|
||||
- image: redis
|
||||
- image: memcached
|
||||
- image: pafortin/goaws
|
||||
|
@ -114,7 +114,7 @@ jobs:
|
|||
test-many:
|
||||
resource_class: medium+
|
||||
docker:
|
||||
- image: circleci/node:14
|
||||
- image: circleci/node:16
|
||||
- image: circleci/mysql:5.7.27
|
||||
- image: jdlk7/firestore-emulator
|
||||
- image: memcached
|
||||
|
@ -213,7 +213,7 @@ jobs:
|
|||
deploy-packages:
|
||||
resource_class: small
|
||||
docker:
|
||||
- image: circleci/node:14
|
||||
- image: circleci/node:16
|
||||
environment:
|
||||
DOCKER_BUILDKIT: 1
|
||||
steps:
|
||||
|
@ -234,7 +234,7 @@ jobs:
|
|||
build-and-deploy-fxa-circleci:
|
||||
resource_class: small
|
||||
docker:
|
||||
- image: circleci/node:14
|
||||
- image: circleci/node:16
|
||||
environment:
|
||||
DOCKER_BUILDKIT: 1
|
||||
steps:
|
||||
|
@ -288,7 +288,7 @@ jobs:
|
|||
build-and-deploy-storybooks:
|
||||
resource_class: small
|
||||
docker:
|
||||
- image: circleci/node:14
|
||||
- image: circleci/node:16
|
||||
steps:
|
||||
- base-install:
|
||||
package: many
|
||||
|
|
2
.nvmrc
2
.nvmrc
|
@ -1 +1 @@
|
|||
14.15.1
|
||||
16.12.0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:14-slim
|
||||
FROM node:16-slim
|
||||
|
||||
RUN set -x \
|
||||
&& addgroup --gid 10001 app \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM circleci/node:14-stretch-browsers
|
||||
FROM circleci/node:16-stretch-browsers
|
||||
|
||||
USER root
|
||||
RUN apt-get update && apt-get install -y \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:14-slim
|
||||
FROM node:16-slim
|
||||
|
||||
RUN set -x \
|
||||
&& addgroup --gid 10001 app \
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
"semver": "^7.3.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.15.1"
|
||||
"node": "^16.12.0"
|
||||
},
|
||||
"fxa": {
|
||||
"moduleDependencies": {
|
||||
|
@ -122,7 +122,7 @@
|
|||
"gobbledygook": "git://github.com/mozilla-fxa/gobbledygook.git#354042684056e57ca77f036989e907707a36cff2",
|
||||
"tap/typescript": "^4.3.5",
|
||||
"@nestjs/cli/typescript": "^4.3.5",
|
||||
"@types/node": "^14.14.5",
|
||||
"@types/node": "^16.11.3",
|
||||
"http-proxy": "^1.18.1",
|
||||
"browserid-crypto": "git://github.com/mozilla-fxa/browserid-crypto.git#5979544d13eeb15a02d0b9a6a7a08a698d54d37d",
|
||||
"fbjs/isomorphic-fetch": "^3.0.0"
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
"name": "123done",
|
||||
"description": "A simple tasklist app that demonstrates FxA Sign-In",
|
||||
"version": "0.0.2",
|
||||
"engines": {
|
||||
"node": "14.x"
|
||||
},
|
||||
"author": {
|
||||
"name": "Mozilla",
|
||||
"url": "https://mozilla.org/"
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
"@types/chance": "^1.1.2",
|
||||
"@types/convict": "^5.2.2",
|
||||
"@types/graphql": "^14.5.0",
|
||||
"@types/node": "^15.12.2",
|
||||
"@types/node": "^16.11.3",
|
||||
"@types/rimraf": "3.0.0",
|
||||
"@types/supertest": "^2.0.11",
|
||||
"@types/yargs": "^17.0.0",
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
"@types/assert": "^1.5.4",
|
||||
"@types/fast-text-encoding": "^1",
|
||||
"@types/mocha": "^8",
|
||||
"@types/node": "^15.12.2",
|
||||
"@types/node": "^16.11.3",
|
||||
"@types/node-fetch": "^2.5.7",
|
||||
"asmcrypto.js": "^0.22.0",
|
||||
"esbuild": "^0.13.4",
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
"@types/memcached": "^2.2.6",
|
||||
"@types/mocha": "^8.2.2",
|
||||
"@types/nock": "^11.1.0",
|
||||
"@types/node": "^15.12.2",
|
||||
"@types/node": "^16.11.3",
|
||||
"@types/node-zendesk": "^2.0.2",
|
||||
"@types/nodemailer": "^6.4.2",
|
||||
"@types/request": "2.48.5",
|
||||
|
|
|
@ -265,9 +265,8 @@ describe('scripts/email-config:', () => {
|
|||
.execAsync('node -r esbuild-register scripts/email-config read', {
|
||||
cwd,
|
||||
})
|
||||
.then(({ stdout, stderr }) => {
|
||||
.then(({ stdout }) => {
|
||||
assert.equal(stdout, `${JSON.stringify(config, null, ' ')}\n`);
|
||||
assert.equal(stderr, '');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -279,9 +278,8 @@ describe('scripts/email-config:', () => {
|
|||
cwd,
|
||||
}
|
||||
)
|
||||
.then(({ stdout, stderr }) => {
|
||||
.then(({ stdout }) => {
|
||||
assert.equal(stdout, `${JSON.stringify(config, null, ' ')}\n`);
|
||||
assert.equal(stderr, '');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -293,9 +291,8 @@ describe('scripts/email-config:', () => {
|
|||
cwd,
|
||||
}
|
||||
)
|
||||
.then(({ stdout, stderr }) => {
|
||||
.then(({ stdout }) => {
|
||||
assert.equal(stdout, '{}\n');
|
||||
assert.equal(stderr, '');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -317,9 +314,8 @@ describe('scripts/email-config:', () => {
|
|||
.execAsync('node -r esbuild-register scripts/email-config read', {
|
||||
cwd,
|
||||
})
|
||||
.then(({ stdout, stderr }) => {
|
||||
.then(({ stdout }) => {
|
||||
assert.equal(stdout, `${JSON.stringify(config, null, ' ')}\n`);
|
||||
assert.equal(stderr, '');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -331,9 +327,8 @@ describe('scripts/email-config:', () => {
|
|||
cwd,
|
||||
}
|
||||
)
|
||||
.then(({ stdout, stderr }) => {
|
||||
.then(({ stdout }) => {
|
||||
assert.equal(stdout, `${JSON.stringify(config, null, ' ')}\n`);
|
||||
assert.equal(stderr, '');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -345,12 +340,11 @@ describe('scripts/email-config:', () => {
|
|||
cwd,
|
||||
}
|
||||
)
|
||||
.then(({ stdout, stderr }) => {
|
||||
.then(({ stdout }) => {
|
||||
const expected = {
|
||||
socketlabs: config.socketlabs,
|
||||
};
|
||||
assert.equal(stdout, `${JSON.stringify(expected, null, ' ')}\n`);
|
||||
assert.equal(stderr, '');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -369,12 +363,11 @@ describe('scripts/email-config:', () => {
|
|||
.execAsync('node -r esbuild-register scripts/email-config read', {
|
||||
cwd,
|
||||
})
|
||||
.then(({ stdout, stderr }) => {
|
||||
.then(({ stdout }) => {
|
||||
const expected = {
|
||||
sendgrid: config.sendgrid,
|
||||
};
|
||||
assert.equal(stdout, `${JSON.stringify(expected, null, ' ')}\n`);
|
||||
assert.equal(stderr, '');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -386,12 +379,11 @@ describe('scripts/email-config:', () => {
|
|||
cwd,
|
||||
}
|
||||
)
|
||||
.then(({ stdout, stderr }) => {
|
||||
.then(({ stdout }) => {
|
||||
const expected = {
|
||||
sendgrid: config.sendgrid,
|
||||
};
|
||||
assert.equal(stdout, `${JSON.stringify(expected, null, ' ')}\n`);
|
||||
assert.equal(stderr, '');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -403,9 +395,8 @@ describe('scripts/email-config:', () => {
|
|||
cwd,
|
||||
}
|
||||
)
|
||||
.then(({ stdout, stderr }) => {
|
||||
.then(({ stdout }) => {
|
||||
assert.equal(stdout, '{}\n');
|
||||
assert.equal(stderr, '');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -424,9 +415,8 @@ describe('scripts/email-config:', () => {
|
|||
.execAsync('node -r esbuild-register scripts/email-config read', {
|
||||
cwd,
|
||||
})
|
||||
.then(({ stdout, stderr }) => {
|
||||
.then(({ stdout }) => {
|
||||
assert.equal(stdout, '');
|
||||
assert.equal(stderr, '');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -438,9 +428,8 @@ describe('scripts/email-config:', () => {
|
|||
cwd,
|
||||
}
|
||||
)
|
||||
.then(({ stdout, stderr }) => {
|
||||
.then(({ stdout }) => {
|
||||
assert.equal(stdout, '');
|
||||
assert.equal(stderr, '');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
"request": "^2.88.2",
|
||||
"restify-clients": "^3.1.0",
|
||||
"sinon": "^9.0.3",
|
||||
"tap": "^14.11.0",
|
||||
"tap": "^15.0.10",
|
||||
"walk": "^2.3.15"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
tap test/local test/remote test/scripts --coverage-report=lcov
|
||||
tap test/local test/remote test/scripts --no-coverage --jobs=1
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
"@types/convict": "^5.2.2",
|
||||
"@types/express": "^4.17.12",
|
||||
"@types/jest": "^26.0.23",
|
||||
"@types/node": "^15.12.2",
|
||||
"@types/node": "^16.11.3",
|
||||
"@types/passport": "^1.0.6",
|
||||
"@types/passport-jwt": "^3.0.5",
|
||||
"@types/rimraf": "3.0.0",
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
"@types/graphql": "^14.5.0",
|
||||
"@types/graphql-upload": "^8.0.5",
|
||||
"@types/ioredis": "^4.26.4",
|
||||
"@types/node": "^15.12.2",
|
||||
"@types/node": "^16.11.3",
|
||||
"@types/passport": "^1.0.6",
|
||||
"@types/passport-http-bearer": "^1.0.36",
|
||||
"@types/superagent": "4.1.11",
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
"devDependencies": {
|
||||
"@types/chai": "^4.2.18",
|
||||
"@types/mocha": "^8.2.2",
|
||||
"@types/node": "^15.12.2",
|
||||
"@types/node": "^16.11.3",
|
||||
"@types/sinon": "10.0.1",
|
||||
"audit-filter": "^0.5.0",
|
||||
"chai": "^4.3.4",
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
"@types/jest": "^26.0.23",
|
||||
"@types/jsdom": "^16.2.11",
|
||||
"@types/nock": "^11.1.0",
|
||||
"@types/node": "^15.12.2",
|
||||
"@types/node": "^16.11.3",
|
||||
"@types/react": "^17.0.14",
|
||||
"@types/react-document-title": "^2.0.5",
|
||||
"@types/react-dom": "^17.0.9",
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
import React, { useState } from 'react';
|
||||
import {
|
||||
act,
|
||||
fireEvent,
|
||||
render,
|
||||
waitForElementToBeRemoved,
|
||||
} from '@testing-library/react';
|
||||
import { act, fireEvent, render } from '@testing-library/react';
|
||||
import '@testing-library/jest-dom/extend-expect';
|
||||
|
||||
jest.mock('../../lib/apiClient', () => ({
|
||||
|
@ -150,26 +145,19 @@ describe('NewUserEmailForm test', () => {
|
|||
});
|
||||
|
||||
it('shows no error when emails match', async () => {
|
||||
let subject;
|
||||
await act(async () => {
|
||||
subject = render(
|
||||
<WrapNewUserEmailForm accountExistsReturnValue={false} />
|
||||
);
|
||||
const firstEmail = subject.getByTestId('new-user-email');
|
||||
const secondEmail = subject.getByTestId('new-user-confirm-email');
|
||||
let subject = render(
|
||||
<WrapNewUserEmailForm accountExistsReturnValue={false} />
|
||||
);
|
||||
const firstEmail = subject.getByTestId('new-user-email');
|
||||
const secondEmail = subject.getByTestId('new-user-confirm-email');
|
||||
|
||||
fireEvent.change(firstEmail, { target: { value: 'valid@email.com' } });
|
||||
fireEvent.blur(firstEmail);
|
||||
fireEvent.change(secondEmail, { target: { value: 'valid@email.com' } });
|
||||
fireEvent.blur(secondEmail);
|
||||
});
|
||||
waitForElementToBeRemoved(
|
||||
subject.queryByText('new-user-email-validate-confirm')
|
||||
).then(() => {
|
||||
expect(
|
||||
subject.queryByText('new-user-email-validate-confirm')
|
||||
).toBeFalsy();
|
||||
fireEvent.change(firstEmail, { target: { value: 'valid@email.com' } });
|
||||
fireEvent.change(secondEmail, {
|
||||
target: { value: 'valid@email.com' },
|
||||
});
|
||||
fireEvent.blur(secondEmail);
|
||||
|
||||
expect(subject.queryByText('new-user-email-validate-confirm')).toBeFalsy();
|
||||
});
|
||||
|
||||
it('Notifies the user if they already have an account', async () => {
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
"@types/classnames": "^2.3.1",
|
||||
"@types/file-loader": "^5.0.0",
|
||||
"@types/jest": "^26.0.23",
|
||||
"@types/node": "^15.12.2",
|
||||
"@types/node": "^16.11.3",
|
||||
"@types/prettier": "2.3.0",
|
||||
"@types/react": "^17.0.14",
|
||||
"@types/react-dom": "^17.0.9",
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
"@types/classnames": "^2.3.1",
|
||||
"@types/jest": "^26.0.23",
|
||||
"@types/lodash.groupby": "^4",
|
||||
"@types/node": "^15.12.2",
|
||||
"@types/node": "^16.11.3",
|
||||
"@types/react": "^17.0.14",
|
||||
"@types/react-dom": "^17.0.9",
|
||||
"@types/react-test-renderer": "^17.0.1",
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
"@types/lodash.pick": "^4",
|
||||
"@types/mocha": "^8.2.2",
|
||||
"@types/mysql": "^2",
|
||||
"@types/node": "^15.12.2",
|
||||
"@types/node": "^16.11.3",
|
||||
"@types/proxyquire": "^1.3.28",
|
||||
"@types/sinon": "10.0.1",
|
||||
"@types/superagent": "^4.1.11",
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
"@types/convict": "^5.2.2",
|
||||
"@types/eslint": "7.2.13",
|
||||
"@types/hbs": "^4",
|
||||
"@types/node": "^15.12.2",
|
||||
"@types/node": "^16.11.3",
|
||||
"@types/superagent": "4.1.11",
|
||||
"@types/supertest": "^2.0.11",
|
||||
"audit-filter": "^0.5.0",
|
||||
|
|
667
yarn.lock
667
yarn.lock
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче