feature: Stop building unified client (#6665)

#### Details

This is a shallow cut at deprecating building and testing of the unified
client. This is coming in before the actual cleanup feature so that we
can sever the downloads of
`accessibility-insights-for-android-service-bin`, and to clear the path
for dependabot PR's that work fine in web but have problems in unified.

Included in this PR:
- Exclude unified from yaml files (shallow pass, later pass will go
deeper)
- Exclude unified from package.json
- Exclude unified from gruntfile (shallow pass)
- Exclude `accessibility-insights-for-android-service-bin` from
dependencies

##### Motivation

Prepare for full removal of Unified client. I've created
https://github.com/microsoft/accessibility-insights-web/releases/tag/before-unified-removal
as a tag for anyone who later wants to resume this work

##### Context

<!-- Are there any parts that you've intentionally left out-of-scope for
a later PR to handle? -->

<!-- Were there any alternative approaches you considered? What
tradeoffs did you consider? -->

#### Pull request checklist
<!-- If a checklist item is not applicable to this change, write "n/a"
in the checkbox -->
- [n/a] Addresses an existing issue
- [x] Ran `yarn fastpass`
- [x] Added/updated relevant unit test(s) (and ran `yarn test`)
- [x] Verified code coverage for the changes made. Check coverage report
at: `<rootDir>/test-results/unit/coverage`
- [x] PR title *AND* final merge commit title both start with a semantic
tag (`fix:`, `chore:`, `feat(feature-name):`, `refactor:`). See
`CONTRIBUTING.md`.
- [n/a] (UI changes only) Added screenshots/GIFs to description above
- [n/a] (UI changes only) Verified usability with NVDA/JAWS
This commit is contained in:
Dave Tryon 2023-05-31 11:07:13 -07:00 коммит произвёл GitHub
Родитель e5786db9fe
Коммит 1fc6028946
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
8 изменённых файлов: 15 добавлений и 466 удалений

53
.github/workflows/ci.yml поставляемый
Просмотреть файл

@ -220,59 +220,6 @@ jobs:
test-results/e2e/failure-screenshots
timeout-minutes: 15 # chrome-logs is several GB, this can take a while
e2e-unified-tests:
name: e2e-unified-tests (${{ matrix.shard-index }}/${{ strategy.job-total }})
runs-on: ubuntu-20.04
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
DISPLAY: :99
DEBUG: pw:api
strategy:
fail-fast: false
matrix:
shard-index: [1, 2]
steps:
- uses: actions/checkout@v3
timeout-minutes: 2
- uses: actions/setup-dotnet@v2
with: { dotnet-version: "${{ env.DOTNET_SDK_VERSION }}" }
timeout-minutes: 2
- uses: actions/setup-node@v3
with:
node-version: "${{ env.NODE_VERSION }}"
cache: yarn
timeout-minutes: 5
- run: yarn install --immutable
timeout-minutes: 10
- run: yarn build:unified
timeout-minutes: 5
- run: yarn playwright install-deps chromium
timeout-minutes: 5
- name: configure xvfb to use DISPLAY var from env
if: runner.os == 'Linux'
run: |
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1024x768x24 &
- name: yarn test:unified
run: |
yarn test:unified --ci --shard=${{ matrix.shard-index }}/${{ strategy.job-total }}
timeout-minutes: 15
- name: upload artifact e2e-unified-tests-results
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: e2e-unified-tests-${{ matrix.shard-index }}-results
path: test-results/electron
timeout-minutes: 3
e2e-report-tests:
runs-on: ubuntu-20.04
env: { PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 }

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

@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
const path = require('path');
const androidServiceBin = require('accessibility-insights-for-android-service-bin');
const yaml = require('js-yaml');
const merge = require('lodash/merge');
const sass = require('sass');
const targets = require('./targets.config');
@ -29,10 +27,6 @@ module.exports = function (grunt) {
const packageAxeConfigBundlePath = path.join(packageAxeConfigPath, 'bundle');
const packageAxeConfigDropPath = path.join(packageAxeConfigPath, 'drop');
const mockAdbObjPath = path.join('packages', 'mock-adb', 'obj');
const mockAdbBinPath = path.join('packages', 'mock-adb', 'bin');
const mockAdbDropPath = path.join('drop', 'mock-adb');
function mustExist(file, reason) {
const normalizedFile = path.normalize(file);
if (!grunt.file.exists(normalizedFile)) {
@ -40,17 +34,12 @@ module.exports = function (grunt) {
}
}
function getUnifiedVersion() {
return grunt.option('unified-version');
}
grunt.initConfig({
bom: {
cwd: path.resolve('./src/**/*.{ts,tsx,js,snap,html,scss,css}'),
},
clean: {
intermediates: ['dist', extensionPath],
'mock-adb': [mockAdbObjPath, mockAdbBinPath, mockAdbDropPath],
'package-report': packageReportDropPath,
'package-ui': packageUIDropPath,
'package-validator': packageValidatorDropPath,
@ -58,7 +47,7 @@ module.exports = function (grunt) {
scss: path.join('src', '**/*.scss.d.ts'),
},
concurrent: {
'compile-all': ['exec:esbuild-dev', 'exec:webpack-unified', 'exec:esbuild-prod'],
'compile-all': ['exec:esbuild-dev', 'exec:esbuild-prod'],
},
copy: {
code: {
@ -113,12 +102,6 @@ module.exports = function (grunt) {
dest: path.join(extensionPath, 'DetailsView/styles/default'),
expand: true,
},
{
cwd: './dist/src/electron/views',
src: '*.css',
dest: path.join(extensionPath, 'electron/views'),
expand: true,
},
{
cwd: './dist/src/injected/styles',
src: '*.css',
@ -190,7 +173,6 @@ module.exports = function (grunt) {
'esbuild-dev': `node esbuild.js`,
'esbuild-prod': `node esbuild.js --env prod`,
'esbuild-package-report': `node esbuild.js --env report`,
'webpack-unified': `"${webpackPath}" --config-name unified`,
'webpack-package-ui': `"${webpackPath}" --config-name package-ui`,
'esbuild-package-validator': `node esbuild.js --env validator`,
'generate-validator': `node ${packageValidatorDropPath}`,
@ -200,10 +182,6 @@ module.exports = function (grunt) {
'axe-config-generator.bundle.js',
)} ${path.join(packageAxeConfigDropPath, 'axe-config.json')}`,
'generate-scss-typings': `"${typedScssModulesPath}" src --exportType default`,
'dotnet-publish-mock-adb': {
command: `dotnet publish -c Release -o "${path.resolve(mockAdbDropPath)}"`,
cwd: 'packages/mock-adb',
},
},
sass: {
options: {
@ -233,25 +211,21 @@ module.exports = function (grunt) {
watch: {
images: {
files: ['src/**/*.{png,ico,icns}'],
tasks: ['copy:images', 'drop:dev', 'drop:unified-dev'],
tasks: ['copy:images', 'drop:dev'],
},
'non-webpack-code': {
files: ['src/**/*.html', 'src/manifest.json'],
tasks: ['copy:code', 'drop:dev', 'drop:unified-dev'],
tasks: ['copy:code', 'drop:dev'],
},
scss: {
files: ['src/**/*.scss'],
tasks: ['sass', 'copy:styles', 'drop:dev', 'drop:unified-dev'],
tasks: ['sass', 'copy:styles', 'drop:dev'],
},
// We assume esbuild --watch is running separately (usually via 'yarn watch')
'esbuild-dev-output': {
files: ['extension/devBundle/**/*.*'],
tasks: ['drop:dev'],
},
'webpack-unified-output': {
files: ['extension/unifiedBundle/**/*.*'],
tasks: ['drop:unified-dev'],
},
},
});
@ -260,52 +234,6 @@ module.exports = function (grunt) {
const extensionReleaseTargets = releaseTargets.filter(
t => targets[t].config.options.productCategory === 'extension',
);
const unifiedReleaseTargets = releaseTargets.filter(
t => targets[t].config.options.productCategory === 'electron',
);
unifiedReleaseTargets.forEach(targetName => {
const { config, appId, publishUrl } = targets[targetName];
const { electronIconBaseName, fullName, productCategory } = config.options;
const dropPath = `drop/${productCategory}/${targetName}`;
grunt.config.merge({
'configure-electron-builder': {
[targetName]: {
dropPath,
electronIconBaseName,
fullName,
appId,
publishUrl,
},
},
'electron-builder-prepare': {
[targetName]: {
dropPath: dropPath,
},
},
'electron-builder-pack': {
[targetName]: {
dropPath: dropPath,
},
},
'unified-release-drop': {
[targetName]: {
// empty on purpose
},
},
'unified-release-pack': {
[targetName]: {
// empty on purpose
},
},
'zip-mac-folder': {
[targetName]: {
dropPath: dropPath,
},
},
});
});
targetNames.forEach(targetName => {
const { config, bundleFolder, telemetryKeyIdentifier } = targets[targetName];
@ -316,32 +244,10 @@ module.exports = function (grunt) {
const dropExtensionPath = path.join(dropPath, 'product');
const productCategorySpecificCopyFiles = [];
if (productCategory === 'electron') {
productCategorySpecificCopyFiles.push(
{
src: 'src/electron/resources/mit_license_en.txt',
dest: `${dropExtensionPath}/LICENSE`,
},
{
src: androidServiceBin.apkPath,
// This should be kept in sync with android-service-apk.ts
dest: path.join(dropExtensionPath, 'android-service', 'android-service.apk'),
},
{
src: androidServiceBin.noticePath,
dest: path.join(
dropExtensionPath,
'android-service',
path.basename(androidServiceBin.noticePath),
),
},
);
} else {
productCategorySpecificCopyFiles.push({
src: 'LICENSE',
dest: `${dropExtensionPath}/LICENSE`,
});
}
productCategorySpecificCopyFiles.push({
src: 'LICENSE',
dest: `${dropExtensionPath}/LICENSE`,
});
grunt.config.merge({
drop: {
@ -450,13 +356,6 @@ module.exports = function (grunt) {
config.options.appInsightsInstrumentationKey = grunt.option(telemetryKeyIdentifier);
}
// Add unifiedAppVersion value for electron-based products
if (config.options.productCategory === 'electron') {
const unifiedAppVersion = getUnifiedVersion();
if (unifiedAppVersion) {
config.options.unifiedAppVersion = unifiedAppVersion;
}
}
const configJSON = JSON.stringify(config, undefined, 4);
grunt.file.write(configJSONPath, configJSON);
const copyrightHeader =
@ -509,211 +408,6 @@ module.exports = function (grunt) {
console.log(`${targetName} extension is in ${dropExtensionPath}`);
});
grunt.registerMultiTask('configure-electron-builder', function () {
grunt.task.requires('drop:' + this.target);
const { dropPath, electronIconBaseName, fullName, appId, publishUrl } = this.data;
const productDir = `${dropPath}/product`;
const outElectronBuilderConfigFile = path.join(dropPath, 'electron-builder.yml');
const srcElectronBuilderConfigFile = path.join(
'src',
'electron',
'electron-builder',
`electron-builder.template.yaml`,
);
const version = getUnifiedVersion() || '0.0.0';
const config = grunt.file.readYAML(srcElectronBuilderConfigFile);
config.appId = appId;
config.directories.app = dropPath;
config.directories.output = `${dropPath}/packed`;
config.extraMetadata.version = version;
config.win.icon = `src/${electronIconBaseName}.ico`;
// electron-builder infers the linux icon from the mac one
config.mac.icon = `src/${electronIconBaseName}.icns`;
config.publish.url = publishUrl;
config.productName = fullName;
config.extraMetadata.name = fullName;
// This is necessary for the AppImage to display using our brand icon
// See electron-userland/electron-builder#3547 and AppImage/AppImageKit#678
config.linux.artifactName = fullName.replace(/ (- )?/g, '_') + '.${ext}';
for (const fileset of [...config.extraResources, ...config.extraFiles]) {
fileset.from = fileset.from.replace(/TARGET_SPECIFIC_PRODUCT_DIR/g, productDir);
}
// Manually copying the license files is a workaround for electron-builder #1495.
// On win/linux builds these are automatically included, but in Mac they are omitted.
// Mac notarization also requires specific structuring of code; these files should be put in
// the Contents/Resources folder which electron-builder will do for 'extraResources'.
// https://developer.apple.com/forums/thread/128166, section "Structure Your Code Correctly"
if (process.platform === 'darwin') {
config.extraResources = config.extraResources.concat(config.extraFiles);
config.extraFiles = [];
config.extraResources.push(
{
from: 'node_modules/electron/dist/LICENSE',
to: 'LICENSE.electron.txt',
},
{
from: 'node_modules/electron/dist/LICENSES.chromium.html',
to: 'LICENSES.chromium.html',
},
);
}
const configFileContent = yaml.dump(config);
grunt.file.write(outElectronBuilderConfigFile, configFileContent);
grunt.log.writeln(`generated ${outElectronBuilderConfigFile} from target config`);
});
grunt.registerMultiTask('electron-builder-prepare', function () {
grunt.task.requires('drop:' + this.target);
grunt.task.requires('configure-electron-builder:' + this.target);
const { dropPath } = this.data;
const configFile = path.join(dropPath, 'electron-builder.yml');
const taskDoneCallback = this.async();
grunt.util.spawn(
{
cmd: 'node',
args: [
'node_modules/electron-builder/out/cli/cli.js',
'-p',
'never',
'-c',
configFile,
],
opts: {
// electron-builder performs an internal yarn install step to install
// production dependencies for the specific platform being built. This
// will (correctly) result in a different yarn.lock file than our normal
// one. Yarn will throw an error for yarn.lock differences on CI agents;
// suppressing environment variables prevents it from detecting whether it's
// on a CI agent and suppresses that behavior.
env: {
...process.env,
// These specific variables are the ones detected by package ci-info
CI: undefined,
CONTINUOUS_INTEGRATION: undefined,
GITHUB_ACTIONS: undefined,
SYSTEM_TEAMFOUNDATIONCOLLECTIONURI: undefined,
},
},
},
(error, result, code) => {
if (error) {
grunt.fail.fatal(
`electron-builder exited with error code ${code}:\n\n${result.stdout}`,
code,
);
}
taskDoneCallback();
},
);
});
grunt.registerMultiTask('electron-builder-pack', function () {
const { dropPath } = this.data;
const configFile = path.join(dropPath, 'electron-builder.yml');
mustExist(configFile, 'Have you built the product you are trying to pack?');
let unpackedDirName;
switch (process.platform) {
case 'win32':
unpackedDirName = 'win-unpacked';
break;
case 'darwin':
unpackedDirName = 'mac';
break;
case 'linux':
unpackedDirName = 'linux-unpacked';
break;
}
const unpackedPath = path.join(dropPath, 'packed', unpackedDirName);
const taskDoneCallback = this.async();
grunt.util.spawn(
{
cmd: 'node',
args: [
'node_modules/electron-builder/out/cli/cli.js',
'-p',
'never',
'-c',
configFile,
'--pd',
unpackedPath,
],
},
(error, result, code) => {
if (error) {
grunt.fail.fatal(
`electron-builder exited with error code ${code}:\n\n${result.stdout}`,
code,
);
}
taskDoneCallback();
},
);
});
grunt.registerMultiTask('zip-mac-folder', function () {
grunt.task.requires('electron-builder-pack:' + this.target);
// We found that the mac update fails unless we produce the
// zip file ourselves; electron-builder requires a zip file, but
// the zip file it produces leads to 'couldn't find pkzip signatures'
// during the eventual update.
if (process.platform !== 'darwin') {
grunt.log.writeln(`task not required for this platform (${process.platform})`);
return true;
}
const { dropPath } = this.data;
const packedPath = `${dropPath}/packed`;
const taskDoneCallback = this.async();
grunt.util.spawn(
{
cmd: 'node',
args: ['pipeline/scripts/zip-mac-folder.js', packedPath],
},
(error, result, code) => {
if (error) {
grunt.fail.fatal(
`zipping mac folder exited with error code ${code}:\n\n${result.stdout}`,
code,
);
}
taskDoneCallback();
},
);
});
grunt.registerMultiTask('unified-release-drop', function () {
grunt.task.run(`drop:${this.target}`);
grunt.task.run(`configure-electron-builder:${this.target}`);
grunt.task.run(`electron-builder-prepare:${this.target}`);
});
grunt.registerMultiTask('unified-release-pack', function () {
grunt.task.run(`electron-builder-pack:${this.target}`);
grunt.task.run(`zip-mac-folder:${this.target}`);
});
grunt.registerTask('package-report', function () {
const mustExistPath = path.join(packageReportBundlePath, 'report.bundle.js');
@ -758,28 +452,12 @@ module.exports = function (grunt) {
console.log(`package is in ${packageAxeConfigDropPath}`);
});
grunt.registerTask('build-mock-adb', function () {
grunt.task.run('exec:dotnet-publish-mock-adb');
});
grunt.registerTask('extension-release-drops', function () {
extensionReleaseTargets.forEach(targetName => {
grunt.task.run('drop:' + targetName);
});
});
grunt.registerTask('unified-release-drops', function () {
unifiedReleaseTargets.forEach(targetName => {
grunt.task.run('unified-release-drop:' + targetName);
});
});
grunt.registerTask('unified-release-packs', function () {
unifiedReleaseTargets.forEach(targetName => {
grunt.task.run('unified-release-pack:' + targetName);
});
});
grunt.registerTask('ada-cat', function () {
if (process.env.SHOW_ADA !== 'false') {
console.log(
@ -812,20 +490,6 @@ module.exports = function (grunt) {
'build-assets',
'drop:production',
]);
grunt.registerTask('build-unified', [
'clean:intermediates',
'exec:generate-scss-typings',
'build-mock-adb',
'exec:webpack-unified',
'build-assets',
'drop:unified-dev',
]);
grunt.registerTask('build-unified-canary', [
'build-unified',
'unified-release-drop:unified-canary',
]);
grunt.registerTask('build-unified-all', ['build-unified', 'unified-release-drops']);
grunt.registerTask('pack-unified-all', ['unified-release-packs']);
grunt.registerTask('build-package-report', [
'clean:intermediates',
'exec:generate-scss-typings',
@ -855,13 +519,11 @@ module.exports = function (grunt) {
grunt.registerTask('build-all', [
'clean:intermediates',
'exec:generate-scss-typings',
'build-mock-adb',
'build-package-validator',
'exec:generate-validator',
'concurrent:compile-all',
'build-assets',
'drop:dev',
'drop:unified-dev',
'extension-release-drops',
]);

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

@ -154,31 +154,3 @@ jobs:
parameters:
target: web
- template: pipeline/e2e-test-publish-results.yaml
- job: 'e2e_unified_mac'
pool:
vmImage: $(macImage)
steps:
- template: pipeline/install-node-prerequisites.yaml
- template: pipeline/unified/unified-e2e-test-interactive.yaml
- template: pipeline/unified/unified-e2e-publish-results.yaml
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
- job: 'e2e_unified_linux'
pool:
vmImage: $(linuxImage)
steps:
- template: pipeline/install-node-prerequisites.yaml
- template: pipeline/run-tests-in-docker-linux.yaml
parameters:
target: unified
- template: pipeline/unified/unified-e2e-publish-results.yaml
- job: 'e2e_unified_windows'
pool:
vmImage: $(windowsImage)
steps:
- template: pipeline/install-node-prerequisites.yaml
- template: pipeline/unified/unified-e2e-test-interactive.yaml
- template: pipeline/unified/unified-e2e-publish-results.yaml
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))

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

@ -23,26 +23,18 @@
"scripts": {
"packages": "yarn workspaces foreach --verbose",
"ada-cat": "grunt ada-cat",
"assessment": "npm-run-all --serial scss:clean fastpass build:all test test:e2e test:unified",
"assessment": "npm-run-all --serial scss:clean fastpass build:all test test:e2e",
"build": "grunt",
"build:all": "grunt build-all",
"build:dev": "grunt build-dev",
"build:mock-adb": "grunt build-mock-adb",
"build:unified": "grunt build-unified",
"build:unified:all": "grunt build-unified-all",
"build:unified:canary": "grunt build-unified-canary",
"build:package:report": "yarn packages --include accessibility-insights-report run build",
"build:package:ui": "yarn packages --include accessibility-insights-ui run build",
"build:prod": "grunt build-prod",
"build:package:axe-config": "grunt generate-axe-config",
"change-log": "node ./tools/get-change-log-for-release.js",
"clean": "grunt clean:*",
"clean:mock-adb": "grunt clean:mock-adb",
"copy:prepare-binskim": "node ./pipeline/scripts/prepare-binskim-symbols.js",
"copyright:check": "license-check-and-add check -f copyright-header.config.json",
"copyright:fix": "license-check-and-add add -f copyright-header.config.json",
"download:electron-mirror:binaries": "node ./pipeline/scripts/download-electron-mirror-binaries.js",
"download:electron-mirror:symbols": "node ./pipeline/scripts/download-electron-mirror-symbols.js",
"fastpass": "npm-run-all --print-label scss:build --parallel type:check copyright:check lint:check lint:scss format:check null:check && grunt ada-cat",
"fastpass:fix": "npm-run-all --print-label --serial scss:clean copyright:fix lint:fix lint:scss:fix format:fix",
"format:check": "prettier --config prettier.config.js --check \"**/*\"",
@ -52,49 +44,34 @@
"lint:fix": "eslint \"**/*.{js,ts,tsx}\" --quiet --fix",
"lint:scss": "stylelint \"**/*.scss\"",
"lint:scss:fix": "stylelint \"**/*.scss\" --fix",
"mock-adb": "node ./src/tests/miscellaneous/setup-mock-adb/setup-mock-adb-command.js",
"null:autoadd": "node ./tools/strict-null-checks/auto-add.js",
"null:check": "tsc -p ./tsconfig.strictNullChecks.json",
"null:find": "node ./tools/strict-null-checks/find.js",
"null:find-cycles": "node ./tools/strict-null-checks/find-cycles.js",
"null:progress": "node ./tools/strict-null-checks/progress.js",
"pack:unified:all": "grunt pack-unified-all",
"pack:unified:canary": "grunt unified-release-pack:unified-canary",
"pack:unified:insider": "grunt unified-release-pack:unified-insider",
"pack:unified:production": "grunt unified-release-pack:unified-production",
"react-devtools": "react-devtools",
"react-devtools:setup": "yarn add -W --dev react-devtools && echo \"react-devtools installed, rebuild required. Do not commit this package.json/yarn.lock change!\"",
"run:binskim": "node ./pipeline/scripts/run-binskim.js",
"scss:build": "typed-scss-modules \"src/**/*.scss\" --exportType default",
"scss:clean": "grunt clean:scss",
"start:unified": "electron drop/electron/unified-dev/product/bundle/main.bundle.js",
"start:unified:dev": "cross-env DEV_MODE=true yarnpkg start:unified",
"start:unified:mock-adb": "cross-env ANDROID_HOME=drop/mock-adb yarnpkg start:unified",
"test": "jest --projects src/tests/unit",
"publish-code-coverage": "npx codecov",
"test:e2e": "jest --projects src/tests/end-to-end --runInBand --forceExit --detectOpenHandles",
"test:e2e:docker:build": "docker build -t accessibility-insights-e2e --target web .",
"test:e2e:docker:build:web": "docker build -t accessibility-insights-web-e2e --target web .",
"test:e2e:docker:build:unified": "docker build -t accessibility-insights-unified-e2e --target unified .",
"test:e2e:docker:run": "docker run -t accessibility-insights-e2e",
"test:e2e:docker:run:web": "docker run -t accessibility-insights-web-e2e",
"test:e2e:docker:run:unified": "docker run -t accessibility-insights-unified-e2e sh -c \"yarn test:unified --ci\"",
"test:e2e:docker": "npm-run-all --serial test:e2e:docker:build \"test:e2e:docker:run {@}\" --",
"test:unified": "cross-env NODE_OPTIONS='--max-old-space-size=512' jest --projects src/tests/electron --runInBand --forceExit --detectOpenHandles",
"test:report:e2e": "yarn packages --include accessibility-insights-report-e2e-tests run test",
"tbuild": "yarn build && yarn type:check",
"tbuild:all": "yarn build:all && yarn type:check",
"type:check": "tsc -noEmit",
"unified-mac-sign": "node ./pipeline/scripts/unified-mac-sign.js",
"watch": "npm-run-all --parallel --race --print-label watch:scss watch:grunt watch:test watch:esbuild watch:webpack-unified",
"watch:build:all": "npm-run-all --parallel --race --print-label watch:scss watch:grunt watch:esbuild watch:webpack-unified",
"watch": "npm-run-all --parallel --race --print-label watch:scss watch:grunt watch:test watch:esbuild",
"watch:build:all": "npm-run-all --parallel --race --print-label watch:scss watch:grunt watch:esbuild",
"watch:build:web": "npm-run-all --parallel --race --print-label watch:scss watch:grunt watch:esbuild",
"watch:build:unified": "npm-run-all --parallel --race --print-label watch:scss watch:grunt watch:webpack-unified",
"watch:scss": "typed-scss-modules \"src/**/*.scss\" --watch",
"watch:grunt": "grunt watch",
"watch:test": "jest --watch --projects src/tests/unit --coverage false --colors",
"watch:esbuild": "node esbuild.js --watch",
"watch:webpack-unified": "webpack --watch --config-name unified --color --progress"
"watch:esbuild": "node esbuild.js --watch"
},
"devDependencies": {
"7zip-bin": "^5.2.0",
@ -180,7 +157,6 @@
"dependencies": {
"@fluentui/react": "^8.96.1",
"@microsoft/applicationinsights-web": "^2.8.11",
"accessibility-insights-for-android-service-bin": "2.1.0",
"ajv": "^8.12.0",
"android-device-list": "^1.2.9",
"appium-adb": "^9.10.24",

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

@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import * as path from 'path';
import { apkVersionName } from 'accessibility-insights-for-android-service-bin';
export const AndroidServicePackageName = 'com.microsoft.accessibilityinsightsforandroidservice';
export type AndroidServiceApkInfo = {
@ -14,6 +13,7 @@ export class AndroidServiceApkLocator {
public async locateBundledApk(): Promise<AndroidServiceApkInfo> {
const appPath = await this.getAppPathAsync();
const apkVersionName = '2.1.0'; // Last supported version
return {
// This should be kept in sync with the corresponding Gruntfile copy config
path: path.join(appPath, '..', 'android-service', 'android-service.apk'),

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

@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
const path = require('path');
const { apkVersionName } = require('accessibility-insights-for-android-service-bin');
const cloneDeep = require('lodash/cloneDeep');
const serviceResponseData = require('./service-response-data');
@ -19,6 +18,7 @@ const resetOverlayPermissionCommandMatch =
'shell cmd appops reset com.microsoft.accessibilityinsightsforandroidservice';
const grantOverlayPermissionCommandMatch =
'shell pm grant com.microsoft.accessibilityinsightsforandroidservice android.permission.SYSTEM_ALERT_WINDOW';
const apkVersionName = '2.1.0'; // Last supported version
function addDeviceEnumerationCommands(id, output) {
output[`-s ${id} ${devicesCommandMatch}`] = cloneDeep(output.devices);

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

@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import * as path from 'path';
import { apkVersionName } from 'accessibility-insights-for-android-service-bin';
import { AndroidServiceApkLocator } from 'electron/platform/android/android-service-apk-locator';
describe('AndroidServiceApkLocator', () => {
@ -17,6 +16,7 @@ describe('AndroidServiceApkLocator', () => {
});
it('propagates versionName from the service-bin package', async () => {
const apkVersionName = '2.1.0'; // Last supported version
const testSubject = new AndroidServiceApkLocator(getAppPathAsync);
const result = await testSubject.locateBundledApk();

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

@ -3646,13 +3646,6 @@ __metadata:
languageName: unknown
linkType: soft
"accessibility-insights-for-android-service-bin@npm:2.1.0":
version: 2.1.0
resolution: "accessibility-insights-for-android-service-bin@npm:2.1.0"
checksum: 9478d67f92a5040cb74a4bc50b498bd82ef75470163786f9afe5679a7ed0727fb1ad1a56d65fc63e37c42dbb75d44d5782fe5de0b34d871046d33ce856a056e1
languageName: node
linkType: hard
"accessibility-insights-report-e2e-tests@workspace:packages/report-e2e-tests":
version: 0.0.0-use.local
resolution: "accessibility-insights-report-e2e-tests@workspace:packages/report-e2e-tests"
@ -3729,7 +3722,6 @@ __metadata:
"@types/webextension-polyfill": ^0.10.0
"@typescript-eslint/eslint-plugin": ^5.59.8
"@typescript-eslint/parser": ^5.59.8
accessibility-insights-for-android-service-bin: 2.1.0
ajv: ^8.12.0
android-device-list: ^1.2.9
app-builder-lib: ^23.6.0