Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrated to Node.js 20 #2558

Merged
merged 4 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'check-file',
],
ignorePatterns: ['**/dist/*', '**/node_modules/*'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:security/recommended'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:security/recommended-legacy'],
rules: {
'@typescript-eslint/array-type': [
'error',
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ copyright-header.txt
.yarn/
**/*.patch
**/.gdnsuppress
**/chrome-user-data
4 changes: 2 additions & 2 deletions azure-pipeline/install-dependencies-steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: '16.x'
displayName: Use node 16.x
versionSpec: '20.x'
displayName: Use node 20

- script: |
yarn install --immutable
Expand Down
44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,25 @@
"url": "https://github.com/Microsoft/accessibility-insights-service/issues"
},
"devDependencies": {
"@types/node": "^16.18.11",
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/eslint-plugin-tslint": "^5.50.0",
"@typescript-eslint/parser": "^5.50.0",
"@types/node": "^20.14.9",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/eslint-plugin-tslint": "^7.0.2",
"@typescript-eslint/parser": "^7.15.0",
"combine-dependabot-prs": "^1.0.5",
"commander": "^10.0.0",
"eslint": "^7.32.0",
"eslint-plugin-check-file": "^1.3.1",
"eslint": "^8.57.0",
"eslint-plugin-check-file": "^2.8.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^26.9.0",
"eslint-plugin-jsdoc": "^38.1.6",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-jsdoc": "^48.5.0",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-security": "^1.7.0",
"eslint-plugin-sort-class-members": "^1.16.0",
"jest": "^29.5.0",
"jest-extended": "^3.2.3",
"jest-html-reporter": "^3.7.0",
"jest-junit": "^15.0.0",
"eslint-plugin-security": "^3.0.1",
"eslint-plugin-sort-class-members": "^1.20.0",
"jest": "^29.7.0",
"jest-extended": "^4.0.2",
"jest-html-reporter": "^3.10.2",
"jest-junit": "^16.0.0",
"license-check-and-add": "^4.0.5",
"npm-run-all": "^4.1.5",
"patch-package": "^8.0.0",
Expand All @@ -63,31 +63,31 @@
"shellcheck": "^2.2.0",
"simple-git": "^3.16.0",
"syncpack": "^8.4.11",
"ts-jest": "^29.1.0",
"ts-jest": "^29.1.5",
"tslint": "^6.1.3",
"typescript": "^4.9.5"
"typescript": "^5.5.3"
},
"workspaces": [
"packages/*"
],
"resolutions": {
"@types/node": "^16.18.11",
"@axe-core/puppeteer": "4.8.4",
"@npmcli/git": ">=2.1.0",
"@types/node": "^20.14.9",
"ansi-regex": "5.0.1",
"async": ">=3.2.2",
"axe-core": "4.8.4",
"@axe-core/puppeteer": "4.8.4",
"glob-parent": ">=5.1.2",
"json-schema": ">=0.4.0",
"json5": ">=2.2.3",
"minimist": ">=1.2.6",
"node-fetch": "^2.6.7",
"normalize-url": "6.1.0",
"semver": ">=7.5.2",
"set-value": ">=4.0.1",
"simple-get": ">=3.1.1",
"tar": ">=6.1.9",
"json5": ">=2.2.3",
"tough-cookie": ">=4.1.3",
"semver": ">=7.5.2"
"tough-cookie": ">=4.1.3"
},
"dependencies": {
"accessibility-insights-report": "4.8.0"
Expand Down
14 changes: 7 additions & 7 deletions packages/axe-core-scanner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@
},
"homepage": "https://github.com/Microsoft/accessibility-insights-service#readme",
"devDependencies": {
"@types/jest": "^29.5.0",
"@types/lodash": "^4.14.182",
"@types/node": "^16.18.11",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.17.6",
"@types/node": "^20.14.9",
"@types/puppeteer": "^7.0.4",
"cpy-cli": "^4.1.0",
"jest": "^29.5.0",
"jest-junit": "^15.0.0",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"npm-run-all": "^4.1.5",
"rimraf": "^4.1.2",
"ts-jest": "^29.1.0",
"ts-jest": "^29.1.5",
"typemoq": "^2.1.0",
"typescript": "^4.9.5"
"typescript": "^5.5.3"
},
"dependencies": {
"@axe-core/puppeteer": "4.8.4",
Expand Down
14 changes: 7 additions & 7 deletions packages/axe-result-converter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
"homepage": "https://github.com/Microsoft/accessibility-insights-service#readme",
"devDependencies": {
"@types/fingerprint-generator": "1.0.0",
"@types/jest": "^29.5.0",
"@types/lodash": "^4.14.182",
"@types/node": "^16.18.11",
"jest": "^29.5.0",
"jest-junit": "^15.0.0",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.17.6",
"@types/node": "^20.14.9",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"npm-run-all": "^4.1.5",
"rimraf": "^4.1.2",
"ts-jest": "^29.1.0",
"ts-jest": "^29.1.5",
"typemoq": "^2.1.0",
"typescript": "^4.9.5"
"typescript": "^5.5.3"
},
"dependencies": {
"accessibility-insights-report": "4.8.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/azure-services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@
"homepage": "https://github.com/manishsat/accessibility-insights-service#readme",
"devDependencies": {
"@types/got": "^9.6.11",
"@types/jest": "^29.5.0",
"@types/lodash": "^4.14.182",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.17.6",
"fork-ts-checker-webpack-plugin": "^7.3.0",
"jest": "^29.5.0",
"jest-junit": "^15.0.0",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"mockdate": "^3.0.5",
"npm-run-all": "^4.1.5",
"rimraf": "^4.1.2",
"ts-jest": "^29.1.0",
"ts-jest": "^29.1.5",
"ts-loader": "^9.4.2",
"typemoq": "^2.1.0",
"typescript": "^4.9.5",
"typescript": "^5.5.3",
"webpack": "^5.76.2",
"webpack-cli": "^5.0.1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import moment from 'moment';

export declare type UserAccessLevels = 'admin' | 'nonadmin';

export interface BatchTaskPropertyProvider {
export interface BatchTaskPropertyProviderOptional {
getResourceFiles?(): BatchServiceModels.ResourceFile[];
getAdditionalContainerRunOptions?(): string;
}

@injectable()
export abstract class BatchTaskPropertyProvider {
export abstract class BatchTaskPropertyProvider implements BatchTaskPropertyProviderOptional {
public abstract getImageName(): Promise<string>;

public getAdditionalContainerRunOptions?(): string {
Expand Down
14 changes: 7 additions & 7 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,25 @@
"standAlonePackage": "This is a stand-alone package. Do NOT add dependencies to any service packages.",
"devDependencies": {
"@types/escape-html": "^1.0.2",
"@types/jest": "^29.5.0",
"@types/lodash": "^4.14.182",
"@types/node": "^16.18.11",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.17.6",
"@types/node": "^20.14.9",
"@types/normalize-path": "^3.0.0",
"@types/puppeteer": "^7.0.4",
"@types/table": "^6.3.2",
"accessibility-insights-crawler": "workspace:*",
"copy-webpack-plugin": "^11.0.0",
"dts-bundle-generator": "^7.2.0",
"fork-ts-checker-webpack-plugin": "^7.3.0",
"jest": "^29.5.0",
"jest-junit": "^15.0.0",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"mkdirp": "^2.1.3",
"mockdate": "^3.0.5",
"npm-run-all": "^4.1.5",
"rimraf": "^4.1.2",
"ts-jest": "^29.1.0",
"ts-jest": "^29.1.5",
"typemoq": "^2.1.0",
"typescript": "^4.9.5",
"typescript": "^5.5.3",
"webpack": "^5.76.2",
"webpack-cli": "^5.0.1",
"webpack-node-externals": "^3.0.0"
Expand Down
12 changes: 6 additions & 6 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
"homepage": "https://github.com/Microsoft/accessibility-insights-service#readme",
"devDependencies": {
"@types/convict": "^6.1.1",
"@types/jest": "^29.5.0",
"@types/node": "^16.18.11",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.9",
"@types/normalize-path": "^3.0.0",
"@types/sha.js": "^2.4.0",
"jest": "^29.5.0",
"jest-junit": "^15.0.0",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"npm-run-all": "^4.1.5",
"rimraf": "^4.1.2",
"ts-jest": "^29.1.0",
"ts-jest": "^29.1.5",
"typemoq": "^2.1.0",
"typescript": "^4.9.5"
"typescript": "^5.5.3"
},
"dependencies": {
"@sindresorhus/fnv1a": "^2.0.1",
Expand Down
12 changes: 6 additions & 6 deletions packages/crawler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-node-resolve": "^15.0.0",
"@types/encoding-down": "^5.0.1",
"@types/jest": "^29.5.0",
"@types/jest": "^29.5.12",
"@types/leveldown": "^4.0.2",
"@types/levelup": "^5.1.1",
"@types/node": "^16.18.11",
"@types/node": "^20.14.9",
"@types/normalize-path": "^3.0.0",
"@types/puppeteer": "^7.0.4",
"jest": "^29.5.0",
"jest-junit": "^15.0.0",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"npm-run-all": "^4.1.5",
"rimraf": "^4.1.2",
"rollup": "^3.13.0",
"ts-jest": "^29.1.0",
"ts-jest": "^29.1.5",
"typemoq": "^2.1.0",
"typescript": "^4.9.5"
"typescript": "^5.5.3"
},
"standAlonePackage": "This is a stand-alone package. Do NOT add dependencies to any service packages.",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import { PageProcessorBase } from './page-processor-base';

describe(PageProcessorBase, () => {
class TestablePageProcessor extends PageProcessorBase {
public snapshot: boolean;
public declare snapshot: boolean;

public baseUrl: string;
public declare baseUrl: string;

public processPage: Crawlee.PuppeteerRequestHandler = async () => {
return;
Expand Down
10 changes: 5 additions & 5 deletions packages/crawler/src/page-processors/page-processor-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ export abstract class PageProcessorBase implements PageProcessor {

private scanMetadataSaved: boolean;

/**
* This function is called to extract data from a single web page.
*/
protected abstract processPage: Crawlee.PuppeteerRequestHandler;

/**
* Function that is called for each URL to crawl.
*/
Expand Down Expand Up @@ -139,11 +144,6 @@ export abstract class PageProcessorBase implements PageProcessor {
}
}

/**
* This function is called to extract data from a single web page.
*/
protected abstract processPage: Crawlee.PuppeteerRequestHandler;

protected async saveSnapshot(page: Puppeteer.Page, id: string): Promise<void> {
if (this.snapshot) {
await this.saveSnapshotExt(page, {
Expand Down
14 changes: 7 additions & 7 deletions packages/e2e-web-apis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@
"devDependencies": {
"@azure/functions": "^3.5.0",
"@types/dotenv": "^8.2.0",
"@types/jest": "^29.5.0",
"@types/lodash": "^4.14.182",
"@types/node": "^16.18.11",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.17.6",
"@types/node": "^20.14.9",
"copy-webpack-plugin": "^11.0.0",
"fork-ts-checker-webpack-plugin": "^7.3.0",
"jest": "^29.5.0",
"jest-junit": "^15.0.0",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"node-loader": "^2.0.0",
"npm-run-all": "^4.1.5",
"rimraf": "^4.1.2",
"ts-jest": "^29.1.0",
"ts-jest": "^29.1.5",
"ts-loader": "^9.4.2",
"typescript": "^4.9.5",
"typescript": "^5.5.3",
"webpack": "^5.76.2",
"webpack-cli": "^5.0.1",
"webpack-ignore-dynamic-require": "^1.0.0"
Expand Down
14 changes: 7 additions & 7 deletions packages/functional-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
"@types/chai": "^4.3.4",
"@types/deep-equal-in-any-order": "^1.0.1",
"@types/dotenv": "^8.2.0",
"@types/jest": "^29.5.0",
"@types/lodash": "^4.14.182",
"@types/node": "^16.18.11",
"jest": "^29.5.0",
"jest-junit": "^15.0.0",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.17.6",
"@types/node": "^20.14.9",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"mockdate": "^3.0.5",
"npm-run-all": "^4.1.5",
"rimraf": "^4.1.2",
"ts-jest": "^29.1.0",
"ts-jest": "^29.1.5",
"typemoq": "^2.1.0",
"typescript": "^4.9.5"
"typescript": "^5.5.3"
},
"dependencies": {
"@azure/cosmos": "^4.0.0",
Expand Down
14 changes: 7 additions & 7 deletions packages/health-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
"devDependencies": {
"@types/chai": "^4.3.4",
"@types/dotenv": "^8.2.0",
"@types/jest": "^29.5.0",
"@types/lodash": "^4.14.182",
"@types/node": "^16.18.11",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.17.6",
"@types/node": "^20.14.9",
"copy-webpack-plugin": "^11.0.0",
"jest": "^29.5.0",
"jest-junit": "^15.0.0",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"npm-run-all": "^4.1.5",
"rimraf": "^4.1.2",
"shebang-loader": "^0.0.1",
"ts-jest": "^29.1.0",
"ts-jest": "^29.1.5",
"typemoq": "^2.1.0",
"typescript": "^4.9.5",
"typescript": "^5.5.3",
"webpack": "^5.76.2",
"webpack-cli": "^5.0.1",
"webpack-ignore-dynamic-require": "^1.0.0"
Expand Down
Loading