diff --git a/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= b/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= index fe8f8fcbc9b..093c22887ec 100755 --- a/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= +++ b/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= @@ -1,9 +1,9 @@ # Input hashes for repository rule npm_translate_lock(name = "npm", pnpm_lock = "//:pnpm-lock.yaml"). # This file should be checked into version control along with the pnpm-lock.yaml file. .npmrc=2146577291 -pnpm-lock.yaml=1671875644 -yarn.lock=1326043358 -package.json=-1843989810 +pnpm-lock.yaml=-1725146382 +yarn.lock=73545660 +package.json=2077506699 client/branded/package.json=784076174 client/browser/package.json=-2024393090 client/build-config/package.json=-745736751 @@ -26,4 +26,4 @@ client/web/package.json=-1637464847 client/wildcard/package.json=362918481 client/vscode/package.json=1345248728 dev/release/package.json=1426426960 -pnpm-workspace.yaml=-1949047588 +pnpm-workspace.yaml=-69372893 diff --git a/.bazelignore b/.bazelignore index e135ef18dfc..f59cd458a77 100644 --- a/.bazelignore +++ b/.bazelignore @@ -14,6 +14,7 @@ client/http-client/node_modules client/jetbrains/node_modules client/observability-client/node_modules client/observability-server/node_modules +client/plugin-backstage/node_modules client/shared/node_modules client/storybook/node_modules client/template-parser/node_modules diff --git a/.mocharc.js b/.mocharc.js index cb7ff7f3f19..0eb106b1300 100644 --- a/.mocharc.js +++ b/.mocharc.js @@ -1,12 +1,15 @@ +const IS_BAZEL = !!(process.env.BAZEL_BINDIR || process.env.BAZEL_TEST) +const rootDir = IS_BAZEL ? process.cwd() : __dirname + module.exports = { require: [ - 'ts-node/register/transpile-only', + ...(IS_BAZEL ? [] : ['ts-node/register/transpile-only']), 'abort-controller/polyfill', - __dirname + '/client/shared/dev/fetch', - __dirname + '/client/shared/dev/suppressPollyErrors', + rootDir + '/client/shared/dev/fetch', + rootDir + '/client/shared/dev/suppressPollyErrors', ], - reporter: __dirname + '/client/shared/dev/customMochaSpecReporter.js', - extension: ['js', 'ts'], + reporter: rootDir + '/client/shared/dev/customMochaSpecReporter.js', + extension: IS_BAZEL ? ['js'] : ['js', 'ts'], // 1 minute test timeout. This must be greater than the default Puppeteer // command timeout of 30s in order to get the stack trace to point to the // Puppeteer command that failed instead of a cryptic test timeout diff --git a/BUILD.bazel b/BUILD.bazel index 7d71ec8bfa2..930064753dd 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,7 +1,8 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") -load("@npm//:defs.bzl", "npm_link_all_packages") -load("@aspect_rules_js//js:defs.bzl", "js_library") +load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin") load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@aspect_rules_js//js:defs.bzl", "js_library") +load("@npm//:defs.bzl", "npm_link_all_packages") # Gazelle config # @@ -9,7 +10,11 @@ load("@aspect_rules_ts//ts:defs.bzl", "ts_config") # gazelle:build_file_name BUILD.bazel # Disable some by default, only include configured BUILDs # -# gazelle:aspect_js disabled +# gazelle:js disabled +# gazelle:js_npm_package_target_name {dirname}_pkg + +# Enable only the Aspect javascript plugin for gazelle +# gazelle:lang js package(default_visibility = ["//visibility:public"]) @@ -25,11 +30,10 @@ js_library( ts_config( name = "tsconfig", - src = "tsconfig.bazel.json", + src = "tsconfig.base.json", visibility = ["//visibility:public"], deps = [ "//:node_modules/@sourcegraph/tsconfig", - "//:tsconfig.base.json", ], ) @@ -109,4 +113,86 @@ js_library( ], ) +copy_to_bin( + name = "browserslist", + srcs = [".browserslistrc"], + visibility = ["//visibility:public"], +) + +copy_to_bin( + name = "package_json", + srcs = ["package.json"], + visibility = ["//visibility:public"], +) + +js_library( + name = "jest_config", + testonly = True, + srcs = [ + "jest.config.base.js", + ], + data = [ + "jest.snapshot-resolver.js", + ], + visibility = ["//visibility:public"], + deps = [ + ":babel_config_jest", + "//:node_modules/@testing-library/jest-dom", + "//:node_modules/abort-controller", + "//:node_modules/babel-jest", + "//:node_modules/core-js", + "//:node_modules/identity-obj-proxy", + "//:node_modules/regenerator-runtime", + "//client/shared/dev:mock", + ], +) + +js_library( + name = "babel_config_jest", + testonly = True, + srcs = [ + "babel.config.jest.js", + ], + visibility = ["//visibility:public"], + deps = [ + "//:node_modules/@babel/preset-env", + "//:node_modules/signale", + ], +) + +js_library( + name = "babel_config", + srcs = [ + "babel.config.js", + ], + data = [ + ":package_json", + ], + visibility = ["//visibility:public"], + deps = [ + "//:node_modules/@babel/plugin-transform-typescript", + "//:node_modules/@babel/preset-env", + "//:node_modules/@babel/preset-react", + "//:node_modules/@babel/preset-typescript", + "//:node_modules/babel-plugin-lodash", + "//:node_modules/babel-plugin-webpack-chunkname", + "//:node_modules/semver", + "//:node_modules/signale", + ], +) + +js_library( + name = "mocha_config", + testonly = True, + srcs = [ + ".mocharc.js", + ], + deps = [ + "//:node_modules/abort-controller", + "//client/shared/dev:fetch-mock", + "//client/shared/dev:mocha-reporter", + "//client/shared/dev:suppress-polly-errors", + ], +) + exports_files(["go.mod"]) diff --git a/WORKSPACE b/WORKSPACE index 8e58152f1a2..d46e08bc246 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -101,6 +101,7 @@ load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock") npm_translate_lock( name = "npm", + npm_package_target_name = "{dirname}_pkg", npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", @@ -131,6 +132,46 @@ load("@jest//:npm_repositories.bzl", jest_npm_repositories = "npm_repositories") jest_npm_repositories() +# rules_esbuild setup =========================== +http_archive( + name = "aspect_rules_esbuild", + sha256 = "621c8ccb8a1400951c52357377eda4c575c6c901689bb629969881e0be8a8614", + strip_prefix = "rules_esbuild-175023fede7d2532dd35d89cb43b43cbe9e75678", + url = "https://github.com/aspect-build/rules_esbuild/archive/175023fede7d2532dd35d89cb43b43cbe9e75678.tar.gz", +) + +load("@aspect_rules_esbuild//esbuild:dependencies.bzl", "rules_esbuild_dependencies") + +rules_esbuild_dependencies() + +# Register a toolchain containing esbuild npm package and native bindings +load("@aspect_rules_esbuild//esbuild:repositories.bzl", "LATEST_VERSION", "esbuild_register_toolchains") + +esbuild_register_toolchains( + name = "esbuild", + esbuild_version = LATEST_VERSION, +) + +# rules_webpack setup =========================== +http_archive( + name = "aspect_rules_webpack", + sha256 = "4f30fb310d625a4045e37b9e04afb2366c56b547a73c935f308e3d9c31b77519", + strip_prefix = "rules_webpack-0.9.1", + url = "https://github.com/aspect-build/rules_webpack/releases/download/v0.9.1/rules_webpack-v0.9.1.tar.gz", +) + +load("@aspect_rules_webpack//webpack:dependencies.bzl", "rules_webpack_dependencies") + +rules_webpack_dependencies() + +load("@aspect_rules_webpack//webpack:repositories.bzl", "webpack_repositories") + +webpack_repositories(name = "webpack") + +load("@webpack//:npm_repositories.bzl", webpack_npm_repositories = "npm_repositories") + +webpack_npm_repositories() + # Go toolchain setup load("@rules_buf//buf:repositories.bzl", "rules_buf_dependencies", "rules_buf_toolchains") diff --git a/babel.config.jest.js b/babel.config.jest.js new file mode 100644 index 00000000000..e85d8ead46f --- /dev/null +++ b/babel.config.jest.js @@ -0,0 +1,35 @@ +// @ts-check +const path = require('path') + +// A minimal babel config only for jest transformations. +// All typescript and react transformations are done by previous +// bazel build rules, so we only need to do jest transformations here. + +const logger = require('signale') + +// TODO(bazel): drop when non-bazel removed. +if (!(process.env.BAZEL_BINDIR || process.env.BAZEL_TEST)) { + throw new Error(__filename + ' is only for use with Bazel') +} + +/** @type {import('@babel/core').ConfigFunction} */ +module.exports = api => { + api.cache.forever() + + /** + * Whether to instrument files with istanbul for code coverage. + * This is needed for e2e test coverage. + */ + const instrument = Boolean(process.env.COVERAGE_INSTRUMENT && JSON.parse(process.env.COVERAGE_INSTRUMENT)) + if (instrument) { + logger.info('Instrumenting code for coverage tracking') + } + + return { + presets: [ + // Can't put this in plugins because it needs to run as the last plugin. + ...(instrument ? [{ plugins: [['babel-plugin-istanbul', { cwd: path.resolve(__dirname) }]] }] : []), + '@babel/preset-env', + ], + } +} diff --git a/babel.config.js b/babel.config.js index 90b5733521b..6dcb9427453 100644 --- a/babel.config.js +++ b/babel.config.js @@ -26,7 +26,7 @@ module.exports = api => { '@babel/preset-env', { // Node (used for testing) doesn't support modules, so compile to CommonJS for testing. - modules: isTest ? 'commonjs' : false, + modules: process.env.BABEL_MODULE ?? (isTest ? 'commonjs' : false), bugfixes: true, useBuiltIns: 'entry', include: [ diff --git a/client/BUILD.bazel b/client/BUILD.bazel index 506a4ec7090..bbf081ce73c 100644 --- a/client/BUILD.bazel +++ b/client/BUILD.bazel @@ -1,8 +1,27 @@ # Configure gazelle for client/* -# -# gazelle:aspect_js_srcs_file_glob src/**/*.{js,ts,tsx,jsx} -# gazelle:aspect_js_tests_file_glob src/**/*.{spec,test,fixture}.{js,ts,tsx,jsx} -# gazelle:map_kind ts_project ts_project //dev:defs.bzl -# TODO: will opt-in client/* projects one at a time, remove when done -# gazelle:aspect_js disabled +# Source files: +# gazelle:js_files src/**/*.{ts,tsx} +# gazelle:js_files globals.d.ts + +# Test files, snapshots etc: +# gazelle:js_test_files **/*.{spec,test}.{ts,tsx} +# gazelle:js_test_files **/mock*.{ts,tsx} +# gazelle:js_test_files **/mocks/** +# gazelle:js_test_files **/testutils/** +# gazelle:js_test_files **/tests/** +# gazelle:js_test_files **/__mocks__/**/*.{ts,tsx} +# gazelle:js_test_files **/fixtures/**/*.{ts,tsx} + +# TODO(bazel): put fixtures + testutils + ? into own rules +# js_{fixture}_files **/*.{fixture,fixtures}.{ts,tsx} +# js_{fixture}_files **/testutils/** +# js_{fixture}_files **/fixtures.{ts,tsx} + +# Rule configuration: +# gazelle:map_kind ts_project ts_project //dev:defs.bzl +# gazelle:map_kind npm_package npm_package //dev:defs.bzl + +# Enable JS generation throughout client/* +# gazelle:js enabled +# gazelle:js_generation_mode none diff --git a/client/backstage-backend/BUILD.bazel b/client/backstage-backend/BUILD.bazel new file mode 100644 index 00000000000..5a18423252c --- /dev/null +++ b/client/backstage-backend/BUILD.bazel @@ -0,0 +1,40 @@ +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "ts_project") + +npm_link_all_packages(name = "node_modules") + +ts_project( + name = "backstage-backend", + srcs = [ + "src/client/Query.ts", + "src/client/SourcegraphClient.ts", + "src/client/index.ts", + "src/index.ts", + "src/providers/index.ts", + "src/providers/parsers.ts", + "src/providers/providers.ts", + "src/setupTests.ts", + ], + deps = [ + ":node_modules/@backstage/catalog-model", + ":node_modules/@backstage/plugin-catalog-backend", + ":node_modules/@sourcegraph/http-client", + ":node_modules/@sourcegraph/shared", + "//:node_modules/@apollo/client", + ], +) + +ts_project( + name = "backstage-backend_tests", + testonly = True, + srcs = [ + "src/client/Query.test.ts", + "src/client/SourcegraphClient.test.ts", + "src/tests/integration/e2e.test.ts", + ], + deps = [ + ":backstage-backend", + ":node_modules/@jest/globals", + "//:node_modules/@apollo/client", + ], +) diff --git a/client/backstage-backend/scripts/esbuild.ts b/client/backstage-backend/scripts/esbuild.ts index bfaedc57666..b8ae213b56c 100644 --- a/client/backstage-backend/scripts/esbuild.ts +++ b/client/backstage-backend/scripts/esbuild.ts @@ -31,6 +31,7 @@ async function build(): Promise { 'winston', ], // If we don't specify module first, esbuild bundles somethings "incorrectly" and you'll get a error with './impl/format' error + // Most likely due to https://github.com/evanw/esbuild/issues/1619#issuecomment-922787629 mainFields: ['module', 'main'], format: 'cjs', platform: 'node', diff --git a/client/backstage-frontend/BUILD.bazel b/client/backstage-frontend/BUILD.bazel new file mode 100644 index 00000000000..e414715503e --- /dev/null +++ b/client/backstage-frontend/BUILD.bazel @@ -0,0 +1,61 @@ +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "ts_project") + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/build-config:tsconfig", + ], +) + +ts_project( + name = "backstage-frontend", + srcs = [ + "src/components/ExampleComponent/ExampleComponent.tsx", + "src/components/ExampleComponent/index.ts", + "src/components/ExampleFetchComponent/ExampleFetchComponent.tsx", + "src/components/ExampleFetchComponent/index.ts", + "src/index.ts", + "src/plugin.ts", + "src/routes.ts", + "src/setupTests.ts", + ], + tsconfig = ":tsconfig", + deps = [ + ":node_modules/@backstage/core-components", + ":node_modules/@backstage/core-plugin-api", + ":node_modules/@material-ui/core", + ":node_modules/@material-ui/lab", + ":node_modules/@testing-library/jest-dom", + ":node_modules/cross-fetch", + ":node_modules/react", + ":node_modules/react-use", + "//:node_modules/@types/react", #keep + "//:node_modules/@types/testing-library__jest-dom", + ], +) + +ts_project( + name = "backstage-frontend_tests", + testonly = True, + srcs = [ + "src/components/ExampleComponent/ExampleComponent.test.tsx", + "src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx", + "src/plugin.test.ts", + ], + tsconfig = ":tsconfig", + deps = [ + ":backstage-frontend", + ":node_modules/@backstage/test-utils", + ":node_modules/@testing-library/react", + ":node_modules/msw", + ":node_modules/react", + "//:node_modules/@types/react", + ], +) diff --git a/client/branded/BUILD.bazel b/client/branded/BUILD.bazel index 61ae34cc941..7e8f8c0ad79 100644 --- a/client/branded/BUILD.bazel +++ b/client/branded/BUILD.bazel @@ -1,5 +1,32 @@ +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "jest_test", "npm_package", "sass", "ts_project") load("//client/shared/dev:tools.bzl", "module_style_typings") -load("//dev:defs.bzl", "sass") + +# TODO(bazel): storybook build +# gazelle:exclude **/*.story.{ts,tsx} + +# gazelle:js_resolve **/*.module.scss :module_style_typings + +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/client-api:tsconfig", + "//client/codeintellify:tsconfig", + "//client/common:tsconfig", + "//client/extension-api-types:tsconfig", + "//client/observability-client:tsconfig", + "//client/shared:tsconfig", + "//client/testing:tsconfig", + "//client/wildcard:tsconfig", + ], +) module_style_typings( name = "module_style_typings", @@ -11,3 +38,225 @@ sass( srcs = glob(["src/**/*.module.scss"]), deps = ["//client/wildcard:sass-breakpoints"], ) + +ts_project( + name = "branded_lib", + srcs = [ + "src/components/CodeSnippet.tsx", + "src/components/DownloadSourcegraphIcon.tsx", + "src/components/SourcegraphLogo.tsx", + "src/components/Timestamp/Timestamp.tsx", + "src/components/Timestamp/index.ts", + "src/components/Toggle.tsx", + "src/components/ToggleBig.tsx", + "src/components/constants.ts", + "src/components/panel/MixPreciseAndSearchBasedReferencesToggle.tsx", + "src/components/panel/TabbedPanelContent.fixtures.ts", + "src/components/panel/TabbedPanelContent.tsx", + "src/components/panel/views/EmptyPanelView.tsx", + "src/components/panel/views/ExtensionsLoadingView.tsx", + "src/components/panel/views/FileLocations.tsx", + "src/components/panel/views/PanelContent.tsx", + "src/components/panel/views/locations.ts", + "src/globals.d.ts", + "src/index.ts", + "src/search-ui/components/CodeExcerpt.tsx", + "src/search-ui/components/CodeHostIcon.tsx", + "src/search-ui/components/CommitSearchResult.tsx", + "src/search-ui/components/CommitSearchResultMatch.tsx", + "src/search-ui/components/CopyPathAction.tsx", + "src/search-ui/components/FileContentSearchResult.tsx", + "src/search-ui/components/FileMatchChildren.tsx", + "src/search-ui/components/FilePathSearchResult.tsx", + "src/search-ui/components/LastSyncedIcon.tsx", + "src/search-ui/components/LegacyResultContainer.tsx", + "src/search-ui/components/OwnerSearchResult.tsx", + "src/search-ui/components/QueryExamples.constants.ts", + "src/search-ui/components/QueryExamples.tsx", + "src/search-ui/components/RepoFileLink.tsx", + "src/search-ui/components/RepoSearchResult.tsx", + "src/search-ui/components/ResultContainer.tsx", + "src/search-ui/components/SearchResultStar.tsx", + "src/search-ui/components/SymbolSearchResult.tsx", + "src/search-ui/components/SyntaxHighlightedSearchQuery.tsx", + "src/search-ui/components/codeLinkNavigation.ts", + "src/search-ui/components/index.ts", + "src/search-ui/components/useQueryExamples.tsx", + "src/search-ui/documentation/ModalVideo.tsx", + "src/search-ui/experimental.ts", + "src/search-ui/index.ts", + "src/search-ui/input/CodeMirrorQueryInput.tsx", + "src/search-ui/input/LazyQueryInput.tsx", + "src/search-ui/input/QueryInput.ts", + "src/search-ui/input/SearchBox.tsx", + "src/search-ui/input/SearchButton.tsx", + "src/search-ui/input/SearchContextDropdown.tsx", + "src/search-ui/input/SearchContextMenu.tsx", + "src/search-ui/input/SearchHelpDropdownButton.tsx", + "src/search-ui/input/SearchHistoryDropdown.tsx", + "src/search-ui/input/codemirror/completion.ts", + "src/search-ui/input/codemirror/history.ts", + "src/search-ui/input/codemirror/index.ts", + "src/search-ui/input/codemirror/loading-indicator.ts", + "src/search-ui/input/codemirror/parsedQuery.ts", + "src/search-ui/input/codemirror/placeholder.ts", + "src/search-ui/input/codemirror/syntax-highlighting.ts", + "src/search-ui/input/codemirror/token-info.ts", + "src/search-ui/input/experimental/CodeMirrorQueryInputWrapper.tsx", + "src/search-ui/input/experimental/LazyCodeMirrorQueryInput.tsx", + "src/search-ui/input/experimental/Suggestions.tsx", + "src/search-ui/input/experimental/SyntaxHighlightedSearchQuery.tsx", + "src/search-ui/input/experimental/codemirror/history.ts", + "src/search-ui/input/experimental/codemirror/syntax-highlighting.ts", + "src/search-ui/input/experimental/filters.ts", + "src/search-ui/input/experimental/index.ts", + "src/search-ui/input/experimental/modes.ts", + "src/search-ui/input/experimental/optionRenderer.tsx", + "src/search-ui/input/experimental/suggestionsExtension.ts", + "src/search-ui/input/experimental/utils.ts", + "src/search-ui/input/toggles/CopyQueryButton.tsx", + "src/search-ui/input/toggles/QueryInputToggle.tsx", + "src/search-ui/input/toggles/SmartSearchToggle.tsx", + "src/search-ui/input/toggles/Toggles.tsx", + "src/search-ui/input/toggles/index.ts", + "src/search-ui/results/AnnotatedSearchExample.tsx", + "src/search-ui/results/NoResultsPage.tsx", + "src/search-ui/results/StreamingSearchResultsFooter.tsx", + "src/search-ui/results/StreamingSearchResultsList.tsx", + "src/search-ui/results/progress/StreamingProgress.tsx", + "src/search-ui/results/progress/StreamingProgressCount.tsx", + "src/search-ui/results/progress/StreamingProgressSkippedButton.tsx", + "src/search-ui/results/progress/StreamingProgressSkippedPopover.tsx", + "src/search-ui/results/progress/utils.ts", + "src/search-ui/results/sidebar/FilterLink.tsx", + "src/search-ui/results/sidebar/QuickLink.tsx", + "src/search-ui/results/sidebar/SearchFilterSection.tsx", + "src/search-ui/results/sidebar/SearchReference.tsx", + "src/search-ui/results/sidebar/SearchSidebar.tsx", + "src/search-ui/results/sidebar/SearchTypeLink.tsx", + "src/search-ui/results/sidebar/helpers.ts", + "src/search-ui/results/sidebar/revisions.ts", + "src/search-ui/results/use-items-to-show.ts", + "src/search-ui/results/useSearchResultsKeyboardNavigation.ts", + "src/search-ui/util/events.ts", + "src/search-ui/util/index.ts", + "src/search-ui/util/query.ts", + "src/search-ui/util/stars.ts", + ], + tsconfig = ":tsconfig", + # TODO(bazel): type-only #keep imports + deps = [ + ":module_style_typings", + ":node_modules/@sourcegraph/codeintellify", #keep + ":node_modules/@sourcegraph/common", + ":node_modules/@sourcegraph/extension-api-types", #keep + ":node_modules/@sourcegraph/observability-client", + ":node_modules/@sourcegraph/shared", + ":node_modules/@sourcegraph/wildcard", + "//:node_modules/@codemirror/autocomplete", + "//:node_modules/@codemirror/commands", + "//:node_modules/@codemirror/lint", + "//:node_modules/@codemirror/state", + "//:node_modules/@codemirror/view", + "//:node_modules/@mdi/js", + "//:node_modules/@reach/visually-hidden", + "//:node_modules/@types/classnames", + "//:node_modules/@types/history", #keep + "//:node_modules/@types/lodash", + "//:node_modules/@types/node", + "//:node_modules/@types/react", + "//:node_modules/@types/react-dom", + "//:node_modules/@types/sanitize-html", + "//:node_modules/@types/uuid", + "//:node_modules/classnames", + "//:node_modules/comlink", #keep + "//:node_modules/copy-to-clipboard", + "//:node_modules/date-fns", + "//:node_modules/fzf", + "//:node_modules/history", #keep + "//:node_modules/lodash", + "//:node_modules/mdi-react", + "//:node_modules/react", + "//:node_modules/react-dom", + "//:node_modules/react-router-dom", + "//:node_modules/react-sticky-box", + "//:node_modules/react-visibility-sensor", + "//:node_modules/rxjs", + "//:node_modules/sanitize-html", + "//:node_modules/ts-key-enum", + "//:node_modules/use-resize-observer", + "//:node_modules/uuid", + "//client/shared:shared_lib", #keep + ], +) + +ts_project( + name = "branded_tests", + testonly = True, + srcs = [ + "src/components/Timestamp/Timestamp.test.tsx", + "src/components/Toggle.test.tsx", + "src/components/ToggleBig.test.tsx", + "src/components/panel/TabbedPanelContent.test.tsx", + "src/components/panel/views/locations.test.ts", + "src/search-ui/components/CodeExcerpt.test.tsx", + "src/search-ui/components/FileContentSearchResult.test.tsx", + "src/search-ui/components/FileMatchChildren.test.tsx", + "src/search-ui/components/LegacyResultContainer.test.tsx", + "src/search-ui/components/RepoFileLink.test.tsx", + "src/search-ui/components/SyntaxHighlightedSearchQuery.test.tsx", + "src/search-ui/input/LazyQueryInput.test.tsx", + "src/search-ui/input/SearchContextDropdown.test.tsx", + "src/search-ui/input/SearchContextMenu.test.tsx", + "src/search-ui/input/codemirror/completion.test.ts", + "src/search-ui/input/experimental/utils.test.ts", + "src/search-ui/input/toggles/Toggles.test.tsx", + "src/search-ui/results/progress/StreamingProgressCount.test.tsx", + "src/search-ui/results/progress/StreamingProgressSkippedButton.test.tsx", + "src/search-ui/results/progress/StreamingProgressSkippedPopover.test.tsx", + "src/search-ui/results/sidebar/FilterLink.test.tsx", + "src/search-ui/results/sidebar/QuickLink.test.tsx", + "src/search-ui/results/sidebar/SearchFilterSection.test.tsx", + "src/search-ui/results/sidebar/helpers.test.ts", + "src/search-ui/results/use-items-to-show.test.ts", + ], + tsconfig = ":tsconfig", + deps = [ + ":branded_lib", + ":node_modules/@sourcegraph/shared", + ":node_modules/@sourcegraph/testing", + ":node_modules/@sourcegraph/wildcard", + "//:node_modules/@testing-library/react", + "//:node_modules/@testing-library/user-event", + "//:node_modules/@types/history", + "//:node_modules/@types/lodash", + "//:node_modules/@types/react", + "//:node_modules/@types/react-dom", + "//:node_modules/@types/sinon", + "//:node_modules/history", + "//:node_modules/lodash", + "//:node_modules/mdi-react", + "//:node_modules/react", + "//:node_modules/react-dom", + "//:node_modules/rxjs", + "//:node_modules/sinon", + ], +) + +npm_package( + name = "branded_pkg", + srcs = [ + "package.json", + ":branded_lib", + ":module_styles", #keep + ], +) + +jest_test( + name = "test", + data = [ + ":branded_tests", + ], + # TODO(bazel): enable when snapshots updated to support pre-compiled .js files + tags = ["manual"], +) diff --git a/client/browser/BUILD.bazel b/client/browser/BUILD.bazel index f72bc4bbd86..544ef6f998c 100644 --- a/client/browser/BUILD.bazel +++ b/client/browser/BUILD.bazel @@ -1,6 +1,41 @@ -load("//dev:defs.bzl", "sass") +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@aspect_rules_js//js:defs.bzl", "js_library") +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "jest_test", "sass", "ts_project") +load("//client/shared/dev:generate_graphql_operations.bzl", "generate_graphql_operations") load("//client/shared/dev:tools.bzl", "module_style_typings") +# TODO(bazel): storybook build +# gazelle:exclude **/*.story.{ts,tsx} + +# gazelle:js_resolve **/*.module.scss :module_style_typings + +# Assets included as data +# gazelle:js_ignore_imports ../../../../assets/img/sourcegraph-mark.svg + +# Bundled [s]css: +# gazelle:js_resolve **/branded.scss :src/branded.css + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/branded:tsconfig", + "//client/build-config:tsconfig", + "//client/client-api:tsconfig", + "//client/codeintellify:tsconfig", + "//client/common:tsconfig", + "//client/extension-api-types:tsconfig", + "//client/http-client:tsconfig", + "//client/shared:tsconfig", + "//client/wildcard:tsconfig", + ], +) + module_style_typings( name = "module_style_typings", deps = ["//client/wildcard:sass-breakpoints"], @@ -27,3 +62,247 @@ sass( "//client/wildcard:sass-utils", ], ) + +js_library( + name = "graphql_operations_files", + # Keep in sync with glob in client/shared/dev/generateGraphQlOperations.js + srcs = glob( + [ + "src/**/*.ts", + "src/**/*.tsx", + ], + # TODO: Ignore legacy build generated file as it conflicts with the Bazel + # build. This can be removed after the migration. + [ + "src/graphql-operations.ts", + "src/**/*.module.scss.d.ts", + ], + ), + visibility = ["//client/shared:__pkg__"], +) + +generate_graphql_operations( + name = "graphql_operations_ts", + srcs = [ + ":graphql_operations_files", + "//client/browser/src/browser-extension/scripts:graphql_operations_files", + "//client/browser/src/integration:graphql_operations_files", + ], + out = "src/graphql-operations.ts", + interface_name = "BrowserGraphQlOperations", + visibility = ["//client/shared:__pkg__"], +) + +ts_project( + name = "graphql_operations", + srcs = ["src/graphql-operations.ts"], + tsconfig = ":tsconfig", + deps = [ + ":node_modules/@sourcegraph/shared", + ], +) + +ts_project( + name = "browser", + srcs = [ + "code-intel-extensions.json", + "src/browser-extension/ThemeWrapper.tsx", + "src/browser-extension/after-install-page/AfterInstallPageContent.tsx", + "src/browser-extension/browser-action-icon.ts", + "src/browser-extension/environmentAssertion.ts", + "src/browser-extension/knownCodeHosts.ts", + "src/browser-extension/options-menu/OptionsPage.tsx", + "src/browser-extension/options-menu/OptionsPageAdvancedSettings.tsx", + "src/browser-extension/options-menu/components/OptionsPageContainer.tsx", + "src/browser-extension/util/index.ts", + "src/browser-extension/web-extension-api/ExtensionStorageSubject.ts", + "src/browser-extension/web-extension-api/fromBrowserEvent.ts", + "src/browser-extension/web-extension-api/runtime.ts", + "src/browser-extension/web-extension-api/storage.ts", + "src/browser-extension/web-extension-api/types.ts", + "src/globals.d.ts", + "src/native-integration/integration.main.ts", + "src/native-integration/phabricator/integration.main.ts", + "src/native-integration/phabricator/util.ts", + "src/shared/backend/diffs.tsx", + "src/shared/backend/extension-api-conversion.tsx", + "src/shared/backend/headers.ts", + "src/shared/backend/requestGraphQl.ts", + "src/shared/backend/search.tsx", + "src/shared/backend/server.ts", + "src/shared/backend/userEvents.tsx", + "src/shared/cli/index.ts", + "src/shared/cli/search.ts", + "src/shared/code-hosts/bitbucket-cloud/codeHost.ts", + "src/shared/code-hosts/bitbucket-cloud/context.ts", + "src/shared/code-hosts/bitbucket-cloud/domFunctions.ts", + "src/shared/code-hosts/bitbucket-cloud/fileInfo.ts", + "src/shared/code-hosts/bitbucket-cloud/scrape.ts", + "src/shared/code-hosts/bitbucket/api.ts", + "src/shared/code-hosts/bitbucket/codeHost.tsx", + "src/shared/code-hosts/bitbucket/context.tsx", + "src/shared/code-hosts/bitbucket/domFunctions.ts", + "src/shared/code-hosts/bitbucket/fileInfo.ts", + "src/shared/code-hosts/bitbucket/scrape.ts", + "src/shared/code-hosts/gerrit/codeHost.ts", + "src/shared/code-hosts/github/codeHost.tsx", + "src/shared/code-hosts/github/domFunctions.ts", + "src/shared/code-hosts/github/extensions.tsx", + "src/shared/code-hosts/github/fileInfo.ts", + "src/shared/code-hosts/github/util.tsx", + "src/shared/code-hosts/gitlab/api.ts", + "src/shared/code-hosts/gitlab/codeHost.ts", + "src/shared/code-hosts/gitlab/domFunctions.ts", + "src/shared/code-hosts/gitlab/extensions.ts", + "src/shared/code-hosts/gitlab/fileInfo.ts", + "src/shared/code-hosts/gitlab/scrape.ts", + "src/shared/code-hosts/phabricator/backend.tsx", + "src/shared/code-hosts/phabricator/codeHost.ts", + "src/shared/code-hosts/phabricator/domFunctions.ts", + "src/shared/code-hosts/phabricator/fileInfo.ts", + "src/shared/code-hosts/phabricator/index.tsx", + "src/shared/code-hosts/phabricator/scrape.ts", + "src/shared/code-hosts/phabricator/util.tsx", + "src/shared/code-hosts/shared/SignInButton.tsx", + "src/shared/code-hosts/shared/ViewOnSourcegraphButton.tsx", + "src/shared/code-hosts/shared/codeHost.tsx", + "src/shared/code-hosts/shared/codeHostTestUtils.ts", + "src/shared/code-hosts/shared/codeViews.ts", + "src/shared/code-hosts/shared/errors.ts", + "src/shared/code-hosts/shared/extensions.tsx", + "src/shared/code-hosts/shared/getNotificationClassName.ts", + "src/shared/code-hosts/shared/hoverAlerts.tsx", + "src/shared/code-hosts/shared/inject.ts", + "src/shared/code-hosts/shared/nativeTooltips.tsx", + "src/shared/code-hosts/shared/testHelpers.ts", + "src/shared/code-hosts/shared/util/fileInfo.ts", + "src/shared/code-hosts/shared/util/selections.ts", + "src/shared/code-hosts/shared/views.ts", + "src/shared/code-hosts/sourcegraph/inject.tsx", + "src/shared/components/CodeViewToolbar.tsx", + "src/shared/components/OpenDiffOnSourcegraph.tsx", + "src/shared/components/OpenOnSourcegraph.tsx", + "src/shared/components/ShortcutProvider.tsx", + "src/shared/components/SourcegraphIconButton.tsx", + "src/shared/components/TrackAnchorClick.tsx", + "src/shared/components/WildcardThemeProvider.tsx", + "src/shared/context.ts", + "src/shared/platform/context.ts", + "src/shared/platform/extensionHost.ts", + "src/shared/platform/inlineExtensionsService.ts", + "src/shared/platform/ports.ts", + "src/shared/platform/settings.ts", + "src/shared/platform/worker.ts", + "src/shared/polyfills.ts", + "src/shared/repo/backend.tsx", + "src/shared/repo/index.tsx", + "src/shared/sentry/index.ts", + "src/shared/tracking/eventLogger.tsx", + "src/shared/util/context.tsx", + "src/shared/util/dom.tsx", + "src/shared/util/featureFlags.ts", + "src/shared/util/optionFlags.ts", + "src/types/ajs/index.d.ts", + "src/types/string-score/index.d.ts", + "src/types/webextension-polyfill/index.d.ts", + ], + tsconfig = ":tsconfig", + # TODO(bazel): type-only #keep imports + deps = [ + ":graphql_operations", + ":module_style_typings", + ":node_modules/@sourcegraph/branded", + ":node_modules/@sourcegraph/client-api", + ":node_modules/@sourcegraph/codeintellify", + ":node_modules/@sourcegraph/common", + ":node_modules/@sourcegraph/extension-api-types", #keep + ":node_modules/@sourcegraph/http-client", + ":node_modules/@sourcegraph/shared", + ":node_modules/@sourcegraph/wildcard", + "//:node_modules/@mdi/js", + "//:node_modules/@reach/combobox", + "//:node_modules/@sentry/browser", + "//:node_modules/@sourcegraph/extension-api-classes", + "//:node_modules/@types/classnames", + "//:node_modules/@types/history", + "//:node_modules/@types/jest", #keep + "//:node_modules/@types/lodash", + "//:node_modules/@types/mz", + "//:node_modules/@types/node", + "//:node_modules/@types/react", + "//:node_modules/@types/react-dom", + "//:node_modules/@types/simmerjs", + "//:node_modules/@types/uuid", + "//:node_modules/classnames", + "//:node_modules/comlink", #keep + "//:node_modules/graphql", + "//:node_modules/history", + "//:node_modules/jest", #keep + "//:node_modules/jsonc-parser", + "//:node_modules/lodash", + "//:node_modules/mdi-react", + "//:node_modules/mz", + "//:node_modules/react", + "//:node_modules/react-dom", + "//:node_modules/rxjs", + "//:node_modules/simmerjs", + "//:node_modules/utility-types", #keep + "//:node_modules/uuid", + "//:node_modules/webextension-polyfill", + ], +) + +ts_project( + name = "browser_tests", + testonly = True, + srcs = [ + "src/shared/code-hosts/bitbucket-cloud/codeHost.test.ts", + "src/shared/code-hosts/bitbucket/codeHost.test.ts", + "src/shared/code-hosts/bitbucket/domFunctions.test.ts", + "src/shared/code-hosts/bitbucket/scrape.test.ts", + "src/shared/code-hosts/github/codeHost.test.ts", + "src/shared/code-hosts/github/domFunctions.test.ts", + "src/shared/code-hosts/github/fileInfo.test.ts", + "src/shared/code-hosts/github/util.test.ts", + "src/shared/code-hosts/gitlab/codeHost.test.ts", + "src/shared/code-hosts/gitlab/domFunctions.test.ts", + "src/shared/code-hosts/gitlab/scrape.test.ts", + "src/shared/code-hosts/phabricator/codeHost.test.ts", + "src/shared/code-hosts/phabricator/domFunctions.test.ts", + "src/shared/code-hosts/phabricator/fileInfo.test.ts", + "src/shared/code-hosts/shared/ViewOnSourcegraphButton.test.tsx", + "src/shared/code-hosts/shared/codeHost.test.tsx", + "src/shared/code-hosts/shared/codeViews.test.ts", + "src/shared/code-hosts/shared/views.test.ts", + "src/shared/code-hosts/sourcegraph/inject.test.tsx", + ], + tsconfig = ":tsconfig", + deps = [ + ":browser", + ":node_modules/@sourcegraph/common", + ":node_modules/@sourcegraph/http-client", + ":node_modules/@sourcegraph/shared", + ":node_modules/@sourcegraph/wildcard", #keep + "//:node_modules/@testing-library/react", + "//:node_modules/@types/lodash", + "//:node_modules/@types/mz", + "//:node_modules/@types/node", + "//:node_modules/@types/sinon", + "//:node_modules/jest-fetch-mock", + "//:node_modules/lodash", + "//:node_modules/mz", + "//:node_modules/process", + "//:node_modules/rxjs", + "//:node_modules/sinon", + "//:node_modules/util", + ], +) + +jest_test( + name = "test", + data = [ + ":browser_tests", + ], + # TODO(bazel): enable when snapshots updated to support pre-compiled .js files + tags = ["manual"], +) diff --git a/client/browser/assets/BUILD.bazel b/client/browser/assets/BUILD.bazel new file mode 100644 index 00000000000..01fa7075b3d --- /dev/null +++ b/client/browser/assets/BUILD.bazel @@ -0,0 +1,6 @@ +package(default_visibility = ["//visibility:public"]) + +filegroup( + name = "assets", + srcs = glob(["**/*.{svg,png}"]), +) diff --git a/client/browser/config/BUILD.bazel b/client/browser/config/BUILD.bazel new file mode 100644 index 00000000000..f4cc20e2fcc --- /dev/null +++ b/client/browser/config/BUILD.bazel @@ -0,0 +1,2 @@ +# gazelle:js_files **/*.{ts,tsx} +# gazelle:ignore diff --git a/client/browser/src/browser-extension/scripts/BUILD.bazel b/client/browser/src/browser-extension/scripts/BUILD.bazel new file mode 100644 index 00000000000..fd3dbda440f --- /dev/null +++ b/client/browser/src/browser-extension/scripts/BUILD.bazel @@ -0,0 +1,16 @@ +load("@aspect_rules_js//js:defs.bzl", "js_library") + +# Disable building 'scripts' directory +# gazelle:ignore + +js_library( + name = "graphql_operations_files", + # Keep in sync with glob in client/shared/dev/generateGraphQlOperations.js + srcs = glob( + [ + "**/*.ts", + "**/*.tsx", + ], + ), + visibility = ["//client/browser:__pkg__"], +) diff --git a/client/browser/src/end-to-end/BUILD.bazel b/client/browser/src/end-to-end/BUILD.bazel new file mode 100644 index 00000000000..2d42bd2d2b3 --- /dev/null +++ b/client/browser/src/end-to-end/BUILD.bazel @@ -0,0 +1,53 @@ +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("//dev:defs.bzl", "ts_project") + +# end-to-end/ does not contain a src/ +# gazelle:js_files **/*.{ts,tsx} + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/browser:tsconfig", + "//client/shared/src/testing:tsconfig", + ], +) + +ts_project( + name = "end-to-end", + srcs = ["shared.ts"], + tsconfig = ":tsconfig", + deps = [ + "//:node_modules/@types/node", + "//:node_modules/expect", + "//:node_modules/puppeteer", #keep + "//client/browser:node_modules/@sourcegraph/shared", + ], +) + +ts_project( + name = "end-to-end_tests", + testonly = True, + srcs = [ + "bitbucket.test.ts", + "ghe.test.ts", + "github.test.ts", + "gitlab.test.ts", + "phabricator.test.ts", + ], + tsconfig = ":tsconfig", + deps = [ + ":end-to-end", + "//:node_modules/@types/lodash", + "//:node_modules/@types/node", + "//:node_modules/expect", + "//:node_modules/lodash", + "//:node_modules/puppeteer", #keep + "//:node_modules/rxjs", + "//client/browser", #keep + "//client/browser:node_modules/@sourcegraph/common", + "//client/browser:node_modules/@sourcegraph/shared", + ], +) diff --git a/client/browser/src/integration/BUILD.bazel b/client/browser/src/integration/BUILD.bazel new file mode 100644 index 00000000000..83b7958c4f1 --- /dev/null +++ b/client/browser/src/integration/BUILD.bazel @@ -0,0 +1,14 @@ +load("@aspect_rules_js//js:defs.bzl", "js_library") + +# TODO(bazel): disabled for now +# gazelle:js disabled + +# integration/ does not contain a src/ +# # gazelle:js_files **/*.{ts,tsx} + +js_library( + name = "graphql_operations_files", + # Keep in sync with glob in client/shared/dev/generateGraphQlOperations.js + srcs = glob(["**/*.{ts,tsx}"]), + visibility = ["//client/browser:__pkg__"], +) diff --git a/client/build-config/BUILD.bazel b/client/build-config/BUILD.bazel new file mode 100644 index 00000000000..15cef6b2339 --- /dev/null +++ b/client/build-config/BUILD.bazel @@ -0,0 +1,51 @@ +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "npm_package", "ts_project") + +# TODO(bazel): currently handled with #keep +# gazelle:js_resolve **/esbuild/* //client/build-config/src/esbuild + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + ], +) + +ts_project( + name = "build-config_lib", + srcs = [ + "src/index.ts", + "src/paths.ts", + "src/utils/environment-config.ts", + "src/webpack/babel-loader.ts", + "src/webpack/css-loader.ts", + "src/webpack/getCacheConfig.ts", + "src/webpack/monaco-editor.ts", + "src/webpack/plugins.ts", + ], + module = "commonjs", + tsconfig = ":tsconfig", + deps = [ + ":node_modules/@statoscope/webpack-plugin", + ":node_modules/monaco-editor-webpack-plugin", + ":node_modules/terser-webpack-plugin", + ":node_modules/webpack", + "//:node_modules/@types/node", + "//:node_modules/monaco-editor", #keep + "//client/build-config/src/esbuild", + ], +) + +npm_package( + name = "build-config_pkg", + srcs = [ + "package.json", + ":build-config_lib", + ], + type = "commonjs", +) diff --git a/client/build-config/src/esbuild/BUILD.bazel b/client/build-config/src/esbuild/BUILD.bazel new file mode 100644 index 00000000000..e56b75e55f4 --- /dev/null +++ b/client/build-config/src/esbuild/BUILD.bazel @@ -0,0 +1,24 @@ +# TODO(bazel): esbuild build disabled, mocked for now + +load("@aspect_rules_js//js:defs.bzl", "js_library") + +genrule( + name = "esbuild-mocked", + outs = ["plugins.js"], + cmd = "echo 'exports.stylePlugin = {}' > $@", +) + +genrule( + name = "esbuild-mocked-types", + outs = ["plugins.d.ts"], + cmd = "echo 'export const stylePlugin: any' > $@", +) + +js_library( + name = "esbuild", + srcs = [ + ":esbuild-mocked", + ":esbuild-mocked-types", + ], + visibility = ["//client/build-config:__pkg__"], +) diff --git a/client/build-config/src/paths.ts b/client/build-config/src/paths.ts index 5a200eabbbf..deeb0d4d012 100644 --- a/client/build-config/src/paths.ts +++ b/client/build-config/src/paths.ts @@ -2,6 +2,9 @@ import fs from 'fs' import path from 'path' +// TODO(bazel): drop when non-bazel removed. +const IS_BAZEL = !!(process.env.BAZEL_BINDIR || process.env.BAZEL_TEST) + // NOTE: use fs.realpathSync() in addition to path.resolve() to resolve // symlinks to the real path. This is required for webpack plugins using // `include: [...file path...]` when the file path contains symlinks such @@ -16,7 +19,7 @@ export function resolveWithSymlink(...args: string[]): string { } } -export const ROOT_PATH = resolveWithSymlink(__dirname, '../../../') +export const ROOT_PATH = IS_BAZEL ? process.cwd() : resolveWithSymlink(__dirname, '../../../') export const WORKSPACES_PATH = resolveWithSymlink(ROOT_PATH, 'client') export const NODE_MODULES_PATH = resolveWithSymlink(ROOT_PATH, 'node_modules') export const MONACO_EDITOR_PATH = resolveWithSymlink(NODE_MODULES_PATH, 'monaco-editor') diff --git a/client/build-config/src/webpack/css-loader.ts b/client/build-config/src/webpack/css-loader.ts index ccd7af4d657..ae86657dcc5 100644 --- a/client/build-config/src/webpack/css-loader.ts +++ b/client/build-config/src/webpack/css-loader.ts @@ -46,3 +46,5 @@ export const getCSSLoaders = (...loaders: webpack.RuleSetUseItem[]): webpack.Rul }, }, ] + +export const getBazelCSSLoaders = (...loaders: webpack.RuleSetUseItem[]): webpack.RuleSetUse => loaders diff --git a/client/build-config/src/webpack/getCacheConfig.ts b/client/build-config/src/webpack/getCacheConfig.ts index 90522de08c2..331794c9f6d 100644 --- a/client/build-config/src/webpack/getCacheConfig.ts +++ b/client/build-config/src/webpack/getCacheConfig.ts @@ -4,18 +4,23 @@ import webpack from 'webpack' import { ROOT_PATH } from '../paths' +// TODO(bazel): drop when non-bazel removed. +const IS_BAZEL = !!process.env.BAZEL_BINDIR + interface CacheConfigOptions { - invalidateCacheFiles: string[] + invalidateCacheFiles?: string[] } -export const getCacheConfig = ({ invalidateCacheFiles }: CacheConfigOptions): webpack.Configuration['cache'] => ({ +export const getCacheConfig = ({ invalidateCacheFiles = [] }: CacheConfigOptions): webpack.Configuration['cache'] => ({ type: 'filesystem', buildDependencies: { // Invalidate cache on config change. - config: [ - ...invalidateCacheFiles, - path.resolve(ROOT_PATH, 'babel.config.js'), - path.resolve(ROOT_PATH, 'postcss.config.js'), - ], + config: IS_BAZEL + ? invalidateCacheFiles + : [ + ...invalidateCacheFiles, + path.resolve(ROOT_PATH, 'babel.config.js'), + path.resolve(ROOT_PATH, 'postcss.config.js'), + ], }, }) diff --git a/client/client-api/BUILD.bazel b/client/client-api/BUILD.bazel new file mode 100644 index 00000000000..24874d5b33d --- /dev/null +++ b/client/client-api/BUILD.bazel @@ -0,0 +1,55 @@ +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "npm_package", "ts_project") +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/extension-api:tsconfig", + "//client/extension-api-types:tsconfig", + "//client/template-parser:tsconfig", + ], +) + +ts_project( + name = "client-api_lib", + srcs = [ + "src/contribution.ts", + "src/hover.ts", + "src/index.ts", + "src/reference.ts", + "src/textDocument.ts", + ], + tsconfig = ":tsconfig", + # TODO(bazel): "#keep"s required for type-only imports + deps = [ + ":node_modules/@sourcegraph/extension-api-types", #keep + ":node_modules/@sourcegraph/template-parser", #keep + "//:node_modules/@sourcegraph/extension-api-classes", + "//:node_modules/utility-types", #keep + ], +) + +ts_project( + name = "client-api_tests", + testonly = True, + srcs = ["src/hover.test.ts"], + tsconfig = ":tsconfig", + deps = [ + ":client-api_lib", + "//:node_modules/@sourcegraph/extension-api-classes", + ], +) + +npm_package( + name = "client-api_pkg", + srcs = [ + "package.json", + ":client-api_lib", + ], +) diff --git a/client/codeintellify/BUILD.bazel b/client/codeintellify/BUILD.bazel new file mode 100644 index 00000000000..9cab04b2461 --- /dev/null +++ b/client/codeintellify/BUILD.bazel @@ -0,0 +1,91 @@ +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "jest_test", "npm_package", "ts_project") + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/common:tsconfig", + "//client/extension-api-types:tsconfig", + ], +) + +ts_project( + name = "codeintellify_lib", + srcs = [ + "src/helpers.ts", + "src/hoverifier.ts", + "src/index.ts", + "src/loading.ts", + "src/overlayPosition.ts", + "src/positions.ts", + "src/state.ts", + "src/tokenPosition.ts", + "src/types.ts", + "src/typings/html.d.ts", + ], + tsconfig = ":tsconfig", + # TODO(bazel): "#keep"s required for type-only imports + deps = [ + ":node_modules/@sourcegraph/common", + ":node_modules/@sourcegraph/extension-api-types", #keep + "//:node_modules/@types/lodash", + "//:node_modules/lodash", + "//:node_modules/rxjs", + "//:node_modules/ts-key-enum", + ], +) + +ts_project( + name = "codeintellify_tests", + testonly = True, + srcs = [ + "src/hoverifier.test.ts", + "src/loading.test.ts", + "src/overlayPosition.test.ts", + "src/positions.test.ts", + "src/testutils/dom.test.ts", + "src/testutils/dom.ts", + "src/testutils/fixtures.ts", + "src/testutils/generate.ts", + "src/testutils/github/generate.ts", + "src/testutils/mouse.ts", + "src/testutils/revision.ts", + "src/testutils/sourcegraph/generate.ts", + "src/tokenPosition.test.ts", + ], + data = [ + "src/testutils/github/styles.css", + "src/testutils/mux.go.txt", + "src/testutils/sourcegraph/styles.css", + ], + tsconfig = ":tsconfig", + deps = [ + ":codeintellify_lib", + ":node_modules/@sourcegraph/common", + "//:node_modules/@types/lodash", + "//:node_modules/@types/node", + "//:node_modules/lodash", + "//:node_modules/rxjs", + ], +) + +npm_package( + name = "codeintellify_pkg", + srcs = [ + "package.json", + ":codeintellify_lib", + ], +) + +jest_test( + name = "test", + data = [ + ":codeintellify_tests", + ], +) diff --git a/client/common/BUILD.bazel b/client/common/BUILD.bazel index f75940273e3..a06967871de 100644 --- a/client/common/BUILD.bazel +++ b/client/common/BUILD.bazel @@ -1,10 +1,21 @@ +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") load("@npm//:defs.bzl", "npm_link_all_packages") -load("//dev:defs.bzl", "ts_project") +load("//dev:defs.bzl", "jest_test", "npm_package", "ts_project") -# gazelle:aspect_js enabled +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/extension-api-types:tsconfig", + ], +) ts_project( - name = "common", + name = "common_lib", srcs = [ "src/errors/constants.ts", "src/errors/errors.ts", @@ -38,6 +49,8 @@ ts_project( "src/util/types.ts", "src/util/url.ts", ], + tsconfig = ":tsconfig", + # TODO(bazel): "#keep"s required for type-only imports deps = [ ":node_modules/@sourcegraph/extension-api-types", #keep "//:node_modules/@types/highlight.js", @@ -52,7 +65,7 @@ ts_project( "//:node_modules/jsonc-parser", "//:node_modules/lodash", "//:node_modules/marked", - "//:node_modules/react-router-dom-v5-compat", #keep + "//:node_modules/react-router-dom", #keep "//:node_modules/rxjs", "//:node_modules/sanitize-html", "//:node_modules/utility-types", #keep @@ -61,6 +74,7 @@ ts_project( ts_project( name = "common_tests", + testonly = True, srcs = [ "src/errors/errors.test.ts", "src/util/fetchCache.test.ts", @@ -74,9 +88,9 @@ ts_project( "src/util/string.test.ts", "src/util/url.test.ts", ], + tsconfig = ":tsconfig", deps = [ - ":common", - "//:node_modules/@types/jest", #keep + ":common_lib", "//:node_modules/@types/mockdate", "//:node_modules/@types/node", "//:node_modules/jest-fetch-mock", @@ -85,4 +99,17 @@ ts_project( ], ) -npm_link_all_packages(name = "node_modules") +npm_package( + name = "common_pkg", + srcs = [ + "package.json", + ":common_lib", + ], +) + +jest_test( + name = "test", + data = [ + ":common_tests", + ], +) diff --git a/client/eslint-plugin-wildcard/BUILD.bazel b/client/eslint-plugin-wildcard/BUILD.bazel new file mode 100644 index 00000000000..39bac756d42 --- /dev/null +++ b/client/eslint-plugin-wildcard/BUILD.bazel @@ -0,0 +1,11 @@ +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "npm_package") + +# gazelle:js_files **/*.ts + +npm_link_all_packages(name = "node_modules") + +npm_package( + name = "eslint-plugin-wildcard_pkg", + srcs = ["package.json"], +) diff --git a/client/extension-api-types/BUILD.bazel b/client/extension-api-types/BUILD.bazel index b1f82e182da..afc6de76f04 100644 --- a/client/extension-api-types/BUILD.bazel +++ b/client/extension-api-types/BUILD.bazel @@ -1,8 +1,31 @@ -load("@aspect_rules_js//npm:defs.bzl", "npm_package") +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "npm_package") package(default_visibility = ["//visibility:public"]) -npm_package( - name = "extension-api-types", - srcs = ["package.json"] + glob(["src/**/*.d.ts"]), +# .dts-only library done manually +# gazelle:js disabled + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/extension-api:tsconfig", + ], +) + +npm_link_all_packages(name = "node_modules") + +npm_package( + name = "extension-api-types_pkg", + srcs = [ + "package.json", + "src/hover.d.ts", + "src/index.d.ts", + "src/location.d.ts", + "src/workspace.d.ts", + ], ) diff --git a/client/extension-api/BUILD.bazel b/client/extension-api/BUILD.bazel index d807a1eead5..dd17b9960b4 100644 --- a/client/extension-api/BUILD.bazel +++ b/client/extension-api/BUILD.bazel @@ -1,11 +1,29 @@ -load("@aspect_rules_js//npm:defs.bzl", "npm_package") +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "npm_package") package(default_visibility = ["//visibility:public"]) -npm_package( - name = "extension-api", - srcs = ["package.json"] + glob([ - "src/**/*.js", - "src/**/*.d.ts", - ]), +# Disable gazelle for the js/dts-only package +# gazelle:js disabled +# gazelle:js_files **/*.{ts,tsx} + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + ], +) + +npm_link_all_packages(name = "node_modules") + +npm_package( + name = "extension-api_pkg", + srcs = [ + "package.json", + "src/index.js", + "src/sourcegraph.d.ts", + ], ) diff --git a/client/http-client/BUILD.bazel b/client/http-client/BUILD.bazel new file mode 100644 index 00000000000..18a092ef895 --- /dev/null +++ b/client/http-client/BUILD.bazel @@ -0,0 +1,81 @@ +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "jest_test", "npm_package", "ts_project") + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/common:tsconfig", + ], +) + +ts_project( + name = "http-client_lib", + srcs = [ + "src/graphql/apollo/client.ts", + "src/graphql/apollo/fromObservableQuery.ts", + "src/graphql/apollo/hooks.ts", + "src/graphql/apollo/index.ts", + "src/graphql/constants.ts", + "src/graphql/graphql.ts", + "src/graphql/links/concurrent-requests-link.ts", + "src/graphql/links/index.ts", + "src/graphql/types.ts", + "src/http-status-error.ts", + "src/index.ts", + ], + tsconfig = ":tsconfig", + # TODO(bazel): "#keep"s required for type-only imports + deps = [ + ":node_modules/@sourcegraph/common", + "//:node_modules/@apollo/client", + "//:node_modules/@types/lodash", + "//:node_modules/@types/node-fetch", #keep + "//:node_modules/@types/react", + "//:node_modules/apollo3-cache-persist", + "//:node_modules/graphql", + "//:node_modules/lodash", + "//:node_modules/node-fetch", #keep + "//:node_modules/react", + "//:node_modules/rxjs", + "//:node_modules/utility-types", #keep + ], +) + +ts_project( + name = "http-client_tests", + testonly = True, + srcs = [ + "src/graphql/apollo/fromObservableQuery.test.ts", + "src/graphql/graphql.test.ts", + ], + tsconfig = ":tsconfig", + deps = [ + ":http-client_lib", + "//:node_modules/@apollo/client", + "//:node_modules/@types/sinon", + "//:node_modules/delay", + "//:node_modules/rxjs", + "//:node_modules/sinon", + ], +) + +npm_package( + name = "http-client_pkg", + srcs = [ + "package.json", + ":http-client_lib", + ], +) + +jest_test( + name = "test", + data = [ + ":http-client_tests", + ], +) diff --git a/client/jetbrains/BUILD.bazel b/client/jetbrains/BUILD.bazel index a1e6355c8e4..c5bfe67ebe9 100644 --- a/client/jetbrains/BUILD.bazel +++ b/client/jetbrains/BUILD.bazel @@ -1,27 +1,29 @@ -load("//client/shared/dev:generate_graphql_operations.bzl", "generate_graphql_operations") load("@aspect_rules_js//js:defs.bzl", "js_library") +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@npm//:defs.bzl", "npm_link_all_packages") + +# dts-only done manually +# gazelle:js disabled + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/branded:tsconfig", + "//client/build-config:tsconfig", + "//client/common:tsconfig", + "//client/http-client:tsconfig", + "//client/shared:tsconfig", + "//client/storybook:tsconfig", + "//client/wildcard:tsconfig", + ], +) js_library( - name = "graphql_operations_files", - # Keep in sync with glob in client/shared/dev/generateGraphQlOperations.js - srcs = glob( - [ - "webview/src/**/*.ts", - "webview/src/**/*.tsx", - ], - # TODO: Ignore legacy build generated file as it conflicts with the Bazel - # build. This can be removed after the migration. - [ - "webview/src/graphql-operations.ts", - ], - ), -) - -generate_graphql_operations( - name = "graphql_operations", - srcs = [ - "//client/jetbrains/webview:graphql_operations_files", - ], - out = "src/graphql-operations.ts", - interface_name = "JetBrainsGraphQlOperations", + name = "jetbrains", + srcs = ["globals.d.ts"], ) diff --git a/client/jetbrains/.bazelignore b/client/jetbrains/webview/.bazelignore similarity index 62% rename from client/jetbrains/.bazelignore rename to client/jetbrains/webview/.bazelignore index 4616e9c21b8..52c902c991f 100644 --- a/client/jetbrains/.bazelignore +++ b/client/jetbrains/webview/.bazelignore @@ -1,2 +1,2 @@ # TODO(bazel): remove when no longer generated into src -webview/src/graphql-operations.ts +src/graphql-operations.ts diff --git a/client/jetbrains/webview/BUILD.bazel b/client/jetbrains/webview/BUILD.bazel index 1f819d0f221..57393531a7c 100644 --- a/client/jetbrains/webview/BUILD.bazel +++ b/client/jetbrains/webview/BUILD.bazel @@ -1,6 +1,15 @@ +load("//dev:defs.bzl", "sass", "ts_project") load("//client/shared/dev:tools.bzl", "module_style_typings") +load("//client/shared/dev:generate_graphql_operations.bzl", "generate_graphql_operations") load("@aspect_rules_js//js:defs.bzl", "js_library") -load("//dev:defs.bzl", "sass") + +# TODO(bazel): storybook build +# gazelle:exclude **/*.story.{ts,tsx} + +# gazelle:js_resolve **/*.module.scss :module_style_typings + +# Bundled [s]css: +# gazelle:js_resolve **/index.scss :src/index.css module_style_typings( name = "module_style_typings", @@ -36,6 +45,93 @@ js_library( "src/**/*.ts", "src/**/*.tsx", ], + # TODO: Ignore legacy build generated file as it conflicts with the Bazel + # build. This can be removed after the migration. + [ + "src/graphql-operations.ts", + "src/**/*.module.scss.d.ts", + ], ), - visibility = ["//client/jetbrains:__pkg__"], + visibility = ["//client/shared:__pkg__"], +) + +generate_graphql_operations( + name = "graphql_operations_ts", + srcs = [ + ":graphql_operations_files", + ], + out = "src/graphql-operations.ts", + interface_name = "JetBrainsGraphQlOperations", + visibility = ["//client/shared:__pkg__"], +) + +ts_project( + name = "graphql_operations", + srcs = ["src/graphql-operations.ts"], + tsconfig = "//client/jetbrains:tsconfig", + deps = [ + "//client/jetbrains:node_modules/@sourcegraph/shared", + ], +) + +ts_project( + name = "webview", + srcs = [ + "src/bridge-mock/call-java-mock.ts", + "src/bridge-mock/index.ts", + "src/bridge-mock/renderColorDebugger.tsx", + "src/bridge-mock/theme-snapshots/dark.ts", + "src/bridge-mock/theme-snapshots/light.ts", + "src/search/App.tsx", + "src/search/GlobalKeyboardListeners.ts", + "src/search/StatusBar.tsx", + "src/search/index.tsx", + "src/search/input/JetBrainsSearchBox.tsx", + "src/search/input/JetBrainsToggles.tsx", + "src/search/java-to-js-bridge.ts", + "src/search/jetbrains-icons/Search.tsx", + "src/search/js-to-java-bridge.ts", + "src/search/lib/ExpirationCache.ts", + "src/search/lib/blob.ts", + "src/search/lib/requestGraphQl.ts", + "src/search/results/CommitSearchResult.tsx", + "src/search/results/FileSearchResult.tsx", + "src/search/results/InfoDivider.tsx", + "src/search/results/PathSearchResult.tsx", + "src/search/results/RepoName.tsx", + "src/search/results/RepoSearchResult.tsx", + "src/search/results/SearchResultHeader.tsx", + "src/search/results/SearchResultLayout.tsx", + "src/search/results/SearchResultList.tsx", + "src/search/results/SelectableSearchResult.tsx", + "src/search/results/TrimmedCodeLineWithHighlights.tsx", + "src/search/results/utils.ts", + "src/search/types.d.ts", + "src/sourcegraph-api-access/api-gateway.ts", + "src/sourcegraphSettings.ts", + "src/telemetry/EventLogger.ts", + ], + data = [ + ":package_styles", + ], + tsconfig = "//client/jetbrains:tsconfig", + deps = [ + ":graphql_operations", + ":module_style_typings", + "//:node_modules/@mdi/js", + "//:node_modules/@types/classnames", + "//:node_modules/@types/react", + "//:node_modules/@types/react-dom", + "//:node_modules/classnames", + "//:node_modules/js-base64", + "//:node_modules/mdi-react", + "//:node_modules/react", + "//:node_modules/react-dom", + "//:node_modules/rxjs", + "//client/jetbrains:node_modules/@sourcegraph/branded", + "//client/jetbrains:node_modules/@sourcegraph/common", + "//client/jetbrains:node_modules/@sourcegraph/http-client", + "//client/jetbrains:node_modules/@sourcegraph/shared", + "//client/jetbrains:node_modules/@sourcegraph/wildcard", + ], ) diff --git a/client/observability-client/BUILD.bazel b/client/observability-client/BUILD.bazel new file mode 100644 index 00000000000..a53c2e845fd --- /dev/null +++ b/client/observability-client/BUILD.bazel @@ -0,0 +1,93 @@ +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "jest_test", "npm_package", "ts_project") + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/common:tsconfig", + ], +) + +ts_project( + name = "observability-client_lib", + srcs = [ + "src/constants.ts", + "src/exporters/consoleBatchSpanExporter.ts", + "src/index.ts", + "src/instrumentations/constants.ts", + "src/instrumentations/fetch.ts", + "src/instrumentations/history.ts", + "src/instrumentations/window-load.ts", + "src/processors/clientAttributesSpanProcessor.ts", + "src/processors/sharedSpanStoreProcessor.ts", + "src/react/TraceSpanProvider/TraceSpanProvider.tsx", + "src/react/TraceSpanProvider/index.ts", + "src/react/TraceSpanProvider/useNewTraceContextProviderValue.ts", + "src/react/constants.ts", + "src/react/index.ts", + "src/react/useCurrentSpan.ts", + "src/sdk/createActiveSpan.ts", + "src/sdk/createFinishedSpan.ts", + "src/sdk/getTracingUrl.ts", + "src/sdk/index.ts", + "src/sdk/instrumentationBaseWeb.ts", + "src/sdk/performance.ts", + "src/sdk/sharedSpanStore.ts", + "src/sdk/span.ts", + "src/sdk/trace.ts", + "src/sdk/tracer.ts", + "src/types/@opentelemetry/api/index.d.ts", + "src/types/@opentelemetry/core/index.d.ts", + "src/types/@opentelemetry/exporter-trace-otlp-http/index.d.ts", + "src/types/@opentelemetry/instrumentation/index.d.ts", + "src/types/@opentelemetry/resources/index.d.ts", + "src/types/@opentelemetry/sdk-trace-base/index.d.ts", + "src/types/@opentelemetry/semantic-conventions/index.d.ts", + ], + tsconfig = ":tsconfig", + deps = [ + ":node_modules/@sourcegraph/common", + "//:node_modules/@opentelemetry/api", + "//:node_modules/@opentelemetry/core", + "//:node_modules/@opentelemetry/exporter-trace-otlp-http", + "//:node_modules/@opentelemetry/instrumentation", + "//:node_modules/@opentelemetry/resources", + "//:node_modules/@opentelemetry/sdk-trace-base", + "//:node_modules/@opentelemetry/sdk-trace-web", + "//:node_modules/@opentelemetry/semantic-conventions", + "//:node_modules/@types/lodash", + "//:node_modules/@types/react", + "//:node_modules/is-absolute-url", + "//:node_modules/lodash", + "//:node_modules/react", + ], +) + +npm_package( + name = "observability-client_pkg", + srcs = [ + "package.json", + ":observability-client_lib", + ], +) + +ts_project( + name = "observability-client_tests", + testonly = True, + srcs = ["src/sdk/__tests__/getTracingUrl.test.ts"], + tsconfig = ":tsconfig", + deps = [":observability-client_lib"], +) + +jest_test( + name = "test", + data = [ + ":observability-client_tests", + ], +) diff --git a/client/observability-server/BUILD.bazel b/client/observability-server/BUILD.bazel new file mode 100644 index 00000000000..db09847a908 --- /dev/null +++ b/client/observability-server/BUILD.bazel @@ -0,0 +1,63 @@ +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "jest_test", "ts_project") + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/build-config:tsconfig", + ], +) + +ts_project( + name = "observability-server", + srcs = [ + "src/constants.ts", + "src/honeycomb/clone-boards.ts", + "src/libhoney.d.ts", + "src/sdk.ts", + "src/webBundleSize/getBundleSizeStats.ts", + "src/webBundleSize/index.ts", + ], + tsconfig = ":tsconfig", + deps = [ + ":node_modules/@sourcegraph/build-config", + "//:node_modules/@opentelemetry/semantic-conventions", + "//:node_modules/@types/glob", + "//:node_modules/@types/lodash", + "//:node_modules/@types/node", + "//:node_modules/@types/node-fetch", + "//:node_modules/@types/signale", + "//:node_modules/envalid", + "//:node_modules/glob", + "//:node_modules/libhoney", + "//:node_modules/lodash", + "//:node_modules/node-fetch", + "//:node_modules/signale", + ], +) + +ts_project( + name = "observability-server_tests", + testonly = True, + srcs = ["src/webBundleSize/getBundleSizeStats.test.ts"], + tsconfig = ":tsconfig", + deps = [ + ":observability-server", + "//:node_modules/@types/node", + ], +) + +jest_test( + name = "test", + data = [ + ":observability-server_tests", + ], + # TODO(bazel): requires webpack setup for testing + tags = ["manual"], +) diff --git a/client/shared/BUILD.bazel b/client/shared/BUILD.bazel index 62271f8fe38..690bea18971 100644 --- a/client/shared/BUILD.bazel +++ b/client/shared/BUILD.bazel @@ -1,8 +1,42 @@ load("@aspect_rules_js//js:defs.bzl", "js_library") +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "jest_test", "npm_package", "sass", "ts_project") load("//client/shared/dev:generate_schema.bzl", "generate_schema") load("//client/shared/dev:generate_graphql_operations.bzl", "generate_graphql_operations") load("//client/shared/dev:tools.bzl", "module_style_typings") -load("//dev:defs.bzl", "sass") + +# TODO(bazel): @sourcegraph/shared is currently used by jest setup scripts and must be compiled to commonjs. +# This should be changed to esm once jest setup scripts are moved to a separate package that can be +# compiled to commonjs specifically and only for jest. + +# TODO(bazel): storybook build +# gazelle:exclude **/*.story.{ts,tsx} + +# gazelle:js_resolve **/*.module.scss :module_style_typings +# gazelle:js_resolve ../graphql-operations //client/shared:graphql_operations +# gazelle:js_ignore_imports **/*.worker.ts + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/build-config:tsconfig", + "//client/client-api:tsconfig", + "//client/codeintellify:tsconfig", + "//client/common:tsconfig", + "//client/extension-api:tsconfig", + "//client/extension-api-types:tsconfig", + "//client/http-client:tsconfig", + "//client/template-parser:tsconfig", + "//client/testing:tsconfig", + "//client/wildcard:tsconfig", + ], +) module_style_typings( name = "module_style_typings", @@ -14,12 +48,24 @@ sass( ) generate_graphql_operations( - name = "graphql_operations", + name = "graphql_operations_ts", srcs = [ ":graphql_operations_files", + "//client/shared/src/api/integration-test:graphql_operations_files", + "//client/shared/src/testing:graphql_operations_files", ], out = "src/graphql-operations.ts", interface_name = "SharedGraphQlOperations", + visibility = ["//client/shared:__pkg__"], +) + +ts_project( + name = "graphql_operations", + srcs = ["src/graphql-operations.ts"], + tsconfig = ":tsconfig", + deps = [ + "//:node_modules/@apollo/client", + ], ) js_library( @@ -34,18 +80,466 @@ js_library( "src/testing/**/*.*", # TODO: Ignore legacy build generated file as it conflicts with the Bazel # build. This can be removed after the migration. + "src/schema.ts", "src/graphql-operations.ts", + "src/**/*.module.scss.d.ts", ], ), visibility = ["//client/shared:__pkg__"], ) -[generate_schema( - name = name, - out = "src/schema/%s.schema.d.ts" % name, -) for name in [ - "json-schema-draft-07", - "site", - "settings", - "batch_spec", -]] +generate_schema( + name = "json-schema-draft-07", + out = "src/schema/json-schema-draft-07.schema.d.ts", +) + +generate_schema( + name = "site", + out = "src/schema/site.schema.d.ts", +) + +generate_schema( + name = "settings", + out = "src/schema/settings.schema.d.ts", +) + +generate_schema( + name = "batch_spec", + out = "src/schema/batch_spec.schema.d.ts", +) + +ts_project( + name = "shared_lib", + srcs = [ + "src/actions/ActionItem.tsx", + "src/actions/ActionsContainer.tsx", + "src/actions/ActionsNavItems.tsx", + "src/actions/SimpleActionItem.tsx", + "src/actions/actions.ts", + "src/api/client/api/api.ts", + "src/api/client/api/common.ts", + "src/api/client/connection.ts", + "src/api/client/mainthread-api.ts", + "src/api/client/search.ts", + "src/api/client/services/settings.ts", + "src/api/client/types/textDocument.ts", + "src/api/contract.ts", + "src/api/extension/activation.ts", + "src/api/extension/api/api.ts", + "src/api/extension/api/callViewProvidersInParallel.ts", + "src/api/extension/api/codeEditor.ts", + "src/api/extension/api/common.ts", + "src/api/extension/api/context/context.ts", + "src/api/extension/api/contribution.ts", + "src/api/extension/api/directoryViewer.ts", + "src/api/extension/api/documentHighlights.ts", + "src/api/extension/api/getInsightsViews.ts", + "src/api/extension/api/logging.ts", + "src/api/extension/api/textDocument.ts", + "src/api/extension/api/types.ts", + "src/api/extension/api/utils/prefixSumComputer.ts", + "src/api/extension/api/utils/wordHelpers.ts", + "src/api/extension/api/workspaceRoot.ts", + "src/api/extension/extensionApi.ts", + "src/api/extension/extensionHost.ts", + "src/api/extension/extensionHostApi.ts", + "src/api/extension/extensionHostState.ts", + "src/api/extension/main.worker.ts", + "src/api/extension/test/test-helpers.ts", + "src/api/extension/util.ts", + "src/api/extension/utils/ReferenceCounter.ts", + "src/api/extension/worker.ts", + "src/api/features.ts", + "src/api/sharedEventLogger.ts", + "src/api/textDocumentTypes.ts", + "src/api/util.ts", + "src/api/viewerTypes.ts", + "src/auth.ts", + "src/backend/apolloCache.ts", + "src/backend/errors.ts", + "src/backend/file.ts", + "src/backend/repo.ts", + "src/backend/settings.ts", + "src/codeintel/api.ts", + "src/codeintel/legacy-extensions/api.ts", + "src/codeintel/legacy-extensions/indicators.ts", + "src/codeintel/legacy-extensions/language-specs/comments.ts", + "src/codeintel/legacy-extensions/language-specs/cpp.ts", + "src/codeintel/legacy-extensions/language-specs/go.ts", + "src/codeintel/legacy-extensions/language-specs/identifiers.ts", + "src/codeintel/legacy-extensions/language-specs/java.ts", + "src/codeintel/legacy-extensions/language-specs/language-spec.ts", + "src/codeintel/legacy-extensions/language-specs/languages.ts", + "src/codeintel/legacy-extensions/language-specs/python.ts", + "src/codeintel/legacy-extensions/language-specs/typescript.ts", + "src/codeintel/legacy-extensions/language-specs/util.ts", + "src/codeintel/legacy-extensions/logging.ts", + "src/codeintel/legacy-extensions/lsif/api.ts", + "src/codeintel/legacy-extensions/lsif/definition-hover.ts", + "src/codeintel/legacy-extensions/lsif/highlights.ts", + "src/codeintel/legacy-extensions/lsif/implementations.ts", + "src/codeintel/legacy-extensions/lsif/locations.ts", + "src/codeintel/legacy-extensions/lsif/providers.ts", + "src/codeintel/legacy-extensions/lsif/ranges.ts", + "src/codeintel/legacy-extensions/lsif/references.ts", + "src/codeintel/legacy-extensions/lsif/stencil.ts", + "src/codeintel/legacy-extensions/providers.ts", + "src/codeintel/legacy-extensions/search/config.ts", + "src/codeintel/legacy-extensions/search/conversion.ts", + "src/codeintel/legacy-extensions/search/docstrings.ts", + "src/codeintel/legacy-extensions/search/markdown.ts", + "src/codeintel/legacy-extensions/search/providers.ts", + "src/codeintel/legacy-extensions/search/queries.ts", + "src/codeintel/legacy-extensions/search/settings.ts", + "src/codeintel/legacy-extensions/search/squirrel.ts", + "src/codeintel/legacy-extensions/search/tokens.ts", + "src/codeintel/legacy-extensions/telemetry.ts", + "src/codeintel/legacy-extensions/util.ts", + "src/codeintel/legacy-extensions/util/api.ts", + "src/codeintel/legacy-extensions/util/graphql.ts", + "src/codeintel/legacy-extensions/util/helpers.ts", + "src/codeintel/legacy-extensions/util/ix.ts", + "src/codeintel/legacy-extensions/util/promise.ts", + "src/codeintel/legacy-extensions/util/uri.ts", + "src/codeintel/scip.ts", + "src/codeintel/searchContext.ts", + "src/commandPalette/CommandList.tsx", + "src/commandPalette/EmptyCommandList.tsx", + "src/commandPalette/EmptyCommandListContainer/EmptyCommandListContainer.tsx", + "src/commandPalette/EmptyCommandListContainer/index.ts", + "src/commands/commands.ts", + "src/components/CodeMirrorEditor.tsx", + "src/components/HighlightedMatches.tsx", + "src/components/MonacoEditor.tsx", + "src/components/NoMonacoEditor.tsx", + "src/components/Path.tsx", + "src/components/PrefetchableFile.tsx", + "src/components/RepoLink.tsx", + "src/components/UserAvatar.tsx", + "src/components/VirtualList.tsx", + "src/components/icons.tsx", + "src/components/languageIcons.tsx", + "src/components/ranking/LineRanking.ts", + "src/components/ranking/PerFileResultRanking.ts", + "src/components/ranking/PerFileResultRankingTestHelpers.ts", + "src/components/ranking/ZoektRanking.ts", + "src/components/utils/size.ts", + "src/contributions/contributions.ts", + "src/deprecated-theme-utils.ts", + "src/extensions/controller.ts", + "src/extensions/createNoopLoadedController.ts", + "src/extensions/createSyncLoadedController.ts", + "src/extensions/extension.ts", + "src/extensions/extensionManifest.ts", + "src/extensions/extensions.ts", + "src/globals.d.ts", + "src/hover/CopyLinkIcon.tsx", + "src/hover/HoverOverlay.fixtures.ts", + "src/hover/HoverOverlay.tsx", + "src/hover/HoverOverlay.types.ts", + "src/hover/HoverOverlayAlerts/HoverOverlayAlerts.tsx", + "src/hover/HoverOverlayAlerts/index.ts", + "src/hover/HoverOverlayContents/HoverOverlayContent/HoverOverlayContent.tsx", + "src/hover/HoverOverlayContents/HoverOverlayContent/index.ts", + "src/hover/HoverOverlayContents/HoverOverlayContents.tsx", + "src/hover/HoverOverlayContents/index.ts", + "src/hover/HoverOverlayLogo/HoverOverlayLogo.tsx", + "src/hover/HoverOverlayLogo/index.ts", + "src/hover/actions.ts", + "src/hover/helpers.ts", + "src/hover/useLogTelemetryEvent.ts", + "src/keyboardShortcuts.ts", + "src/keyboardShortcuts/keyboardShortcuts.ts", + "src/keyboardShortcuts/useKeyboardShortcut.ts", + "src/languages.ts", + "src/notifications/NotificationItem.tsx", + "src/notifications/Notifications.tsx", + "src/notifications/notification.ts", + "src/platform/context.ts", + "src/polyfills/configure-core-js.ts", + "src/polyfills/index.ts", + "src/polyfills/polyfill.ts", + "src/polyfills/vendor/eventSource.d.ts", + "src/react-shortcuts/Shortcut.tsx", + "src/react-shortcuts/ShortcutManager.tsx", + "src/react-shortcuts/ShortcutProvider.tsx", + "src/react-shortcuts/index.ts", + "src/react-shortcuts/keys.ts", + "src/schema/extensionSchema.ts", + "src/schema/settings.schema.d.ts", #keep + "src/search/backend.ts", + "src/search/helpers.ts", + "src/search/helpers/queryExample.ts", + "src/search/helpers/searchContext.ts", + "src/search/index.ts", + "src/search/integration/index.ts", + "src/search/integration/streaming-search-mocks.ts", + "src/search/query/completion.ts", + "src/search/query/completion-utils.ts", + "src/search/query/decoratedToken.ts", + "src/search/query/diagnostics.ts", + "src/search/query/filters.ts", + "src/search/query/hover.ts", + "src/search/query/languageFilter.ts", + "src/search/query/metrics.ts", + "src/search/query/monaco.ts", + "src/search/query/parser.ts", + "src/search/query/parserFuzz.ts", + "src/search/query/patternMatcher.ts", + "src/search/query/predicates.ts", + "src/search/query/printer.ts", + "src/search/query/providers.ts", + "src/search/query/providers-utils.ts", + "src/search/query/query.ts", + "src/search/query/scanner.ts", + "src/search/query/selectFilter.ts", + "src/search/query/token.ts", + "src/search/query/transformer.ts", + "src/search/query/utils.ts", + "src/search/query/validate.ts", + "src/search/query/visitor.ts", + "src/search/searchQueryState.tsx", + "src/search/stream.ts", + "src/search/suggestions/index.ts", + "src/settings/edit.ts", + "src/settings/settings.tsx", + "src/settings/temporary/TemporarySettings.ts", + "src/settings/temporary/TemporarySettingsProvider.tsx", + "src/settings/temporary/TemporarySettingsStorage.ts", + "src/settings/temporary/diffMode.ts", + "src/settings/temporary/index.ts", + "src/settings/temporary/migrateLocalStorageToTemporarySettings.ts", + "src/settings/temporary/recentSearches.ts", + "src/settings/temporary/searchSidebar.ts", + "src/settings/temporary/testUtils.tsx", + "src/settings/temporary/tourState.ts", + "src/settings/temporary/useTemporarySetting.ts", + "src/stories/MockedStoryProvider.tsx", + "src/stories/index.ts", + "src/symbols/SymbolIcon.tsx", + "src/symbols/SymbolKind.tsx", + "src/symbols/SymbolTag.tsx", + "src/symbols/symbolIcons.ts", + "src/telemetry/telemetryService.ts", + "src/theme.ts", + "src/tracking/event-log-creators.ts", + "src/tracking/utm.ts", + "src/types/core-js/configurator.d.ts", + "src/types/jasmine/index.d.ts", + "src/types/puppeteer-firefox/index.d.ts", + "src/types/storybook-chromatic/index.d.ts", + "src/types/string-score/index.d.ts", + "src/types/web-ext/index.d.ts", + "src/util/dom.ts", + "src/util/globbing.ts", + "src/util/lazyComponent.tsx", + "src/util/url.ts", + "src/util/useInputValidation.ts", + ], + tsconfig = ":tsconfig", + deps = [ + ":graphql_operations", + ":module_style_typings", + ":node_modules/@sourcegraph/client-api", + ":node_modules/@sourcegraph/codeintellify", + ":node_modules/@sourcegraph/common", + ":node_modules/@sourcegraph/extension-api-types", #keep + ":node_modules/@sourcegraph/http-client", + ":node_modules/@sourcegraph/template-parser", + ":node_modules/@sourcegraph/wildcard", + "//:node_modules/@apollo/client", + "//:node_modules/@codemirror/language", + "//:node_modules/@codemirror/state", + "//:node_modules/@codemirror/view", + "//:node_modules/@lezer/highlight", + "//:node_modules/@mdi/js", + "//:node_modules/@microsoft/fetch-event-source", + "//:node_modules/@sourcegraph/extension-api-classes", + "//:node_modules/@storybook/addon-actions", + "//:node_modules/@types/classnames", + "//:node_modules/@types/history", + "//:node_modules/@types/lodash", + "//:node_modules/@types/lru-cache", + "//:node_modules/@types/minimatch", + "//:node_modules/@types/node", + "//:node_modules/@types/puppeteer", + "//:node_modules/@types/react", + "//:node_modules/axe-core", #keep + "//:node_modules/classnames", + "//:node_modules/comlink", + "//:node_modules/core-js", + "//:node_modules/fast-json-stable-stringify", + "//:node_modules/history", + "//:node_modules/jest", #keep + "//:node_modules/js-base64", + "//:node_modules/lodash", + "//:node_modules/lru-cache", + "//:node_modules/mdi-react", + "//:node_modules/minimatch", + "//:node_modules/monaco-editor", + "//:node_modules/puppeteer", + "//:node_modules/react", + "//:node_modules/react-visibility-sensor", + "//:node_modules/regexpp", + "//:node_modules/rxjs", + "//:node_modules/string-score", + "//:node_modules/tabbable", + "//:node_modules/tagged-template-noop", + "//:node_modules/ts-key-enum", + "//:node_modules/use-deep-compare-effect", + "//:node_modules/util", + "//:node_modules/utility-types", #keep + "//:node_modules/zustand", #keep + "//schema:settings", #keep + ], +) + +ts_project( + name = "shared_tests", + testonly = True, + srcs = [ + "src/actions/ActionItem.test.tsx", + "src/actions/ActionsNavItems.test.tsx", + "src/api/client/mainthread-api.test.ts", + "src/api/client/types/textDocument.test.ts", + "src/api/extension/api/callViewProvidersInParallel.test.ts", + "src/api/extension/api/context/context.test.ts", + "src/api/extension/api/contribution.test.ts", + "src/api/extension/api/textDocument.test.ts", + "src/api/extension/api/utils/prefixSumComputer.test.ts", + "src/api/extension/api/utils/wordHelpers.test.ts", + "src/api/extension/test/activation.test.ts", + "src/api/extension/test/extensionHost.configuration.test.ts", + "src/api/extension/test/extensionHost.documentHighlights.test.ts", + "src/api/extension/test/extensionHost.hover.test.ts", + "src/api/extension/test/extensionHost.logging.test.ts", + "src/api/extension/test/extensionHost.providers.test.ts", + "src/api/extension/test/extensionHost.search.test.ts", + "src/api/util.test.ts", + "src/backend/errors.test.ts", + "src/codeintel/legacy-extensions/init.test.ts", + "src/codeintel/legacy-extensions/language-specs/cpp.test.ts", + "src/codeintel/legacy-extensions/language-specs/go.test.ts", + "src/codeintel/legacy-extensions/language-specs/java.test.ts", + "src/codeintel/legacy-extensions/language-specs/python.test.ts", + "src/codeintel/legacy-extensions/language-specs/spec.test.ts", + "src/codeintel/legacy-extensions/language-specs/typescript.test.ts", + "src/codeintel/legacy-extensions/lsif/definition-hover.test.ts", + "src/codeintel/legacy-extensions/lsif/highlights.test.ts", + "src/codeintel/legacy-extensions/lsif/locations.test.ts", + "src/codeintel/legacy-extensions/lsif/providers.test.ts", + "src/codeintel/legacy-extensions/lsif/ranges.test.ts", + "src/codeintel/legacy-extensions/lsif/references.test.ts", + "src/codeintel/legacy-extensions/lsif/stencil.test.ts", + "src/codeintel/legacy-extensions/lsif/util.test.ts", + "src/codeintel/legacy-extensions/providers.test.ts", + "src/codeintel/legacy-extensions/search/conversion.test.ts", + "src/codeintel/legacy-extensions/search/docstrings.test.ts", + "src/codeintel/legacy-extensions/search/markdown.test.ts", + "src/codeintel/legacy-extensions/search/providers.test.ts", + "src/codeintel/legacy-extensions/search/queries.test.ts", + "src/codeintel/legacy-extensions/search/tokens.test.ts", + "src/codeintel/legacy-extensions/util/ix.test.ts", + "src/codeintel/legacy-extensions/util/uri.test.ts", + "src/commandPalette/CommandList.test.ts", + "src/commands/commands.test.ts", + "src/components/HighlightedMatches.test.tsx", + "src/components/Path.test.tsx", + "src/components/RepoLink.test.tsx", + "src/components/UserAvatar.test.tsx", + "src/components/ranking/LineRanking.test.tsx", + "src/components/ranking/ZoektRanking.test.tsx", + "src/contributions/contributions.test.ts", + "src/extensions/extension.test.ts", + "src/hover/HoverOverlay.test.tsx", + "src/hover/actions.test.ts", + "src/keyboardShortcuts/useKeyboardShortcut.test.tsx", + "src/languages.test.ts", + "src/react-shortcuts/ShortcutManager.test.tsx", + "src/search/helpers/queryExample.test.ts", + "src/search/query/completion.test.ts", + "src/search/query/decoratedToken.test.ts", + "src/search/query/diagnostics.test.ts", + "src/search/query/filters.test.ts", + "src/search/query/hover.test.ts", + "src/search/query/languageFilter.test.ts", + "src/search/query/metrics.test.ts", + "src/search/query/parser.test.ts", + "src/search/query/patternMatcher.test.ts", + "src/search/query/predicates.test.ts", + "src/search/query/printer.test.ts", + "src/search/query/providers-utils.test.ts", + "src/search/query/scanner.test.ts", + "src/search/query/selectFilter.test.ts", + "src/search/query/transformer.test.ts", + "src/search/query/validate.test.ts", + "src/search/query/visitor.test.ts", + "src/settings/settings.test.ts", + "src/settings/temporary/useTemporarySetting.test.tsx", + "src/tracking/utm.test.ts", + "src/util/dom.test.ts", + "src/util/url.test.ts", + "src/util/useInputValidation.test.ts", + ], + tsconfig = ":tsconfig", + deps = [ + ":graphql_operations", + ":node_modules/@sourcegraph/client-api", + ":node_modules/@sourcegraph/codeintellify", + ":node_modules/@sourcegraph/common", + ":node_modules/@sourcegraph/http-client", + ":node_modules/@sourcegraph/template-parser", + ":node_modules/@sourcegraph/testing", + ":node_modules/@sourcegraph/wildcard", + ":shared_lib", + "//:node_modules/@apollo/client", + "//:node_modules/@sourcegraph/extension-api-classes", + "//:node_modules/@sourcegraph/extension-api-stubs", + "//:node_modules/@testing-library/react", + "//:node_modules/@testing-library/user-event", + "//:node_modules/@types/history", + "//:node_modules/@types/lodash", + "//:node_modules/@types/mock-require", + "//:node_modules/@types/node", + "//:node_modules/@types/react", + "//:node_modules/@types/sinon", + "//:node_modules/comlink", + "//:node_modules/history", + "//:node_modules/lodash", + "//:node_modules/mock-require", + "//:node_modules/monaco-editor", + "//:node_modules/p-timeout", + "//:node_modules/react", + "//:node_modules/rxjs", + "//:node_modules/sinon", + "//client/shared/src/testing", + ], +) + +npm_package( + name = "shared_pkg", + srcs = [ + "package.json", + ":batch_spec", #keep + ":module_styles", #keep + ":settings", #keep + ":shared_lib", + ":site", #keep + "//client/shared/src/testing", #keep + ], +) + +filegroup( + name = "snapshots", + srcs = glob(["src/**/__snapshots__/*"]), +) + +jest_test( + name = "test", + data = [ + ":shared_tests", + ":snapshots", + ], + # TODO(bazel): enable when snapshots updated to support pre-compiled .js files + tags = ["manual"], +) diff --git a/client/shared/dev/BUILD.bazel b/client/shared/dev/BUILD.bazel index 322ad700720..b9cbe60db00 100644 --- a/client/shared/dev/BUILD.bazel +++ b/client/shared/dev/BUILD.bazel @@ -1,4 +1,10 @@ load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_library") +load("//dev:defs.bzl", "ts_project") + +# gazelle:ignore + +# dev/ does not contain a src/ +# gazelle:js_files **/*.{ts,tsx} js_binary( name = "generate_schema", @@ -10,8 +16,6 @@ js_binary( visibility = ["//client/shared:__pkg__"], ) -# gazelle:exclude . - js_library( name = "extract_graphql_operation_codegen_plugin", srcs = [ @@ -37,3 +41,78 @@ js_binary( entry_point = "generateGraphQlOperations.js", visibility = ["//client:__subpackages__"], ) + +ts_project( + name = "mock_ts", + srcs = [ + "mockDomRect.ts", + "mockMatchMedia.ts", + "mockResizeObserver.ts", + "mockSentryBrowser.ts", + "mockUniqueId.ts", + "reactCleanup.ts", + "setLinkComponentForTest.ts", + ], + extends = None, + module = "commonjs", + tsconfig = "//client/shared:tsconfig", + visibility = ["//visibility:private"], + deps = [ + "//:node_modules/@sentry/browser", + "//:node_modules/@testing-library/react", + "//:node_modules/@types/jest", + "//:node_modules/@types/node", + "//:node_modules/@types/react", + "//:node_modules/react", + "//:node_modules/react-visibility-sensor", + "//:node_modules/resize-observer-polyfill", + "//:node_modules/use-resize-observer", + "//client/shared:node_modules/@sourcegraph/wildcard", + ], +) + +js_library( + name = "mock", + srcs = [ + "jest-environment.js", + "jestGlobalSetup.js", + "mockDate.js", + ], + data = [ + ":fetch-mock", + ":mock_ts", + ], + visibility = ["//visibility:public"], + deps = [ + "//:node_modules/@peculiar/webcrypto", + "//:node_modules/jest-environment-jsdom", + "//:node_modules/mockdate", + "//:node_modules/react", + ], +) + +js_library( + name = "fetch-mock", + srcs = ["fetch.js"], + visibility = ["//visibility:public"], + deps = [ + "//:node_modules/node-fetch", + ], +) + +js_library( + name = "mocha-reporter", + srcs = [ + "customMochaSpecReporter.js", + ], + data = [ + "//:node_modules/mocha", + ], + visibility = ["//visibility:public"], +) + +js_library( + name = "suppress-polly-errors", + srcs = ["suppressPollyErrors.js"], + visibility = ["//visibility:public"], +) diff --git a/client/shared/dev/generateGraphQlOperations.js b/client/shared/dev/generateGraphQlOperations.js index f30e24bcbfe..2ffe3397c96 100644 --- a/client/shared/dev/generateGraphQlOperations.js +++ b/client/shared/dev/generateGraphQlOperations.js @@ -19,14 +19,14 @@ const SHARED_DOCUMENTS_GLOB = [`${SHARED_FOLDER}/src/**/*.{ts,tsx}`] const WEB_DOCUMENTS_GLOB = [ `${WEB_FOLDER}/src/**/*.{ts,tsx}`, `${WEB_FOLDER}/src/regression/**/*.*`, - `!${WEB_FOLDER}/src/end-to-end/**/*.*`, + `!${WEB_FOLDER}/src/end-to-end/**/*.*`, // TODO(bazel): can remove when non-bazel dropped ] const SVELTEKIT_DOCUMENTS_GLOB = [`${SVELTEKIT_FOLDER}/src/lib/**/*.ts`] const BROWSER_DOCUMENTS_GLOB = [ `${BROWSER_FOLDER}/src/**/*.{ts,tsx}`, - `!${BROWSER_FOLDER}/src/end-to-end/**/*.*`, + `!${BROWSER_FOLDER}/src/end-to-end/**/*.*`, // TODO(bazel): can remove when non-bazel dropped '!**/*.d.ts', ] diff --git a/client/shared/dev/generate_graphql_operations.bzl b/client/shared/dev/generate_graphql_operations.bzl index 467dceeba0e..004638b84f2 100644 --- a/client/shared/dev/generate_graphql_operations.bzl +++ b/client/shared/dev/generate_graphql_operations.bzl @@ -1,6 +1,6 @@ load("@aspect_rules_js//js:defs.bzl", "js_run_binary") -def generate_graphql_operations(name, interface_name, srcs, out): +def generate_graphql_operations(name, interface_name, srcs, out, **kwargs): """Generate a graphql operations Typescript interface. Args: @@ -12,6 +12,7 @@ def generate_graphql_operations(name, interface_name, srcs, out): produced in or copied to the Bazel output tree, so it's recommended to use js_library with a glob pattern equivalent to the one in generateGraphQlOperations.js. out: Name of the typescript file to output. + **kwargs: general args """ js_run_binary( name = name, @@ -23,4 +24,5 @@ def generate_graphql_operations(name, interface_name, srcs, out): ], chdir = native.package_name(), tool = "//client/shared/dev:generate_graphql_operations", + **kwargs ) diff --git a/client/shared/dev/reactCleanup.ts b/client/shared/dev/reactCleanup.ts index 67bc2be1e86..5a5e0afe12c 100644 --- a/client/shared/dev/reactCleanup.ts +++ b/client/shared/dev/reactCleanup.ts @@ -7,4 +7,4 @@ import { cleanup } from '@testing-library/react' * Normally `cleanup` should be called automatically after each test. * https://testing-library.com/docs/svelte-testing-library/api/#cleanup */ -global.afterEach(cleanup) +afterEach(cleanup) diff --git a/client/shared/dev/setLinkComponentForTest.ts b/client/shared/dev/setLinkComponentForTest.ts index 65163654941..f189fd52a27 100644 --- a/client/shared/dev/setLinkComponentForTest.ts +++ b/client/shared/dev/setLinkComponentForTest.ts @@ -1,3 +1,14 @@ -import { setLinkComponent, AnchorLink } from '@sourcegraph/wildcard' +/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ -setLinkComponent(AnchorLink) +// HACK: when running tests within the client/wildcard package the link component +// state is within a local non-packaged version of Link. Set the AnchorLink in the +// local version instead of the packaged version. +if (process.env.JS_BINARY__PACKAGE?.startsWith('client/wildcard/')) { + const { setLinkComponent, AnchorLink } = require('../../wildcard/src/components/Link') + + setLinkComponent(AnchorLink) +} else { + const { setLinkComponent, AnchorLink } = require('@sourcegraph/wildcard') + + setLinkComponent(AnchorLink) +} diff --git a/client/shared/src/api/integration-test/BUILD.bazel b/client/shared/src/api/integration-test/BUILD.bazel new file mode 100644 index 00000000000..47e0e34ccd1 --- /dev/null +++ b/client/shared/src/api/integration-test/BUILD.bazel @@ -0,0 +1,16 @@ +load("@aspect_rules_js//js:defs.bzl", "js_library") + +# Exclude integration-test/ ts compilation +# gazelle:exclude . + +js_library( + name = "graphql_operations_files", + # Keep in sync with glob in client/shared/dev/generateGraphQlOperations.js + srcs = glob( + [ + "**/*.ts", + "**/*.tsx", + ], + ), + visibility = ["//client/shared:__pkg__"], +) diff --git a/client/shared/src/testing/BUILD.bazel b/client/shared/src/testing/BUILD.bazel new file mode 100644 index 00000000000..cdd13bd90ba --- /dev/null +++ b/client/shared/src/testing/BUILD.bazel @@ -0,0 +1,114 @@ +load("@aspect_rules_js//js:defs.bzl", "js_library") +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("//dev:defs.bzl", "ts_project") + +# testing/ does not contain a src/ +# gazelle:js_files **/*.{ts,tsx} +# gazelle:js_test_files make-everything-main-library + +# gazelle:js_resolve sourcegraph //client/shared:node_modules/@sourcegraph/client-api + +js_library( + name = "graphql_operations_files", + # Keep in sync with glob in client/shared/dev/generateGraphQlOperations.js + srcs = glob( + [ + "**/*.ts", + "**/*.tsx", + ], + ), + visibility = ["//client/shared:__pkg__"], +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:node_modules/@types/mocha", + "//:node_modules/@types/node", + "//client/shared:tsconfig", + ], +) + +ts_project( + name = "testing", + srcs = [ + "MockIntersectionObserver.ts", + "accessibility.ts", + "apollo/createGraphQLClientGetter.ts", + "apollo/index.ts", + "apollo/mockedTestProvider.tsx", + "config.ts", + "console.ts", + "coverage.ts", + "dom-test-helpers.ts", + "dom-utils.ts", + "driver.ts", + "integration/context.ts", + "integration/graphQlResults.ts", + "integration/mockExtension.ts", + "integration/polly/CdpAdapter.ts", + "mockReactVisibilitySensor.tsx", + "screenshotReporter.ts", + "searchContexts/testHelpers.ts", + "searchTestHelpers.ts", + "simulateMenuItemClick.ts", + "testHelpers.ts", + "utils.ts", + ], + tsconfig = "//client/shared:tsconfig", + deps = [ + "//:node_modules/@apollo/client", + "//:node_modules/@axe-core/puppeteer", + "//:node_modules/@percy/puppeteer", + "//:node_modules/@pollyjs/adapter", + "//:node_modules/@pollyjs/core", + "//:node_modules/@pollyjs/persister-fs", + "//:node_modules/@testing-library/react", + "//:node_modules/@types/jest", #keep + "//:node_modules/@types/lodash", + "//:node_modules/@types/mime-types", + "//:node_modules/@types/mocha", + "//:node_modules/@types/mz", + "//:node_modules/@types/node", + "//:node_modules/@types/pollyjs__adapter", + "//:node_modules/@types/pollyjs__core", + "//:node_modules/@types/pollyjs__persister-fs", + "//:node_modules/@types/prettier", + "//:node_modules/@types/puppeteer", + "//:node_modules/@types/react", + "//:node_modules/@types/sinon", + "//:node_modules/@types/uuid", + "//:node_modules/chalk", + "//:node_modules/date-fns", + "//:node_modules/delay", + "//:node_modules/expect", + "//:node_modules/graphql", #keep + "//:node_modules/jest", #keep + "//:node_modules/jest-mock-extended", + "//:node_modules/jsonc-parser", + "//:node_modules/lodash", + "//:node_modules/message-port-polyfill", + "//:node_modules/mime-types", + "//:node_modules/mocha", + "//:node_modules/mz", + "//:node_modules/p-retry", + "//:node_modules/p-timeout", + "//:node_modules/prettier", + "//:node_modules/puppeteer", + "//:node_modules/react", + "//:node_modules/rxjs", + "//:node_modules/sinon", + "//:node_modules/string-width", + "//:node_modules/term-size", + "//:node_modules/ts-key-enum", + "//:node_modules/util", + "//:node_modules/uuid", + "//client/shared:node_modules/@sourcegraph/build-config", + "//client/shared:node_modules/@sourcegraph/common", + "//client/shared:node_modules/@sourcegraph/http-client", + "//client/shared:node_modules/sourcegraph", + "//client/shared:shared_lib", + ], +) diff --git a/client/shared/src/testing/tsconfig.json b/client/shared/src/testing/tsconfig.json index d20c3a9aea8..fd9b2b86840 100644 --- a/client/shared/src/testing/tsconfig.json +++ b/client/shared/src/testing/tsconfig.json @@ -3,7 +3,9 @@ "references": [{ "path": "../.." }], "compilerOptions": { "types": ["mocha", "node"], - "module": "commonjs", + "paths": { + "*": ["../types/*", "*"], + }, }, "include": ["**/*"], "exclude": [], diff --git a/client/storybook/BUILD.bazel b/client/storybook/BUILD.bazel index bfb33756db7..b52d44e1704 100644 --- a/client/storybook/BUILD.bazel +++ b/client/storybook/BUILD.bazel @@ -1,5 +1,26 @@ +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "npm_package", "sass", "ts_project") load("//client/shared/dev:tools.bzl", "module_style_typings") -load("//dev:defs.bzl", "sass") + +# gazelle:js_resolve **/*.module.scss :module_style_typings + +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/build-config:tsconfig", + "//client/common:tsconfig", + "//client/http-client:tsconfig", + "//client/shared:tsconfig", + "//client/wildcard:tsconfig", + ], +) module_style_typings( name = "module_style_typings", @@ -9,3 +30,80 @@ sass( name = "module_styles", srcs = glob(["src/**/*.module.scss"]), ) + +ts_project( + name = "storybook_lib", + srcs = [ + "globals.d.ts", + "src/decorators/withChromaticThemes/ChromaticRoot/ChromaticRoot.tsx", + "src/decorators/withChromaticThemes/ChromaticRoot/index.ts", + "src/decorators/withChromaticThemes/index.ts", + "src/decorators/withChromaticThemes/withChromaticThemes.tsx", + "src/dllPlugin/ensureDllBundleIsReady.ts", + "src/dllPlugin/getVendorModules.ts", + "src/dllPlugin/getWebpackStats.ts", + "src/dllPlugin/index.ts", + "src/environment-config.ts", + "src/main.ts", + "src/preview.ts", + "src/themes.ts", + "src/webpack.config.common.ts", + "src/webpack.config.dll.ts", + ], + tsconfig = ":tsconfig", + # TODO(bazel): "#keep"s required for type-only imports + deps = [ + ":module_style_typings", + ":node_modules/@sourcegraph/build-config", + ":node_modules/@sourcegraph/wildcard", + "//:node_modules/@storybook/addon-actions", + "//:node_modules/@storybook/addon-console", + "//:node_modules/@storybook/addons", #keep + "//:node_modules/@storybook/core-common", #keep + "//:node_modules/@storybook/react", #keep + "//:node_modules/@storybook/theming", + "//:node_modules/@types/case-sensitive-paths-webpack-plugin", + "//:node_modules/@types/classnames", + "//:node_modules/@types/lodash", + "//:node_modules/@types/node", + "//:node_modules/@types/react", + "//:node_modules/@types/signale", + "//:node_modules/@types/speed-measure-webpack-plugin", + "//:node_modules/case-sensitive-paths-webpack-plugin", + "//:node_modules/classnames", + "//:node_modules/focus-visible", + "//:node_modules/jsonc-parser", + "//:node_modules/lodash", + "//:node_modules/open-color", + "//:node_modules/react", + "//:node_modules/signale", + "//:node_modules/speed-measure-webpack-plugin", + "//:node_modules/storybook-addon-designs", + "//:node_modules/webpack", + "//:node_modules/webpack-manifest-plugin", + ], +) + +ts_project( + name = "storybook_tests", + testonly = True, + srcs = ["src/coverage.test.ts"], + tsconfig = ":tsconfig", + # TODO(bazel): "#keep"s required for type-only imports + deps = [ + ":node_modules/@sourcegraph/shared", + "//:node_modules/@storybook/addon-storyshots", + "//:node_modules/@storybook/addon-storyshots-puppeteer", + "//:node_modules/@types/node", + "//:node_modules/url", + ], +) + +npm_package( + name = "storybook_pkg", + srcs = [ + "package.json", + ":module_styles", #keep + ":storybook_lib", + ], +) diff --git a/client/template-parser/BUILD.bazel b/client/template-parser/BUILD.bazel new file mode 100644 index 00000000000..02db923469a --- /dev/null +++ b/client/template-parser/BUILD.bazel @@ -0,0 +1,47 @@ +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "npm_package", "ts_project") + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + ], +) + +ts_project( + name = "template-parser_lib", + srcs = [ + "src/expr/evaluator.ts", + "src/expr/index.ts", + "src/expr/lexer.ts", + "src/expr/parser.ts", + "src/index.ts", + "src/types.ts", + ], + tsconfig = ":tsconfig", +) + +ts_project( + name = "template-parser_tests", + testonly = True, + srcs = [ + "src/expr/evaluator.test.ts", + "src/expr/lexer.test.ts", + "src/expr/parser.test.ts", + ], + tsconfig = ":tsconfig", + deps = [":template-parser_lib"], +) + +npm_package( + name = "template-parser_pkg", + srcs = [ + "package.json", + ":template-parser_lib", + ], +) diff --git a/client/testing/BUILD.bazel b/client/testing/BUILD.bazel new file mode 100644 index 00000000000..2be7779db51 --- /dev/null +++ b/client/testing/BUILD.bazel @@ -0,0 +1,34 @@ +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "npm_package", "ts_project") + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + ], +) + +ts_project( + name = "testing_lib", + srcs = [ + "src/aria-asserts.ts", + "src/index.ts", + ], + tsconfig = ":tsconfig", + deps = [ + "//:node_modules/@types/jest", #keep + ], +) + +npm_package( + name = "testing_pkg", + srcs = [ + "package.json", + ":testing_lib", + ], +) diff --git a/client/vscode/BUILD.bazel b/client/vscode/BUILD.bazel index b53a1ebc1ca..52cbb90e7cc 100644 --- a/client/vscode/BUILD.bazel +++ b/client/vscode/BUILD.bazel @@ -1,5 +1,35 @@ +load("@aspect_rules_js//js:defs.bzl", "js_library") +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "sass", "ts_project") +load("//client/shared/dev:generate_graphql_operations.bzl", "generate_graphql_operations") load("//client/shared/dev:tools.bzl", "module_style_typings") -load("//dev:defs.bzl", "sass") + +# TODO(bazel): webpack workers? +# gazelle:js_ignore_imports **/*.worker.ts + +# gazelle:js_resolve **/*.module.scss :module_style_typings +# gazelle:js_resolve vscode //:node_modules/@types/vscode + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/branded:tsconfig", + "//client/build-config:tsconfig", + "//client/client-api:tsconfig", + "//client/codeintellify:tsconfig", + "//client/common:tsconfig", + "//client/extension-api-types:tsconfig", + "//client/http-client:tsconfig", + "//client/shared:tsconfig", + "//client/wildcard:tsconfig", + ], +) module_style_typings( name = "module_style_typings", @@ -29,3 +59,186 @@ sass( "//client/wildcard:global-styles", ], ) + +js_library( + name = "graphql_operations_files", + # Keep in sync with glob in client/shared/dev/generateGraphQlOperations.js + srcs = glob( + [ + "src/**/*.ts", + "src/**/*.tsx", + ], + # TODO: Ignore legacy build generated file as it conflicts with the Bazel + # build. This can be removed after the migration. + [ + "src/graphql-operations.ts", + "src/**/*.module.scss.d.ts", + ], + ), + visibility = ["//client/shared:__pkg__"], +) + +generate_graphql_operations( + name = "graphql_operations_ts", + srcs = [ + ":graphql_operations_files", + ], + out = "src/graphql-operations.ts", + interface_name = "VSCodeGraphQlOperations", + visibility = ["//client/shared:__pkg__"], +) + +ts_project( + name = "graphql_operations", + srcs = ["src/graphql-operations.ts"], + tsconfig = ":tsconfig", + deps = [ + ":node_modules/@sourcegraph/shared", + ], +) + +ts_project( + name = "vscode", + srcs = [ + "code-intel-extensions.json", + "globals.d.ts", + "package.json", + "src/backend/authenticatedUser.ts", + "src/backend/blobContent.ts", + "src/backend/eventLogger.ts", + "src/backend/fetch.ts", + "src/backend/files.ts", + "src/backend/instanceVersion.ts", + "src/backend/node-fetch-fake-for-browser.ts", + "src/backend/proxy-agent-fake-for-browser.ts", + "src/backend/repositoryMetadata.ts", + "src/backend/requestGraphQl.ts", + "src/backend/searchContexts.ts", + "src/backend/sourcegraphSettings.ts", + "src/backend/streamSearch.ts", + "src/code-intel/SourcegraphDefinitionProvider.ts", + "src/code-intel/SourcegraphHoverProvider.ts", + "src/code-intel/SourcegraphReferenceProvider.ts", + "src/code-intel/initialize.ts", + "src/code-intel/languages.ts", + "src/code-intel/location.ts", + "src/commands/browserActionsNode.ts", + "src/commands/browserActionsWeb.ts", + "src/commands/git-helpers.ts", + "src/commands/initialize.ts", + "src/common/links.ts", + "src/contract.ts", + "src/extension.ts", + "src/file-system/FileTree.ts", + "src/file-system/FilesTreeDataProvider.ts", + "src/file-system/SourcegraphFileSystemProvider.ts", + "src/file-system/SourcegraphUri.ts", + "src/file-system/commands.ts", + "src/file-system/initialize.ts", + "src/log.ts", + "src/settings/LocalStorageService.ts", + "src/settings/accessTokenSetting.ts", + "src/settings/displayWarnings.ts", + "src/settings/endpointSetting.ts", + "src/settings/invalidation.ts", + "src/settings/readConfiguration.ts", + "src/settings/recommendations.ts", + "src/settings/uninstall.ts", + "src/state.ts", + "src/vsCodeApi.ts", + "src/webview/comlink/extensionEndpoint.ts", + "src/webview/comlink/index.ts", + "src/webview/comlink/webviewEndpoint.ts", + "src/webview/commands.ts", + "src/webview/initialize.ts", + "src/webview/platform/AuthProvider.ts", + "src/webview/platform/EventLogger.ts", + "src/webview/platform/context.ts", + "src/webview/platform/polyfills/index.ts", + "src/webview/platform/polyfills/polyfill.ts", + "src/webview/platform/telemetryService.ts", + "src/webview/search-panel/MatchHandlersContext.ts", + "src/webview/search-panel/RepoView.tsx", + "src/webview/search-panel/SearchHomeView.tsx", + "src/webview/search-panel/SearchResultsView.tsx", + "src/webview/search-panel/alias/CommitSearchResult.tsx", + "src/webview/search-panel/alias/FileMatchChildren.tsx", + "src/webview/search-panel/alias/ModalVideo.tsx", + "src/webview/search-panel/alias/RepoFileLink.tsx", + "src/webview/search-panel/alias/RepoSearchResult.tsx", + "src/webview/search-panel/alias/SymbolSearchResult.tsx", + "src/webview/search-panel/alias/fetchSearchContext.ts", + "src/webview/search-panel/api.ts", + "src/webview/search-panel/components/BrandHeader.tsx", + "src/webview/search-panel/components/ButtonDropdownCta.tsx", + "src/webview/search-panel/components/HomeFooter.tsx", + "src/webview/search-panel/components/SavedSearchForm.tsx", + "src/webview/search-panel/components/SearchExamples.tsx", + "src/webview/search-panel/components/SearchResultsInfoBar.tsx", + "src/webview/search-panel/components/icons.tsx", + "src/webview/search-panel/index.tsx", + "src/webview/sidebars/auth/AuthSidebarView.tsx", + "src/webview/sidebars/help/HelpSidebarView.tsx", + "src/webview/sidebars/help/index.tsx", + "src/webview/sidebars/history/HistorySidebarView.tsx", + "src/webview/sidebars/history/components/RecentFilesSection.tsx", + "src/webview/sidebars/history/components/RecentRepositoriesSection.tsx", + "src/webview/sidebars/history/components/RecentSearchesSection.tsx", + "src/webview/sidebars/history/components/SavedSearchesSection.tsx", + "src/webview/sidebars/search/ContextInvalidatedSidebarView.tsx", + "src/webview/sidebars/search/SearchSidebarView.tsx", + "src/webview/sidebars/search/api.ts", + "src/webview/sidebars/search/extension-host/index.ts", + "src/webview/sidebars/search/extension-host/main.worker.ts", + "src/webview/sidebars/search/extension-host/worker.ts", + "src/webview/sidebars/search/index.tsx", + "src/webview/theming/monacoTheme.ts", + "src/webview/theming/sourcegraphTheme.ts", + ], + tsconfig = ":tsconfig", + # TODO(bazel): type-only #keep imports + deps = [ + ":graphql_operations", + ":module_style_typings", + ":node_modules/@sourcegraph/branded", + ":node_modules/@sourcegraph/client-api", #keep + ":node_modules/@sourcegraph/codeintellify", #keep + ":node_modules/@sourcegraph/common", + ":node_modules/@sourcegraph/extension-api-types", #keep + ":node_modules/@sourcegraph/http-client", + ":node_modules/@sourcegraph/shared", + ":node_modules/@sourcegraph/wildcard", + "//:node_modules/@mdi/js", + "//:node_modules/@reach/visually-hidden", + "//:node_modules/@types/classnames", + "//:node_modules/@types/lodash", + "//:node_modules/@types/node", + "//:node_modules/@types/node-fetch", + "//:node_modules/@types/react", + "//:node_modules/@types/react-dom", + "//:node_modules/@types/uuid", + "//:node_modules/@types/vscode", + "//:node_modules/@vscode/webview-ui-toolkit", + "//:node_modules/agent-base", #keep + "//:node_modules/classnames", + "//:node_modules/comlink", + "//:node_modules/core-js", + "//:node_modules/execa", + "//:node_modules/graphql", + "//:node_modules/http-proxy-agent", + "//:node_modules/https-proxy-agent", + "//:node_modules/lodash", + "//:node_modules/mdi-react", + "//:node_modules/monaco-editor", + "//:node_modules/node-fetch", + "//:node_modules/react", + "//:node_modules/react-dom", + "//:node_modules/react-router-dom", + "//:node_modules/rxjs", + "//:node_modules/use-deep-compare-effect", + "//:node_modules/uuid", + "//:node_modules/zustand", + "//client/common:common_lib", #keep + "//client/shared:shared_lib", #keep + ], +) diff --git a/client/vscode/tests/BUILD.bazel b/client/vscode/tests/BUILD.bazel new file mode 100644 index 00000000000..284b2c28140 --- /dev/null +++ b/client/vscode/tests/BUILD.bazel @@ -0,0 +1,6 @@ +# TODO(bazel): disabled for now +# gazelle:js disabled + +# The library itself is a testing library so put all files into the main library +# gazelle:js_files **/*.{ts,tsx} +# gazelle:js_test_files does-not-exist-to-disable diff --git a/client/web/BUILD.bazel b/client/web/BUILD.bazel index 0c6a8ce21f7..098d91be4b8 100644 --- a/client/web/BUILD.bazel +++ b/client/web/BUILD.bazel @@ -1,7 +1,47 @@ +load("@bazel_skylib//rules:build_test.bzl", "build_test") +load("@aspect_rules_js//js:defs.bzl", "js_library") +load("@npm//:defs.bzl", "npm_link_all_packages") load("//client/shared/dev:generate_graphql_operations.bzl", "generate_graphql_operations") load("//client/shared/dev:tools.bzl", "module_style_typings") -load("@aspect_rules_js//js:defs.bzl", "js_library") -load("//dev:defs.bzl", "sass") +load("//dev:defs.bzl", "jest_test", "npm_package", "sass", "ts_project") +load("//dev:webpack.bzl", "webpack_bundle", "webpack_devserver") + +# TODO(bazel): storybook build +# gazelle:exclude **/*.story.{ts,tsx} + +# gazelle:js_resolve **/*.schema.json //schema:schema-json +# gazelle:js_resolve **/*.module.scss :module_style_typings + +# Non-ts imports +# gazelle:js_ignore_imports **/*.batch.yaml +# gazelle:js_ignore_imports **/*.worker.ts +# gazelle:js_ignore_imports **/SourcegraphWebApp.scss + +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") + +npm_link_all_packages(name = "node_modules") + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/branded:tsconfig", + "//client/build-config:tsconfig", + "//client/client-api:tsconfig", + "//client/codeintellify:tsconfig", + "//client/common:tsconfig", + "//client/extension-api-types:tsconfig", + "//client/http-client:tsconfig", + "//client/observability-client:tsconfig", + "//client/shared:tsconfig", + "//client/storybook:tsconfig", + "//client/testing:tsconfig", + "//client/wildcard:tsconfig", + "//schema:tsconfig", + ], +) module_style_typings( name = "module_style_typings", @@ -48,15 +88,1790 @@ js_library( # TODO: Ignore legacy build generated file as it conflicts with the Bazel # build. This can be removed after the migration. "src/graphql-operations.ts", + "src/**/*.module.scss.d.ts", ], ), + visibility = ["//client/shared:__pkg__"], ) generate_graphql_operations( - name = "graphql_operations", + name = "graphql_operations_ts", srcs = [ ":graphql_operations_files", + "//client/web/src/regression:graphql_operations_files", ], out = "src/graphql-operations.ts", interface_name = "WebGraphQlOperations", + visibility = ["//client/shared:__pkg__"], +) + +ts_project( + name = "graphql_operations", + srcs = ["src/graphql-operations.ts"], + tsconfig = ":tsconfig", + deps = [ + ":node_modules/@sourcegraph/shared", + ], +) + +filegroup( + name = "batch-yaml", + srcs = glob(["src/enterprise/batches/batch-spec/edit/library/*.batch.yaml"]), +) + +#TOOD(bazel): why is the indirect '@lezer/common' dep required here? + +ts_project( + name = "web_lib", + srcs = [ + "src/Layout.tsx", + "src/LegacyLayout.tsx", + "src/LegacyRouteContext.tsx", + "src/LegacySourcegraphWebApp.tsx", + "src/OpenSourceWebApp.tsx", + "src/PageError.tsx", + "src/SearchQueryStateObserver.tsx", + "src/SourcegraphWebApp.tsx", + "src/UserSessionStores.tsx", + "src/api/ApiConsole.tsx", + "src/api/ApiConsoleToolbar.tsx", + "src/api/NoApiConsole.tsx", + "src/auth.ts", + "src/auth/CloudSignUpPage.tsx", + "src/auth/ExternalsAuth.tsx", + "src/auth/OrDivider.tsx", + "src/auth/RequestAccessPage.tsx", + "src/auth/ResetPasswordPage.tsx", + "src/auth/SignInPage.tsx", + "src/auth/SignInSignUpCommon.tsx", + "src/auth/SignUpForm.tsx", + "src/auth/SignUpPage.tsx", + "src/auth/SignupEmailField.tsx", + "src/auth/UnlockAccount.tsx", + "src/auth/UsernamePasswordSignInForm.tsx", + "src/auth/VsCodeSignUpPage.tsx", + "src/auth/accessToken.ts", + "src/auth/icons.tsx", + "src/auth/withAuthenticatedUser.tsx", + "src/backend/diff.ts", + "src/backend/features.ts", + "src/backend/graphql.ts", + "src/backend/persistenceMapper.ts", + "src/batches/BatchChangesNavItem.tsx", + "src/batches/RepoBatchChangesButton.tsx", + "src/batches/backend.ts", + "src/batches/icons.tsx", + "src/batches/index.ts", + "src/code-monitoring/CodeMonitoringLogo.tsx", + "src/codeMonitoring/index.ts", + "src/codeintel/CodeIntelligenceBadge.tsx", + "src/codeintel/ReferencesPanel.mocks.ts", + "src/codeintel/ReferencesPanel.tsx", + "src/codeintel/ReferencesPanelQueries.ts", + "src/codeintel/index.ts", + "src/codeintel/location.ts", + "src/codeintel/promise.ts", + "src/codeintel/searchBased.ts", + "src/codeintel/settings.ts", + "src/codeintel/token.ts", + "src/codeintel/useCodeIntel.ts", + "src/codeintel/useRepoAndBlob.ts", + "src/codeintel/util/helpers.ts", + "src/cody/CodyIcon.tsx", + "src/communitySearchContexts/Backstage.tsx", + "src/communitySearchContexts/CommunitySearchContextPage.tsx", + "src/communitySearchContexts/HomepageConfig.ts", + "src/communitySearchContexts/Julia.tsx", + "src/communitySearchContexts/Kubernetes.tsx", + "src/communitySearchContexts/StackStorm.tsx", + "src/communitySearchContexts/Stanford.tsx", + "src/communitySearchContexts/Temporal.tsx", + "src/communitySearchContexts/chakraui.tsx", + "src/communitySearchContexts/cncf.tsx", + "src/communitySearchContexts/o3de.tsx", + "src/communitySearchContexts/routes.tsx", + "src/communitySearchContexts/types.ts", + "src/components/AppRouterContainer/AppRouterContainer.tsx", + "src/components/AppRouterContainer/index.ts", + "src/components/AwayPrompt.tsx", + "src/components/Breadcrumbs.tsx", + "src/components/Byline/CreatedByAndUpdatedByInfoByline.tsx", + "src/components/CallToActionBanner.tsx", + "src/components/CircleDashedIcon.tsx", + "src/components/Collapsible.tsx", + "src/components/ComponentsComposer.tsx", + "src/components/CopyableText.tsx", + "src/components/CtaBanner.tsx", + "src/components/CtaIcons.tsx", + "src/components/DismissibleAlert/DismissibleAlert.tsx", + "src/components/DismissibleAlert/index.ts", + "src/components/ErrorBoundary.tsx", + "src/components/ExecutionLogEntry.tsx", + "src/components/FilteredConnection/ConnectionNodes.tsx", + "src/components/FilteredConnection/ConnectionType.ts", + "src/components/FilteredConnection/FilterControl.tsx", + "src/components/FilteredConnection/FilteredConnection.tsx", + "src/components/FilteredConnection/constants.ts", + "src/components/FilteredConnection/hooks/usePageSwitcherPagination.ts", + "src/components/FilteredConnection/hooks/useShowMorePagination.ts", + "src/components/FilteredConnection/hooks/useShowMorePaginationUrl.ts", + "src/components/FilteredConnection/index.ts", + "src/components/FilteredConnection/ui/ConnectionContainer.tsx", + "src/components/FilteredConnection/ui/ConnectionError.tsx", + "src/components/FilteredConnection/ui/ConnectionForm.tsx", + "src/components/FilteredConnection/ui/ConnectionList.tsx", + "src/components/FilteredConnection/ui/ConnectionLoading.tsx", + "src/components/FilteredConnection/ui/ConnectionSummary.tsx", + "src/components/FilteredConnection/ui/ShowMoreButton.tsx", + "src/components/FilteredConnection/ui/SummaryContainer.tsx", + "src/components/FilteredConnection/ui/index.ts", + "src/components/FilteredConnection/utils.ts", + "src/components/HeroPage.tsx", + "src/components/InputTooltip.tsx", + "src/components/KeyboardShortcutsHelp/KeyboardShortcutsHelp.tsx", + "src/components/LoaderButton.tsx", + "src/components/LogOutput.tsx", + "src/components/MagnifyingGlassIcon.tsx", + "src/components/MarketingBlock/MarketingBlock.tsx", + "src/components/MarketingBlock/index.ts", + "src/components/ModalPage.tsx", + "src/components/Page.tsx", + "src/components/PageTitle.tsx", + "src/components/RadioButtons.tsx", + "src/components/RedirectRoute.tsx", + "src/components/SaveToolbar.tsx", + "src/components/SelfHostedCta/SelfHostedCta.tsx", + "src/components/SelfHostedCta/index.ts", + "src/components/Sidebar.tsx", + "src/components/SingleValueCard.tsx", + "src/components/Timeline.tsx", + "src/components/WebHoverOverlay/WebHoverOverlay.fixtures.ts", + "src/components/WebHoverOverlay/WebHoverOverlay.tsx", + "src/components/WebHoverOverlay/index.ts", + "src/components/WebStory.tsx", + "src/components/branding/BrandLogo.tsx", + "src/components/diff/DiffBoundary.tsx", + "src/components/diff/DiffHunk.tsx", + "src/components/diff/DiffSplitHunk.tsx", + "src/components/diff/DiffStat.tsx", + "src/components/diff/FileDiffHunks.tsx", + "src/components/diff/FileDiffNode.tsx", + "src/components/diff/Lines.tsx", + "src/components/diff/addLineNumberToHunks.ts", + "src/components/externalAccounts/externalAccounts.ts", + "src/components/externalServices/AddExternalServicePage.tsx", + "src/components/externalServices/AddExternalServicesPage.tsx", + "src/components/externalServices/ExternalServiceCard.tsx", + "src/components/externalServices/ExternalServiceEditPage.tsx", + "src/components/externalServices/ExternalServiceEditingDisabledAlert.tsx", + "src/components/externalServices/ExternalServiceEditingTemporaryAlert.tsx", + "src/components/externalServices/ExternalServiceForm.tsx", + "src/components/externalServices/ExternalServiceInformation.tsx", + "src/components/externalServices/ExternalServiceNode.tsx", + "src/components/externalServices/ExternalServicePage.tsx", + "src/components/externalServices/ExternalServiceSyncJobNode.tsx", + "src/components/externalServices/ExternalServiceSyncJobsList.tsx", + "src/components/externalServices/ExternalServiceWebhook.tsx", + "src/components/externalServices/ExternalServicesPage.tsx", + "src/components/externalServices/GerritIcon.tsx", + "src/components/externalServices/backend.ts", + "src/components/externalServices/externalServices.tsx", + "src/components/fuzzyFinder/FuzzyActions.tsx", + "src/components/fuzzyFinder/FuzzyFiles.tsx", + "src/components/fuzzyFinder/FuzzyFinder.mocks.tsx", + "src/components/fuzzyFinder/FuzzyFinder.tsx", + "src/components/fuzzyFinder/FuzzyFinderFeatureFlag.ts", + "src/components/fuzzyFinder/FuzzyFsm.ts", + "src/components/fuzzyFinder/FuzzyLocalCache.ts", + "src/components/fuzzyFinder/FuzzyModal.tsx", + "src/components/fuzzyFinder/FuzzyQuery.ts", + "src/components/fuzzyFinder/FuzzyRepoRevision.ts", + "src/components/fuzzyFinder/FuzzyRepos.tsx", + "src/components/fuzzyFinder/FuzzyShortcuts.ts", + "src/components/fuzzyFinder/FuzzySymbols.tsx", + "src/components/fuzzyFinder/FuzzyTabs.tsx", + "src/components/fuzzyFinder/HighlightedLink.tsx", + "src/components/fuzzyFinder/LazyFuzzyFinder.tsx", + "src/components/shared.tsx", + "src/components/time/Duration.tsx", + "src/components/useScrollToLocationHash.ts", + "src/components/useUserHistory.ts", + "src/contributions.ts", + "src/enterprise/EnterpriseWebApp.tsx", + "src/enterprise/batches/BatchChangeTabs.tsx", + "src/enterprise/batches/BatchSpec.tsx", + "src/enterprise/batches/BatchSpecNode.tsx", + "src/enterprise/batches/BatchSpecsPage.tsx", + "src/enterprise/batches/Branch.tsx", + "src/enterprise/batches/ChangesetFilter.tsx", + "src/enterprise/batches/CodeHost.tsx", + "src/enterprise/batches/Description.tsx", + "src/enterprise/batches/DropdownButton.tsx", + "src/enterprise/batches/MissingCredentialsAlert.tsx", + "src/enterprise/batches/MultiSelectContext.tsx", + "src/enterprise/batches/backend.ts", + "src/enterprise/batches/batch-spec/BatchSpecContext.tsx", + "src/enterprise/batches/batch-spec/TabBar.tsx", + "src/enterprise/batches/batch-spec/batch-spec.mock.ts", + "src/enterprise/batches/batch-spec/edit/DownloadSpecModal.tsx", + "src/enterprise/batches/batch-spec/edit/EditBatchSpecPage.tsx", + "src/enterprise/batches/batch-spec/edit/RunBatchSpecButton.tsx", + "src/enterprise/batches/batch-spec/edit/RunServerSideModal.tsx", + "src/enterprise/batches/batch-spec/edit/editor/EditorFeedbackPanel.tsx", + "src/enterprise/batches/batch-spec/edit/editor/MonacoBatchSpecEditor.tsx", + "src/enterprise/batches/batch-spec/edit/editor/backend.ts", + "src/enterprise/batches/batch-spec/edit/library/LibraryPane.tsx", + "src/enterprise/batches/batch-spec/edit/library/ReplaceSpecModal.tsx", + "src/enterprise/batches/batch-spec/edit/useExecuteBatchSpec.ts", + "src/enterprise/batches/batch-spec/edit/workspaces-preview/ImportingChangesetsPreviewList.tsx", + "src/enterprise/batches/batch-spec/edit/workspaces-preview/PreviewLoadingSpinner.tsx", + "src/enterprise/batches/batch-spec/edit/workspaces-preview/PreviewPromptIcon.tsx", + "src/enterprise/batches/batch-spec/edit/workspaces-preview/WorkspacesPreview.tsx", + "src/enterprise/batches/batch-spec/edit/workspaces-preview/WorkspacesPreviewFilterRow.tsx", + "src/enterprise/batches/batch-spec/edit/workspaces-preview/WorkspacesPreviewList.tsx", + "src/enterprise/batches/batch-spec/edit/workspaces-preview/WorkspacesPreviewListItem.tsx", + "src/enterprise/batches/batch-spec/edit/workspaces-preview/WorkspacesPreviewPanel.tsx", + "src/enterprise/batches/batch-spec/edit/workspaces-preview/useImportingChangesets.ts", + "src/enterprise/batches/batch-spec/edit/workspaces-preview/useWorkspaces.ts", + "src/enterprise/batches/batch-spec/edit/workspaces-preview/useWorkspacesPreview.ts", + "src/enterprise/batches/batch-spec/execute/ActionsMenu.tsx", + "src/enterprise/batches/batch-spec/execute/BatchSpecStateBadge.tsx", + "src/enterprise/batches/batch-spec/execute/CancelExecutionModal.tsx", + "src/enterprise/batches/batch-spec/execute/DiagnosticsModal.tsx", + "src/enterprise/batches/batch-spec/execute/ExecuteBatchSpecPage.tsx", + "src/enterprise/batches/batch-spec/execute/ExecutionStatsBar.tsx", + "src/enterprise/batches/batch-spec/execute/ReadOnlyBatchSpecAlert.tsx", + "src/enterprise/batches/batch-spec/execute/ReadOnlyBatchSpecForm.tsx", + "src/enterprise/batches/batch-spec/execute/backend.ts", + "src/enterprise/batches/batch-spec/execute/util.ts", + "src/enterprise/batches/batch-spec/execute/workspaces/ExecutionWorkspaces.tsx", + "src/enterprise/batches/batch-spec/execute/workspaces/StepStateIcon.tsx", + "src/enterprise/batches/batch-spec/execute/workspaces/WorkspaceDetails.tsx", + "src/enterprise/batches/batch-spec/execute/workspaces/WorkspaceStateIcon.tsx", + "src/enterprise/batches/batch-spec/execute/workspaces/Workspaces.tsx", + "src/enterprise/batches/batch-spec/execute/workspaces/WorkspacesFilterRow.tsx", + "src/enterprise/batches/batch-spec/execute/workspaces/WorkspacesListItem.tsx", + "src/enterprise/batches/batch-spec/execute/workspaces/WorkspacesPanel.tsx", + "src/enterprise/batches/batch-spec/header/ActionButtons.tsx", + "src/enterprise/batches/batch-spec/header/BatchChangeHeader.tsx", + "src/enterprise/batches/batch-spec/useBatchSpecCode.ts", + "src/enterprise/batches/batch-spec/yaml-util.ts", + "src/enterprise/batches/close/BatchChangeCloseAlert.tsx", + "src/enterprise/batches/close/BatchChangeCloseChangesetsList.tsx", + "src/enterprise/batches/close/BatchChangeCloseHeader.tsx", + "src/enterprise/batches/close/BatchChangeClosePage.tsx", + "src/enterprise/batches/close/ChangesetCloseAction.tsx", + "src/enterprise/batches/close/ChangesetCloseNode.tsx", + "src/enterprise/batches/close/CloseChangesetsListEmptyElement.tsx", + "src/enterprise/batches/close/ExternalChangesetCloseNode.tsx", + "src/enterprise/batches/close/HiddenExternalChangesetCloseNode.tsx", + "src/enterprise/batches/close/backend.ts", + "src/enterprise/batches/create/BatchChangeTemplateIcon.tsx", + "src/enterprise/batches/create/ConfigurationForm.tsx", + "src/enterprise/batches/create/CreateBatchChangePage.tsx", + "src/enterprise/batches/create/InsightTemplatesBanner.tsx", + "src/enterprise/batches/create/NamespaceSelector.tsx", + "src/enterprise/batches/create/OldCreateBatchChangeContent.tsx", + "src/enterprise/batches/create/SearchTemplatesBanner.tsx", + "src/enterprise/batches/create/TemplateBanner.tsx", + "src/enterprise/batches/create/backend.ts", + "src/enterprise/batches/create/go-checker-templates.ts", + "src/enterprise/batches/create/useInsightTemplates.ts", + "src/enterprise/batches/create/useNamespaces.ts", + "src/enterprise/batches/create/useSearchTemplate.ts", + "src/enterprise/batches/detail/ActiveExecutionNotice.tsx", + "src/enterprise/batches/detail/BatchChangeBurndownChart.tsx", + "src/enterprise/batches/detail/BatchChangeDetailsActionSection.tsx", + "src/enterprise/batches/detail/BatchChangeDetailsPage.mock.ts", + "src/enterprise/batches/detail/BatchChangeDetailsPage.tsx", + "src/enterprise/batches/detail/BatchChangeDetailsTabs.tsx", + "src/enterprise/batches/detail/BatchChangeStatsCard.tsx", + "src/enterprise/batches/detail/BulkOperationsAlerts.tsx", + "src/enterprise/batches/detail/BulkOperationsTab.tsx", + "src/enterprise/batches/detail/ChangesetsArchivedNotice.tsx", + "src/enterprise/batches/detail/ClosedNotice.tsx", + "src/enterprise/batches/detail/SupersedingBatchSpecAlert.tsx", + "src/enterprise/batches/detail/UnpublishedNotice.tsx", + "src/enterprise/batches/detail/WebhookAlert.tsx", + "src/enterprise/batches/detail/backend.ts", + "src/enterprise/batches/detail/bulk-operations/BulkOperationNode.tsx", + "src/enterprise/batches/detail/changesets/BatchChangeChangesets.mock.ts", + "src/enterprise/batches/detail/changesets/BatchChangeChangesets.tsx", + "src/enterprise/batches/detail/changesets/BatchChangeChangesetsHeader.tsx", + "src/enterprise/batches/detail/changesets/ChangesetCheckStatusCell.tsx", + "src/enterprise/batches/detail/changesets/ChangesetFileDiff.tsx", + "src/enterprise/batches/detail/changesets/ChangesetFilterRow.tsx", + "src/enterprise/batches/detail/changesets/ChangesetLabel.tsx", + "src/enterprise/batches/detail/changesets/ChangesetLastSynced.tsx", + "src/enterprise/batches/detail/changesets/ChangesetNode.tsx", + "src/enterprise/batches/detail/changesets/ChangesetReviewStatusCell.tsx", + "src/enterprise/batches/detail/changesets/ChangesetSelectRow.tsx", + "src/enterprise/batches/detail/changesets/ChangesetStatusCell.tsx", + "src/enterprise/batches/detail/changesets/ChangesetStatusScheduled.tsx", + "src/enterprise/batches/detail/changesets/CloseChangesetsModal.tsx", + "src/enterprise/batches/detail/changesets/CreateCommentModal.tsx", + "src/enterprise/batches/detail/changesets/DetachChangesetsModal.tsx", + "src/enterprise/batches/detail/changesets/DownloadDiffButton.tsx", + "src/enterprise/batches/detail/changesets/EmptyArchivedChangesetListElement.tsx", + "src/enterprise/batches/detail/changesets/EmptyChangesetListElement.tsx", + "src/enterprise/batches/detail/changesets/EmptyChangesetSearchElement.tsx", + "src/enterprise/batches/detail/changesets/EmptyDraftChangesetListElement.tsx", + "src/enterprise/batches/detail/changesets/ExternalChangesetInfoCell.tsx", + "src/enterprise/batches/detail/changesets/ExternalChangesetNode.tsx", + "src/enterprise/batches/detail/changesets/ExternalChangesetTitle.tsx", + "src/enterprise/batches/detail/changesets/HiddenExternalChangesetInfoCell.tsx", + "src/enterprise/batches/detail/changesets/HiddenExternalChangesetNode.tsx", + "src/enterprise/batches/detail/changesets/MergeChangesetsModal.tsx", + "src/enterprise/batches/detail/changesets/PublishChangesetsModal.tsx", + "src/enterprise/batches/detail/changesets/ReenqueueChangesetsModal.tsx", + "src/enterprise/batches/detail/testdata.ts", + "src/enterprise/batches/global/GlobalBatchChangesArea.tsx", + "src/enterprise/batches/list/BatchChangeListFilters.tsx", + "src/enterprise/batches/list/BatchChangeListPage.tsx", + "src/enterprise/batches/list/BatchChangeNode.tsx", + "src/enterprise/batches/list/BatchChangeStatePill.tsx", + "src/enterprise/batches/list/BatchChangeStatsBar.tsx", + "src/enterprise/batches/list/BatchChangesChangelogAlert.tsx", + "src/enterprise/batches/list/BatchChangesListIntro.tsx", + "src/enterprise/batches/list/GettingStarted.tsx", + "src/enterprise/batches/list/NewBatchChangeButton.tsx", + "src/enterprise/batches/list/backend.ts", + "src/enterprise/batches/list/testData.ts", + "src/enterprise/batches/list/useBatchChangeListFilters.ts", + "src/enterprise/batches/preview/BatchChangePreviewContext.tsx", + "src/enterprise/batches/preview/BatchChangePreviewPage.tsx", + "src/enterprise/batches/preview/BatchChangePreviewStatsBar.tsx", + "src/enterprise/batches/preview/BatchChangePreviewTabs.tsx", + "src/enterprise/batches/preview/BatchSpecInfoByline.tsx", + "src/enterprise/batches/preview/CreateUpdateBatchChangeAlert.tsx", + "src/enterprise/batches/preview/backend.ts", + "src/enterprise/batches/preview/icons.tsx", + "src/enterprise/batches/preview/list/ChangesetApplyPreviewNode.tsx", + "src/enterprise/batches/preview/list/ChangesetSpecFileDiffConnection.tsx", + "src/enterprise/batches/preview/list/EmptyPreviewListElement.tsx", + "src/enterprise/batches/preview/list/GitBranchChangesetDescriptionInfo.tsx", + "src/enterprise/batches/preview/list/HiddenChangesetApplyPreviewNode.tsx", + "src/enterprise/batches/preview/list/PreviewActions.tsx", + "src/enterprise/batches/preview/list/PreviewFilterRow.tsx", + "src/enterprise/batches/preview/list/PreviewList.tsx", + "src/enterprise/batches/preview/list/PreviewListHeader.tsx", + "src/enterprise/batches/preview/list/PreviewNodeIndicator.tsx", + "src/enterprise/batches/preview/list/PreviewSelectRow.tsx", + "src/enterprise/batches/preview/list/VisibleChangesetApplyPreviewNode.tsx", + "src/enterprise/batches/preview/list/backend.ts", + "src/enterprise/batches/preview/list/storyData.ts", + "src/enterprise/batches/preview/utils.ts", + "src/enterprise/batches/repo/BatchChangeNode.tsx", + "src/enterprise/batches/repo/BatchChangeRepoPage.tsx", + "src/enterprise/batches/repo/RepoBatchChanges.tsx", + "src/enterprise/batches/repo/RepositoryBatchChangesArea.tsx", + "src/enterprise/batches/repo/backend.ts", + "src/enterprise/batches/repo/testData.ts", + "src/enterprise/batches/settings/AddCredentialModal.tsx", + "src/enterprise/batches/settings/BatchChangesSettingsArea.tsx", + "src/enterprise/batches/settings/BatchChangesSiteConfigSettingsArea.tsx", + "src/enterprise/batches/settings/CheckButton.tsx", + "src/enterprise/batches/settings/CodeHostConnectionNode.tsx", + "src/enterprise/batches/settings/CodeHostConnections.tsx", + "src/enterprise/batches/settings/CodeHostSshPublicKey.tsx", + "src/enterprise/batches/settings/ModalHeader.tsx", + "src/enterprise/batches/settings/RemoveCredentialModal.tsx", + "src/enterprise/batches/settings/ViewCredentialModal.tsx", + "src/enterprise/batches/settings/backend.ts", + "src/enterprise/batches/testData.ts", + "src/enterprise/batches/useBatchChangesLicense.ts", + "src/enterprise/batches/utils.ts", + "src/enterprise/batches/utils/size.ts", + "src/enterprise/batches/workspaces-list/Descriptor.tsx", + "src/enterprise/batches/workspaces-list/Header.tsx", + "src/enterprise/batches/workspaces-list/Icons.tsx", + "src/enterprise/batches/workspaces-list/ListItem.tsx", + "src/enterprise/batches/workspaces-list/index.ts", + "src/enterprise/code-monitoring/CodeMonitorList.tsx", + "src/enterprise/code-monitoring/CodeMonitoringGettingStarted.tsx", + "src/enterprise/code-monitoring/CodeMonitoringLogs.tsx", + "src/enterprise/code-monitoring/CodeMonitoringNode.tsx", + "src/enterprise/code-monitoring/CodeMonitoringPage.tsx", + "src/enterprise/code-monitoring/CreateCodeMonitorPage.tsx", + "src/enterprise/code-monitoring/ManageCodeMonitorPage.tsx", + "src/enterprise/code-monitoring/action-converters.ts", + "src/enterprise/code-monitoring/backend.ts", + "src/enterprise/code-monitoring/components/CodeMonitorForm.tsx", + "src/enterprise/code-monitoring/components/DeleteMonitorModal.tsx", + "src/enterprise/code-monitoring/components/FormActionArea.tsx", + "src/enterprise/code-monitoring/components/FormTriggerArea.tsx", + "src/enterprise/code-monitoring/components/actions/ActionEditor.tsx", + "src/enterprise/code-monitoring/components/actions/EmailAction.tsx", + "src/enterprise/code-monitoring/components/actions/SlackWebhookAction.tsx", + "src/enterprise/code-monitoring/components/actions/WebhookAction.tsx", + "src/enterprise/code-monitoring/components/logs/CodeMonitorLogsHeader.tsx", + "src/enterprise/code-monitoring/components/logs/CollapsibleDetailsWithStatus.tsx", + "src/enterprise/code-monitoring/components/logs/MonitorLogNode.tsx", + "src/enterprise/code-monitoring/components/logs/TriggerEvent.tsx", + "src/enterprise/code-monitoring/global/GlobalCodeMonitoringArea.tsx", + "src/enterprise/code-monitoring/testing/util.ts", + "src/enterprise/codeintel/badge/components/CodeIntelligenceBadgeContent.tsx", + "src/enterprise/codeintel/badge/components/CodeIntelligenceBadgeMenu.tsx", + "src/enterprise/codeintel/badge/components/IndexerSummary.tsx", + "src/enterprise/codeintel/badge/components/InternalCodeIntelligenceBadgeContent.tsx", + "src/enterprise/codeintel/badge/components/RequestLink.tsx", + "src/enterprise/codeintel/badge/components/Unsupported.tsx", + "src/enterprise/codeintel/badge/components/UploadOrIndexMeta.tsx", + "src/enterprise/codeintel/badge/components/UploadOrIndexMetaTable.tsx", + "src/enterprise/codeintel/badge/components/UserFacingCodeIntelligenceBadgeContent.tsx", + "src/enterprise/codeintel/badge/hooks/queries.ts", + "src/enterprise/codeintel/badge/hooks/useCodeIntelStatus.ts", + "src/enterprise/codeintel/configuration/components/CodeIntelConfigurationPageHeader.tsx", + "src/enterprise/codeintel/configuration/components/ConfigurationEditor.tsx", + "src/enterprise/codeintel/configuration/components/CreatePolicyButtons.tsx", + "src/enterprise/codeintel/configuration/components/Duration.tsx", + "src/enterprise/codeintel/configuration/components/DurationSelect.tsx", + "src/enterprise/codeintel/configuration/components/EmptyPoliciesList.tsx", + "src/enterprise/codeintel/configuration/components/FlashMessage.tsx", + "src/enterprise/codeintel/configuration/components/IndexConfigurationSaveToolbar.tsx", + "src/enterprise/codeintel/configuration/components/InferenceScriptEditor.tsx", + "src/enterprise/codeintel/configuration/components/RepositoryPatternList.tsx", + "src/enterprise/codeintel/configuration/hooks/queryPolicies.tsx", + "src/enterprise/codeintel/configuration/hooks/types.tsx", + "src/enterprise/codeintel/configuration/hooks/useDeletePolicies.tsx", + "src/enterprise/codeintel/configuration/hooks/useInferJobs.tsx", + "src/enterprise/codeintel/configuration/hooks/useInferenceScript.tsx", + "src/enterprise/codeintel/configuration/hooks/useInferredConfig.tsx", + "src/enterprise/codeintel/configuration/hooks/usePolicyConfigurationById.tsx", + "src/enterprise/codeintel/configuration/hooks/usePreviewGitObjectFilter.tsx", + "src/enterprise/codeintel/configuration/hooks/usePreviewRepositoryFilter.tsx", + "src/enterprise/codeintel/configuration/hooks/useRepositoryConfig.tsx", + "src/enterprise/codeintel/configuration/hooks/useSavePolicyConfiguration.tsx", + "src/enterprise/codeintel/configuration/hooks/useUpdateConfigurationForRepository.tsx", + "src/enterprise/codeintel/configuration/hooks/useUpdateInferenceScript.tsx", + "src/enterprise/codeintel/configuration/pages/CodeIntelConfigurationPage.tsx", + "src/enterprise/codeintel/configuration/pages/CodeIntelConfigurationPolicyPage.tsx", + "src/enterprise/codeintel/configuration/pages/CodeIntelInferenceConfigurationPage.tsx", + "src/enterprise/codeintel/configuration/pages/CodeIntelRepositoryIndexConfigurationPage.tsx", + "src/enterprise/codeintel/configuration/schema.json", + "src/enterprise/codeintel/configuration/shared.ts", + "src/enterprise/codeintel/dashboard/hooks/queries.ts", + "src/enterprise/codeintel/indexes/components/AuditLog.tsx", + "src/enterprise/codeintel/indexes/components/CodeIntelLastUpdated.tsx", + "src/enterprise/codeintel/indexes/components/CodeIntelStateIcon.tsx", + "src/enterprise/codeintel/indexes/components/CodeIntelStateLabel.tsx", + "src/enterprise/codeintel/indexes/components/Dependencies.tsx", + "src/enterprise/codeintel/indexes/components/EnqueueForm.tsx", + "src/enterprise/codeintel/indexes/components/IndexTimeline.tsx", + "src/enterprise/codeintel/indexes/components/ProjectDescription.tsx", + "src/enterprise/codeintel/indexes/components/RetentionList.tsx", + "src/enterprise/codeintel/indexes/hooks/queryCommitGraph.tsx", + "src/enterprise/codeintel/indexes/hooks/queryDependencyGraph.tsx", + "src/enterprise/codeintel/indexes/hooks/queryPreciseIndex.tsx", + "src/enterprise/codeintel/indexes/hooks/queryPreciseIndexRetention.tsx", + "src/enterprise/codeintel/indexes/hooks/queryPreciseIndexes.tsx", + "src/enterprise/codeintel/indexes/hooks/types.tsx", + "src/enterprise/codeintel/indexes/hooks/useDeletePreciseIndex.tsx", + "src/enterprise/codeintel/indexes/hooks/useDeletePreciseIndexes.tsx", + "src/enterprise/codeintel/indexes/hooks/useEnqueueIndexJob.tsx", + "src/enterprise/codeintel/indexes/hooks/useReindexPreciseIndex.tsx", + "src/enterprise/codeintel/indexes/hooks/useReindexPreciseIndexes.tsx", + "src/enterprise/codeintel/indexes/pages/CodeIntelPreciseIndexPage.tsx", + "src/enterprise/codeintel/indexes/pages/CodeIntelPreciseIndexesPage.tsx", + "src/enterprise/codeintel/repo/CodeIntelSidebar.tsx", + "src/enterprise/codeintel/repo/RepositoryCodeIntelArea.tsx", + "src/enterprise/codeintel/searchBased.ts", + "src/enterprise/codeintel/sort.ts", + "src/enterprise/codeintel/useCodeIntel.ts", + "src/enterprise/codeintel/useSearchBasedCodeIntel.ts", + "src/enterprise/cody/CodyPage.tsx", + "src/enterprise/cody/GlobalCodyArea.tsx", + "src/enterprise/dotcom/productSubscriptions/AccountEmailAddresses.tsx", + "src/enterprise/dotcom/productSubscriptions/AccountName.tsx", + "src/enterprise/dotcom/productSubscriptions/ProductLicenseValidity.tsx", + "src/enterprise/dotcom/productSubscriptions/ProductSubscriptionLabel.tsx", + "src/enterprise/dotcom/productSubscriptions/ProductSubscriptionNode.tsx", + "src/enterprise/dotcom/productSubscriptions/features.ts", + "src/enterprise/embed/EmbeddedWebApp.tsx", + "src/enterprise/embed/OpenNewTabAnchorLink.tsx", + "src/enterprise/embed/main.tsx", + "src/enterprise/executors/ExecutorsSiteAdminArea.tsx", + "src/enterprise/executors/ExecutorsUserArea.tsx", + "src/enterprise/executors/instances/ExecutorCompatibilityAlert.tsx", + "src/enterprise/executors/instances/ExecutorNode.tsx", + "src/enterprise/executors/instances/ExecutorsListPage.tsx", + "src/enterprise/executors/instances/useExecutors.tsx", + "src/enterprise/executors/secrets/AddSecretModal.tsx", + "src/enterprise/executors/secrets/ExecutorSecretNode.tsx", + "src/enterprise/executors/secrets/ExecutorSecretScopeSelector.tsx", + "src/enterprise/executors/secrets/ExecutorSecretsListPage.tsx", + "src/enterprise/executors/secrets/RemoveSecretModal.tsx", + "src/enterprise/executors/secrets/SecretAccessLogsModal.tsx", + "src/enterprise/executors/secrets/UpdateSecretModal.tsx", + "src/enterprise/executors/secrets/backend.ts", + "src/enterprise/insights/CodeInsightsAppRouter.tsx", + "src/enterprise/insights/CodeInsightsBackendStoryMock.tsx", + "src/enterprise/insights/CodeInsightsRouter.tsx", + "src/enterprise/insights/admin-ui/CodeInsightsJobs.tsx", + "src/enterprise/insights/admin-ui/components/job-actions/CodeInsightsJobsActions.tsx", + "src/enterprise/insights/admin-ui/components/job-actions/index.ts", + "src/enterprise/insights/admin-ui/components/job-card/CodeInsightsJobCard.tsx", + "src/enterprise/insights/admin-ui/components/job-card/index.ts", + "src/enterprise/insights/admin-ui/components/job-filters/CodeInsightsJobsFilters.tsx", + "src/enterprise/insights/admin-ui/components/job-filters/index.ts", + "src/enterprise/insights/admin-ui/query.ts", + "src/enterprise/insights/components/DownloadFileButton.tsx", + "src/enterprise/insights/components/code-insights-page/CodeInsightsPage.tsx", + "src/enterprise/insights/components/code-insights-page/limit-access-banner/CodeInsightsLimitAccessBanner.tsx", + "src/enterprise/insights/components/creation-ui/CodeInsightDashboardsVisibility.tsx", + "src/enterprise/insights/components/creation-ui/code-insight-time-step-picker/CodeInsightTimeStepPicker.tsx", + "src/enterprise/insights/components/creation-ui/code-insight-time-step-picker/get-interval-descrtiption-text/get-interval-description-text.tsx", + "src/enterprise/insights/components/creation-ui/creation-actions/CodeInsightsCreationActions.tsx", + "src/enterprise/insights/components/creation-ui/creation-ui-layout/CreationUiLayout.tsx", + "src/enterprise/insights/components/creation-ui/form-series/FormSeries.tsx", + "src/enterprise/insights/components/creation-ui/form-series/components/form-color-input/FormColorInput.tsx", + "src/enterprise/insights/components/creation-ui/form-series/components/form-series-input/FormSeriesInput.tsx", + "src/enterprise/insights/components/creation-ui/form-series/components/form-series-input/get-pattern-type-filter.ts", + "src/enterprise/insights/components/creation-ui/form-series/components/form-series-input/validators.ts", + "src/enterprise/insights/components/creation-ui/form-series/components/series-card/SeriesCard.tsx", + "src/enterprise/insights/components/creation-ui/form-series/index.ts", + "src/enterprise/insights/components/creation-ui/form-series/types.ts", + "src/enterprise/insights/components/creation-ui/form-series/use-editable-series.ts", + "src/enterprise/insights/components/creation-ui/index.ts", + "src/enterprise/insights/components/creation-ui/insight-repo-section/InsightRepoSection.tsx", + "src/enterprise/insights/components/creation-ui/insight-repo-section/use-repo-fields.ts", + "src/enterprise/insights/components/creation-ui/live-preview/LivePreviewCard.tsx", + "src/enterprise/insights/components/creation-ui/live-preview/constants.ts", + "src/enterprise/insights/components/creation-ui/live-preview/index.ts", + "src/enterprise/insights/components/creation-ui/sanitizers/index.ts", + "src/enterprise/insights/components/creation-ui/sanitizers/repositories.ts", + "src/enterprise/insights/components/creation-ui/sanitizers/series.ts", + "src/enterprise/insights/components/creation-ui/validators/validators.ts", + "src/enterprise/insights/components/form/form-radio-input/FormRadioInput.tsx", + "src/enterprise/insights/components/form/index.ts", + "src/enterprise/insights/components/form/monaco-field/MonacoField.tsx", + "src/enterprise/insights/components/form/monaco-field/MonacoPreviewLink.tsx", + "src/enterprise/insights/components/form/monaco-field/index.ts", + "src/enterprise/insights/components/form/query-input/InsightQueryInput.tsx", + "src/enterprise/insights/components/form/query-input/utils/generate-repo-filters-query.ts", + "src/enterprise/insights/components/form/repositories-field/RepositoriesField.tsx", + "src/enterprise/insights/components/form/repositories-field/RepositoryField.tsx", + "src/enterprise/insights/components/form/repositories-field/components/suggestion-panel/SuggestionPanel.tsx", + "src/enterprise/insights/components/form/repositories-field/hooks/use-repo-suggestions.ts", + "src/enterprise/insights/components/index.ts", + "src/enterprise/insights/components/insights-view-grid/SmartInsightsViewGrid.tsx", + "src/enterprise/insights/components/insights-view-grid/components/InsightContext.ts", + "src/enterprise/insights/components/insights-view-grid/components/SmartInsight.tsx", + "src/enterprise/insights/components/insights-view-grid/components/backend-insight/BackendInsight.tsx", + "src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/backend-insight-alerts/BackendInsightAlerts.tsx", + "src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/backend-insight-chart/BackendInsightChart.tsx", + "src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/drill-down-filters-panel/DrillDownInsightCreationForm.tsx", + "src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/drill-down-filters-panel/drill-down-filters/DrillDownInsightFilters.tsx", + "src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/drill-down-filters-panel/drill-down-filters/utils.ts", + "src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/drill-down-filters-panel/drill-down-filters/validators.ts", + "src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/drill-down-filters-panel/drill-down-input/DrillDownInput.tsx", + "src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/drill-down-filters-panel/filter-collapse-section/FilterCollapseSection.tsx", + "src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/drill-down-filters-panel/index.ts", + "src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/drill-down-filters-panel/search-context/DrillDownSearchContextFilter.tsx", + "src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/drill-down-filters-popover/DrillDownFiltersPopover.tsx", + "src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/index.ts", + "src/enterprise/insights/components/insights-view-grid/components/backend-insight/components/sort-filter-series-panel/SortFilterSeriesPanel.tsx", + "src/enterprise/insights/components/insights-view-grid/components/insight-context-menu/ConfirmRemoveModal.tsx", + "src/enterprise/insights/components/insights-view-grid/components/insight-context-menu/InsightContextMenu.tsx", + "src/enterprise/insights/components/insights-view-grid/components/lang-stats-insight-card/LangStatsInsightCard.tsx", + "src/enterprise/insights/components/insights-view-grid/components/view-grid/ViewGrid.tsx", + "src/enterprise/insights/components/insights-view-grid/components/view-grid/focus-management.ts", + "src/enterprise/insights/components/insights-view-grid/hooks/use-insight-data.ts", + "src/enterprise/insights/components/insights-view-grid/index.ts", + "src/enterprise/insights/components/insights-view-grid/utils/grid-layout-generator.ts", + "src/enterprise/insights/components/limited-access-label/LimitedAccessLabel.tsx", + "src/enterprise/insights/components/modals/ConfirmDeleteModal.tsx", + "src/enterprise/insights/components/modals/ConfirmationModal/ConfirmationModal.tsx", + "src/enterprise/insights/components/modals/ConfirmationModal/index.ts", + "src/enterprise/insights/components/modals/ExportInsightDataModal.tsx", + "src/enterprise/insights/components/modals/ShareLinkModal/ShareLinkModal.tsx", + "src/enterprise/insights/components/modals/ShareLinkModal/get-sharable-insight-info.ts", + "src/enterprise/insights/components/trancated-text/TruncatedText.tsx", + "src/enterprise/insights/components/views/card/InsightCard.tsx", + "src/enterprise/insights/components/views/chart/categorical/CategoricalChart.tsx", + "src/enterprise/insights/components/views/chart/index.ts", + "src/enterprise/insights/components/views/chart/locked/LockedChart.tsx", + "src/enterprise/insights/components/views/chart/series/SeriesChart.tsx", + "src/enterprise/insights/components/views/index.ts", + "src/enterprise/insights/constants.ts", + "src/enterprise/insights/core/backend/code-insights-backend.ts", + "src/enterprise/insights/core/backend/code-insights-backend-context.ts", + "src/enterprise/insights/core/backend/code-insights-backend-types.ts", + "src/enterprise/insights/core/backend/gql-backend/code-insights-gql-backend.ts", + "src/enterprise/insights/core/backend/gql-backend/deserialization/create-insight-view.ts", + "src/enterprise/insights/core/backend/gql-backend/deserialization/field-parsers.ts", + "src/enterprise/insights/core/backend/gql-backend/gql/GetDashboardInsights.ts", + "src/enterprise/insights/core/backend/gql-backend/gql/GetInsightSubjects.ts", + "src/enterprise/insights/core/backend/gql-backend/gql/GetInsightView.ts", + "src/enterprise/insights/core/backend/gql-backend/gql/GetInsights.ts", + "src/enterprise/insights/core/backend/gql-backend/gql/RemoveInsightFromDashboard.ts", + "src/enterprise/insights/core/backend/gql-backend/gql/UpdateLangStatsInsight.ts", + "src/enterprise/insights/core/backend/gql-backend/gql/UpdateLineChartSearchInsight.ts", + "src/enterprise/insights/core/backend/gql-backend/index.ts", + "src/enterprise/insights/core/backend/gql-backend/methods/create-dashboard/create-dashboard.ts", + "src/enterprise/insights/core/backend/gql-backend/methods/create-insight/create-insight.ts", + "src/enterprise/insights/core/backend/gql-backend/methods/create-insight/serializators.ts", + "src/enterprise/insights/core/backend/gql-backend/methods/get-backend-insight-data/deserializators.ts", + "src/enterprise/insights/core/backend/gql-backend/methods/get-dashboard-owners.ts", + "src/enterprise/insights/core/backend/gql-backend/methods/update-dashboard.ts", + "src/enterprise/insights/core/backend/gql-backend/methods/update-insight/serializators.ts", + "src/enterprise/insights/core/backend/gql-backend/methods/update-insight/update-insight.ts", + "src/enterprise/insights/core/backend/gql-backend/utils/get-step-interval.ts", + "src/enterprise/insights/core/backend/gql-backend/utils/insight-polling.ts", + "src/enterprise/insights/core/backend/utils/create-categorical-content.ts", + "src/enterprise/insights/core/backend/utils/create-line-chart-content.ts", + "src/enterprise/insights/core/backend/utils/errors.ts", + "src/enterprise/insights/core/backend/utils/parse-series-metadata.ts", + "src/enterprise/insights/core/hooks/index.ts", + "src/enterprise/insights/core/hooks/live-preview-insight/index.ts", + "src/enterprise/insights/core/hooks/live-preview-insight/types.ts", + "src/enterprise/insights/core/hooks/live-preview-insight/use-live-preview-compute-insight.ts", + "src/enterprise/insights/core/hooks/live-preview-insight/use-live-preview-lang-stats-insight.ts", + "src/enterprise/insights/core/hooks/live-preview-insight/use-live-preview-series-insight.ts", + "src/enterprise/insights/core/hooks/use-insight-dashboards.ts", + "src/enterprise/insights/core/hooks/use-save-insight-as-new-view.ts", + "src/enterprise/insights/core/index.ts", + "src/enterprise/insights/core/types/dashboard/index.ts", + "src/enterprise/insights/core/types/index.ts", + "src/enterprise/insights/core/types/insight/common.ts", + "src/enterprise/insights/core/types/insight/index.ts", + "src/enterprise/insights/core/types/insight/types/capture-group-insight.ts", + "src/enterprise/insights/core/types/insight/types/compute-insight.ts", + "src/enterprise/insights/core/types/insight/types/lang-stat-insight.ts", + "src/enterprise/insights/core/types/insight/types/search-insight.ts", + "src/enterprise/insights/hooks/index.ts", + "src/enterprise/insights/hooks/use-api.ts", + "src/enterprise/insights/hooks/use-copy-url-handler.ts", + "src/enterprise/insights/hooks/use-delete-insight.ts", + "src/enterprise/insights/hooks/use-distinct-value.ts", + "src/enterprise/insights/hooks/use-license.ts", + "src/enterprise/insights/hooks/use-parallel-requests/use-parallel-request.ts", + "src/enterprise/insights/hooks/use-query-parameters.ts", + "src/enterprise/insights/hooks/use-remove-insight.ts", + "src/enterprise/insights/hooks/use-ui-features.ts", + "src/enterprise/insights/index.ts", + "src/enterprise/insights/modals/GaConfirmationModal.tsx", + "src/enterprise/insights/modals/components/MediaCharts.tsx", + "src/enterprise/insights/pages/CodeInsightsRootPage.tsx", + "src/enterprise/insights/pages/all-insights-view/AllInsightsView.tsx", + "src/enterprise/insights/pages/all-insights-view/index.ts", + "src/enterprise/insights/pages/all-insights-view/query.ts", + "src/enterprise/insights/pages/dashboards/creation/InsightsDashboardCreationPage.tsx", + "src/enterprise/insights/pages/dashboards/creation/components/InsightsDashboardCreationContent.tsx", + "src/enterprise/insights/pages/dashboards/dashboard-view/DashboardsView.tsx", + "src/enterprise/insights/pages/dashboards/dashboard-view/components/add-insight-modal/AddInsightModal.tsx", + "src/enterprise/insights/pages/dashboards/dashboard-view/components/add-insight-modal/index.ts", + "src/enterprise/insights/pages/dashboards/dashboard-view/components/add-insight-modal/query.ts", + "src/enterprise/insights/pages/dashboards/dashboard-view/components/add-insight-modal/types.ts", + "src/enterprise/insights/pages/dashboards/dashboard-view/components/dashboard-menu/DashboardMenu.tsx", + "src/enterprise/insights/pages/dashboards/dashboard-view/components/dashboard-select/DashboardSelect.tsx", + "src/enterprise/insights/pages/dashboards/dashboard-view/components/dashboard-select/helpers.ts", + "src/enterprise/insights/pages/dashboards/dashboard-view/components/dashboards-content/DashboardsContent.tsx", + "src/enterprise/insights/pages/dashboards/dashboard-view/components/dashboards-content/components/dashboard-header/DashboardHeader.tsx", + "src/enterprise/insights/pages/dashboards/dashboard-view/components/dashboards-content/components/dashboard-inisghts/DashboardInsights.tsx", + "src/enterprise/insights/pages/dashboards/dashboard-view/components/dashboards-content/components/empty-insight-dashboard/EmptyInsightDashboard.tsx", + "src/enterprise/insights/pages/dashboards/dashboard-view/components/dashboards-content/utils/is-dashboard-configurable.ts", + "src/enterprise/insights/pages/dashboards/dashboard-view/components/delete-dashboard-modal/DeleteDashboardModal.tsx", + "src/enterprise/insights/pages/dashboards/dashboard-view/components/delete-dashboard-modal/hooks/use-delete-dashboard-handler.ts", + "src/enterprise/insights/pages/dashboards/dashboard-view/utils/get-dashboard-permissions.ts", + "src/enterprise/insights/pages/dashboards/edit-dashboard/EditDashobardPage.tsx", + "src/enterprise/insights/pages/insights/creation/CreationRoutes.tsx", + "src/enterprise/insights/pages/insights/creation/InsightCreationPage.tsx", + "src/enterprise/insights/pages/insights/creation/LineChartLivePreview.tsx", + "src/enterprise/insights/pages/insights/creation/capture-group/CaptureGroupCreationPage.tsx", + "src/enterprise/insights/pages/insights/creation/capture-group/components/CaptureGoupCreationForm.tsx", + "src/enterprise/insights/pages/insights/creation/capture-group/components/CaptureGroupCreationContent.tsx", + "src/enterprise/insights/pages/insights/creation/capture-group/components/info-badge/CaptureGroupSeriesInfoBadge.tsx", + "src/enterprise/insights/pages/insights/creation/capture-group/components/query-input/CaptureGroupQueryInput.tsx", + "src/enterprise/insights/pages/insights/creation/capture-group/components/search-query-checks/SearchQueryChecks.tsx", + "src/enterprise/insights/pages/insights/creation/capture-group/components/validators.ts", + "src/enterprise/insights/pages/insights/creation/capture-group/hooks/use-capture-insight-initial-values.ts", + "src/enterprise/insights/pages/insights/creation/capture-group/index.ts", + "src/enterprise/insights/pages/insights/creation/capture-group/types.ts", + "src/enterprise/insights/pages/insights/creation/capture-group/utils/capture-group-insight-sanitizer.ts", + "src/enterprise/insights/pages/insights/creation/capture-group/utils/capture-insigh-url-parsers/capture-insight-url-parsers.ts", + "src/enterprise/insights/pages/insights/creation/capture-group/utils/search-query-validator.ts", + "src/enterprise/insights/pages/insights/creation/compute/ComputeInsightCreationPage.tsx", + "src/enterprise/insights/pages/insights/creation/compute/components/ComputeInsightCreationContent.tsx", + "src/enterprise/insights/pages/insights/creation/compute/components/ComputeInsightMapPicker.tsx", + "src/enterprise/insights/pages/insights/creation/compute/components/ComputeLivePreview.tsx", + "src/enterprise/insights/pages/insights/creation/compute/index.ts", + "src/enterprise/insights/pages/insights/creation/compute/types.ts", + "src/enterprise/insights/pages/insights/creation/compute/utils/insight-sanitaizer.ts", + "src/enterprise/insights/pages/insights/creation/intro/IntroCreationPage.tsx", + "src/enterprise/insights/pages/insights/creation/intro/cards/InsightCards.tsx", + "src/enterprise/insights/pages/insights/creation/lang-stats/LangStatsInsightCreationPage.tsx", + "src/enterprise/insights/pages/insights/creation/lang-stats/components/LangStatsInsightCreationContent.tsx", + "src/enterprise/insights/pages/insights/creation/lang-stats/components/lang-stats-insight-creation-form/LangStatsInsightCreationForm.tsx", + "src/enterprise/insights/pages/insights/creation/lang-stats/components/live-preview-chart/LangStatsInsightLivePreview.tsx", + "src/enterprise/insights/pages/insights/creation/lang-stats/components/live-preview-chart/constants.ts", + "src/enterprise/insights/pages/insights/creation/lang-stats/components/validators.ts", + "src/enterprise/insights/pages/insights/creation/lang-stats/index.ts", + "src/enterprise/insights/pages/insights/creation/lang-stats/types.ts", + "src/enterprise/insights/pages/insights/creation/lang-stats/utils/insight-sanitizer.ts", + "src/enterprise/insights/pages/insights/creation/search-insight/SearchInsightCreationPage.tsx", + "src/enterprise/insights/pages/insights/creation/search-insight/components/SearchInsightCreationContent.tsx", + "src/enterprise/insights/pages/insights/creation/search-insight/components/SearchInsightCreationForm.tsx", + "src/enterprise/insights/pages/insights/creation/search-insight/components/use-insight-creation-form.ts", + "src/enterprise/insights/pages/insights/creation/search-insight/index.ts", + "src/enterprise/insights/pages/insights/creation/search-insight/types.ts", + "src/enterprise/insights/pages/insights/creation/search-insight/utils/insight-sanitizer.ts", + "src/enterprise/insights/pages/insights/creation/search-insight/utils/search-insight-url-parsers/search-insight-url-parsers.ts", + "src/enterprise/insights/pages/insights/creation/search-insight/utils/use-initial-values.ts", + "src/enterprise/insights/pages/insights/creation/search-insight/utils/use-url-query-insight/use-url-query-insight.ts", + "src/enterprise/insights/pages/insights/edit-insight/EditInsightPage.tsx", + "src/enterprise/insights/pages/insights/edit-insight/components/EditCaptureGroupInsight.tsx", + "src/enterprise/insights/pages/insights/edit-insight/components/EditComputeInsight.tsx", + "src/enterprise/insights/pages/insights/edit-insight/components/EditLangStatsInsight.tsx", + "src/enterprise/insights/pages/insights/edit-insight/components/EditSearchInsight.tsx", + "src/enterprise/insights/pages/insights/edit-insight/hooks/use-edit-page-handlers.ts", + "src/enterprise/insights/pages/insights/insight/CodeInsightIndependentPage.tsx", + "src/enterprise/insights/pages/insights/insight/components/SmartStandaloneInsight.tsx", + "src/enterprise/insights/pages/insights/insight/components/actions/CodeInsightIndependentPageActions.tsx", + "src/enterprise/insights/pages/insights/insight/components/context-menu/StandaloneInsightContextMenu.tsx", + "src/enterprise/insights/pages/insights/insight/components/dashboard-pills/StandaloneInsightDashboardPills.tsx", + "src/enterprise/insights/pages/insights/insight/components/standalone-404-insight/Standalone404Insight.tsx", + "src/enterprise/insights/pages/insights/insight/components/standalone-backend-insight/StandaloneBackendInsight.tsx", + "src/enterprise/insights/pages/insights/insight/components/standalone-lang-stats-insight/StandaloneLangStatsInsight.tsx", + "src/enterprise/insights/pages/landing/CodeInsightsLandingPageContext.tsx", + "src/enterprise/insights/pages/landing/dot-com-get-started/CodeInsightsDotComGetStarted.tsx", + "src/enterprise/insights/pages/landing/dot-com-get-started/components/code-insights-examples-picker/CodeInsightsExamplesPicker.tsx", + "src/enterprise/insights/pages/landing/dot-com-get-started/components/code-insights-examples-picker/code-insights-examples-slider/CodeInsightsExamplesSlider.tsx", + "src/enterprise/insights/pages/landing/dot-com-get-started/components/code-insights-examples-picker/examples.ts", + "src/enterprise/insights/pages/landing/getting-started/CodeInsightsGettingStartedPage.tsx", + "src/enterprise/insights/pages/landing/getting-started/components/code-insights-description/CodeInsightsDescription.tsx", + "src/enterprise/insights/pages/landing/getting-started/components/code-insights-examples/CodeInsightsExamples.tsx", + "src/enterprise/insights/pages/landing/getting-started/components/code-insights-examples/code-insight-example-card/CodeInsightExampleCard.tsx", + "src/enterprise/insights/pages/landing/getting-started/components/code-insights-examples/examples.ts", + "src/enterprise/insights/pages/landing/getting-started/components/code-insights-examples/types.ts", + "src/enterprise/insights/pages/landing/getting-started/components/code-insights-query-block/CodeInsightsQueryBlock.tsx", + "src/enterprise/insights/pages/landing/getting-started/components/code-insights-templates/CodeInsightsTemplates.tsx", + "src/enterprise/insights/pages/landing/getting-started/components/code-insights-templates/constants.ts", + "src/enterprise/insights/pages/landing/getting-started/components/dynamic-code-insight-example/DynamicCodeInsightExample.tsx", + "src/enterprise/insights/pages/landing/getting-started/components/dynamic-code-insight-example/DynamicInsightPreview.tsx", + "src/enterprise/insights/pings/index.ts", + "src/enterprise/insights/pings/types.ts", + "src/enterprise/insights/pings/use-code-insight-view-pings.ts", + "src/enterprise/insights/routers.constant.ts", + "src/enterprise/insights/stores/code-insights-license.ts", + "src/enterprise/insights/stores/index.ts", + "src/enterprise/main.tsx", + "src/enterprise/namespaces/navitems.ts", + "src/enterprise/namespaces/routes.ts", + "src/enterprise/organizations/navitems.ts", + "src/enterprise/organizations/routes.tsx", + "src/enterprise/organizations/settings/routes.tsx", + "src/enterprise/organizations/settings/sidebaritems.ts", + "src/enterprise/productSubscription/ExpirationDate.tsx", + "src/enterprise/productSubscription/LicenseGenerationKeyWarning.tsx", + "src/enterprise/productSubscription/ProductCertificate.tsx", + "src/enterprise/productSubscription/ProductLicenseInfoDescription.tsx", + "src/enterprise/productSubscription/ProductLicenseTags.tsx", + "src/enterprise/productSubscription/TrueUpStatusSummary.tsx", + "src/enterprise/repo/enterpriseRepoContainerRoutes.tsx", + "src/enterprise/repo/enterpriseRepoRevisionContainerRoutes.tsx", + "src/enterprise/repo/repoHeaderActionButtons.tsx", + "src/enterprise/repo/settings/RepoSettingsPermissionsPage.tsx", + "src/enterprise/repo/settings/backend.ts", + "src/enterprise/repo/settings/routes.tsx", + "src/enterprise/repo/settings/sidebaritems.ts", + "src/enterprise/routes.tsx", + "src/enterprise/searchContexts/CreateSearchContextPage.tsx", + "src/enterprise/searchContexts/DeleteSearchContextModal.tsx", + "src/enterprise/searchContexts/EditSearchContextPage.tsx", + "src/enterprise/searchContexts/SearchContextForm.tsx", + "src/enterprise/searchContexts/SearchContextNode.tsx", + "src/enterprise/searchContexts/SearchContextOwnerDropdown.tsx", + "src/enterprise/searchContexts/SearchContextPage.tsx", + "src/enterprise/searchContexts/SearchContextRepositoriesFormArea.tsx", + "src/enterprise/searchContexts/SearchContextStarButton.tsx", + "src/enterprise/searchContexts/SearchContextsList.tsx", + "src/enterprise/searchContexts/SearchContextsListPage.tsx", + "src/enterprise/searchContexts/backend.ts", + "src/enterprise/searchContexts/hooks/useDefaultContext.ts", + "src/enterprise/searchContexts/hooks/useToggleSearchContextStar.ts", + "src/enterprise/searchContexts/repositoryRevisionsConfigParser.ts", + "src/enterprise/site-admin/SiteAdminAuthenticationProvidersPage.tsx", + "src/enterprise/site-admin/SiteAdminExternalAccountsPage.tsx", + "src/enterprise/site-admin/SiteAdminLsifUploadPage.tsx", + "src/enterprise/site-admin/backend.ts", + "src/enterprise/site-admin/dotcom/customers/SiteAdminCustomersPage.tsx", + "src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminCreateProductSubscriptionPage.tsx", + "src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminGenerateProductLicenseForSubscriptionForm.tsx", + "src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductLicenseNode.tsx", + "src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductLicensesPage.tsx", + "src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionNode.tsx", + "src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionPage.tsx", + "src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionsPage.tsx", + "src/enterprise/site-admin/dotcom/productSubscriptions/testUtils.ts", + "src/enterprise/site-admin/overview/overviewComponents.ts", + "src/enterprise/site-admin/productSubscription/ProductSubscriptionStatus.tsx", + "src/enterprise/site-admin/productSubscription/SiteAdminProductSubscriptionPage.tsx", + "src/enterprise/site-admin/routes.tsx", + "src/enterprise/site-admin/sidebaritems.ts", + "src/enterprise/user/navitems.ts", + "src/enterprise/user/productSubscriptions/BackToAllSubscriptionsLink.tsx", + "src/enterprise/user/productSubscriptions/UserProductSubscriptionStatus.tsx", + "src/enterprise/user/productSubscriptions/UserSubscriptionsProductSubscriptionPage.tsx", + "src/enterprise/user/productSubscriptions/UserSubscriptionsProductSubscriptionsPage.tsx", + "src/enterprise/user/routes.tsx", + "src/enterprise/user/settings/ExternalAccountNode.tsx", + "src/enterprise/user/settings/UserEventLogsPage.tsx", + "src/enterprise/user/settings/auth/UserSettingsPermissionsPage.tsx", + "src/enterprise/user/settings/auth/backend.ts", + "src/enterprise/user/settings/routes.tsx", + "src/enterprise/user/settings/sidebaritems.ts", + "src/featureFlags/FeatureFlagsProvider.tsx", + "src/featureFlags/MockedFeatureFlagsProvider.tsx", + "src/featureFlags/featureFlags.ts", + "src/featureFlags/lib/FeatureFlagClient.ts", + "src/featureFlags/lib/feature-flag-local-overrides.ts", + "src/featureFlags/lib/parseUrlOverrideFeatureFlags.ts", + "src/featureFlags/useFeatureFlag.ts", + "src/featureFlags/withFeatureFlag.tsx", + "src/fuzzyFinder/AggregateFuzzySearch.ts", + "src/fuzzyFinder/CaseInsensitiveFuzzySearch.ts", + "src/fuzzyFinder/FuzzySearch.ts", + "src/fuzzyFinder/Hasher.ts", + "src/fuzzyFinder/SearchValue.ts", + "src/fuzzyFinder/SearchValueRankingCache.ts", + "src/fuzzyFinder/WordSensitiveFuzzySearch.ts", + "src/global/GlobalAlert.tsx", + "src/global/GlobalAlerts.tsx", + "src/global/Notices.tsx", + "src/globals.d.ts", + "src/hooks/index.ts", + "src/hooks/useHandleSubmitFeedback.ts", + "src/hooks/useRoutesMatch.ts", + "src/hooks/useScrollManager/index.ts", + "src/hooks/useScrollManager/mutationObserverWithTimeout.ts", + "src/hooks/useScrollManager/useScrollManager.ts", + "src/hooks/useUrlSyncedState.ts", + "src/initBuildInfo.ts", + "src/insights/Icons.tsx", + "src/insights/types.ts", + "src/insights/utils/is-code-insights-enabled.ts", + "src/insights/utils/use-series-toggle.ts", + "src/jscontext.ts", + "src/lsif/html.ts", + "src/main.tsx", + "src/marketing/backend.ts", + "src/marketing/components/SurveyRatingRadio.tsx", + "src/marketing/components/SurveyUseCaseForm.tsx", + "src/marketing/components/TweetFeedback.tsx", + "src/marketing/page/SurveyForm.tsx", + "src/marketing/page/SurveyPage.mocks.ts", + "src/marketing/page/SurveyPage.tsx", + "src/marketing/toast/SurveySuccessToast.tsx", + "src/marketing/toast/SurveyToastContent.tsx", + "src/marketing/toast/SurveyToastTrigger.tsx", + "src/marketing/toast/SurveyUseCaseToast.tsx", + "src/marketing/toast/SurveyUserRatingToast.tsx", + "src/marketing/toast/Toast.tsx", + "src/marketing/toast/index.ts", + "src/marketing/util.tsx", + "src/monitoring/index.ts", + "src/monitoring/initMonitoring.ts", + "src/monitoring/opentelemetry/initOpenTelemetry.ts", + "src/monitoring/opentelemetry/initZones.ts", + "src/monitoring/sentry/initSentry.ts", + "src/monitoring/shouldErrorBeReported.ts", + "src/namespaces/NamespaceArea.tsx", + "src/namespaces/index.ts", + "src/namespaces/navitems.ts", + "src/namespaces/routes.tsx", + "src/nav/GlobalNavbar.tsx", + "src/nav/NavBar/NavBar.tsx", + "src/nav/NavBar/NavDropdown.tsx", + "src/nav/NavBar/index.tsx", + "src/nav/StatusMessagesNavItem.mocks.ts", + "src/nav/StatusMessagesNavItem.tsx", + "src/nav/StatusMessagesNavItemQueries.ts", + "src/nav/UserNavItem.tsx", + "src/nav/index.ts", + "src/notebooks/GlobalNotebooksArea.tsx", + "src/notebooks/backend.ts", + "src/notebooks/blocks/NotebookBlock.tsx", + "src/notebooks/blocks/RepoFileSymbolLink.tsx", + "src/notebooks/blocks/file/NotebookFileBlock.tsx", + "src/notebooks/blocks/file/NotebookFileBlockInputs.tsx", + "src/notebooks/blocks/markdown/NotebookMarkdownBlock.tsx", + "src/notebooks/blocks/menu/NotebookBlockMenu.tsx", + "src/notebooks/blocks/menu/useCommonBlockMenuActions.tsx", + "src/notebooks/blocks/query/NotebookQueryBlock.tsx", + "src/notebooks/blocks/suggestions/SearchTypeSuggestionsInput.tsx", + "src/notebooks/blocks/suggestions/suggestions.ts", + "src/notebooks/blocks/symbol/NotebookSymbolBlock.tsx", + "src/notebooks/blocks/symbol/NotebookSymbolBlockInput.tsx", + "src/notebooks/blocks/useIsBlockInputFocused.ts", + "src/notebooks/blocks/useModifierKeyLabel.ts", + "src/notebooks/codemirror-utils.ts", + "src/notebooks/createPage/CreateNotebookPage.tsx", + "src/notebooks/index.ts", + "src/notebooks/listPage/NotebookNode.tsx", + "src/notebooks/listPage/NotebooksGettingStartedTab.tsx", + "src/notebooks/listPage/NotebooksList.tsx", + "src/notebooks/listPage/NotebooksListPage.tsx", + "src/notebooks/listPage/NotebooksListPageHeader.tsx", + "src/notebooks/listPage/NotepadCta.tsx", + "src/notebooks/notebook/NotebookAddBlockButtons.tsx", + "src/notebooks/notebook/NotebookCommandPaletteInput.tsx", + "src/notebooks/notebook/NotebookComponent.tsx", + "src/notebooks/notebook/NotebookOutline.tsx", + "src/notebooks/notebook/index.ts", + "src/notebooks/notebook/useCommandPaletteOptions.tsx", + "src/notebooks/notebook/useNotebookEventHandlers.ts", + "src/notebooks/notebookPage/DeleteNotebookModal.tsx", + "src/notebooks/notebookPage/EmbeddedNotebookPage.tsx", + "src/notebooks/notebookPage/NotebookContent.tsx", + "src/notebooks/notebookPage/NotebookPage.tsx", + "src/notebooks/notebookPage/NotebookPageHeaderActions.tsx", + "src/notebooks/notebookPage/NotebookShareOptionsDropdown.tsx", + "src/notebooks/notebookPage/NotebookTitle.tsx", + "src/notebooks/notebookPage/ShareNotebookModal.tsx", + "src/notebooks/serialize/convertMarkdownToBlocks.ts", + "src/notebooks/serialize/index.ts", + "src/onboarding/AddCodeHostWidget.tsx", + "src/open-in-editor/OpenInEditorActionItem.tsx", + "src/open-in-editor/OpenInEditorPopover.tsx", + "src/open-in-editor/build-url.ts", + "src/open-in-editor/editor-settings.ts", + "src/open-in-editor/editors.ts", + "src/open-in-editor/migrate-legacy-settings.ts", + "src/open-in-editor/useOpenCurrentUrlInEditor.ts", + "src/org/OrgAvatar.tsx", + "src/org/OrgsArea.tsx", + "src/org/area/OrgArea.tsx", + "src/org/area/OrgHeader.tsx", + "src/org/area/OrgInvitationPageLegacy.tsx", + "src/org/area/navitems.ts", + "src/org/area/routes.tsx", + "src/org/backend.ts", + "src/org/index.ts", + "src/org/invitations/OrgInvitationPage.tsx", + "src/org/new/NewOrganizationPage.tsx", + "src/org/settings/DeleteOrg.tsx", + "src/org/settings/DeleteOrgModal.tsx", + "src/org/settings/OrgSettingsArea.tsx", + "src/org/settings/OrgSettingsSidebar.tsx", + "src/org/settings/codeHosts/InstallGitHubAppSuccessPage.tsx", + "src/org/settings/members/InviteForm.tsx", + "src/org/settings/members/OrgSettingsMembersPage.tsx", + "src/org/settings/profile/OrgSettingsProfilePage.tsx", + "src/org/settings/routes.tsx", + "src/org/settings/sidebaritems.ts", + "src/person/PersonLink.tsx", + "src/platform/context.ts", + "src/productSubscription/helpers.ts", + "src/repo/DirectImportRepoAlert.tsx", + "src/repo/FilePathBreadcrumbs.tsx", + "src/repo/GitReference.tsx", + "src/repo/RepoContainer.tsx", + "src/repo/RepoContainerError.tsx", + "src/repo/RepoHeader.tsx", + "src/repo/RepoHeaderContributionPortal.tsx", + "src/repo/RepoRevisionContainer.tsx", + "src/repo/RepoRevisionSidebar.tsx", + "src/repo/RepoRevisionSidebarCommits.tsx", + "src/repo/RepoRevisionSidebarFileTree.tsx", + "src/repo/RepoRevisionSidebarSymbolTree.tsx", + "src/repo/RepoRevisionSidebarSymbols.tsx", + "src/repo/RepositoriesPopover/RepositoriesPopover.mocks.ts", + "src/repo/RepositoriesPopover/RepositoriesPopover.tsx", + "src/repo/RepositoriesPopover/RepositoryNode.tsx", + "src/repo/RepositoriesPopover/index.ts", + "src/repo/RepositoryFileTreePage.tsx", + "src/repo/RepositoryNotFoundPage.tsx", + "src/repo/RevisionsPopover/RevisionsPopover.mocks.ts", + "src/repo/RevisionsPopover/RevisionsPopover.tsx", + "src/repo/RevisionsPopover/RevisionsPopoverCommits.tsx", + "src/repo/RevisionsPopover/RevisionsPopoverReferences.tsx", + "src/repo/RevisionsPopover/RevisionsPopoverTab.tsx", + "src/repo/RevisionsPopover/components/ConnectionPopover/ConnectionPopover.tsx", + "src/repo/RevisionsPopover/components/ConnectionPopover/index.ts", + "src/repo/RevisionsPopover/components/ConnectionPopoverContainer/ConnectionPopoverContainer.tsx", + "src/repo/RevisionsPopover/components/ConnectionPopoverContainer/index.ts", + "src/repo/RevisionsPopover/components/ConnectionPopoverForm/ConnectionPopoverForm.tsx", + "src/repo/RevisionsPopover/components/ConnectionPopoverForm/index.ts", + "src/repo/RevisionsPopover/components/ConnectionPopoverList/ConnectionPopoverList.tsx", + "src/repo/RevisionsPopover/components/ConnectionPopoverList/index.ts", + "src/repo/RevisionsPopover/components/ConnectionPopoverNode/ConnectionPopoverNode.tsx", + "src/repo/RevisionsPopover/components/ConnectionPopoverNode/index.ts", + "src/repo/RevisionsPopover/components/ConnectionPopoverNodeLink/ConnectionPopoverNodeLink.tsx", + "src/repo/RevisionsPopover/components/ConnectionPopoverNodeLink/index.ts", + "src/repo/RevisionsPopover/components/index.ts", + "src/repo/RevisionsPopover/index.ts", + "src/repo/actions/GoToCodeHostAction.tsx", + "src/repo/actions/GoToPermalinkAction.tsx", + "src/repo/actions/ToggleBlameAction.tsx", + "src/repo/backend.ts", + "src/repo/blame/useBlameHunks.ts", + "src/repo/blame/useBlameVisibility.tsx", + "src/repo/blob/BlameColumn.tsx", + "src/repo/blob/BlameDecoration.tsx", + "src/repo/blob/BlameRecency.tsx", + "src/repo/blob/BlobLoadingSpinner.tsx", + "src/repo/blob/BlobPage.tsx", + "src/repo/blob/CodeMirrorBlob.tsx", + "src/repo/blob/GoToRawAction.tsx", + "src/repo/blob/LegacyBlob.tsx", + "src/repo/blob/RenderedFile.tsx", + "src/repo/blob/RenderedNotebookMarkdown.tsx", + "src/repo/blob/actions/ToggleHistoryPanel.tsx", + "src/repo/blob/actions/ToggleLineWrap.tsx", + "src/repo/blob/actions/ToggleRenderedFileMode.tsx", + "src/repo/blob/actions/utils.ts", + "src/repo/blob/backend.ts", + "src/repo/blob/codemirror/blame-decorations.tsx", + "src/repo/blob/codemirror/code-folding.tsx", + "src/repo/blob/codemirror/document-highlights.ts", + "src/repo/blob/codemirror/highlight.ts", + "src/repo/blob/codemirror/hovercard.tsx", + "src/repo/blob/codemirror/index.ts", + "src/repo/blob/codemirror/linenumbers.ts", + "src/repo/blob/codemirror/lock-line.ts", + "src/repo/blob/codemirror/navigate-to-any-line-on-click.ts", + "src/repo/blob/codemirror/occurrence-utils.ts", + "src/repo/blob/codemirror/react-interop.tsx", + "src/repo/blob/codemirror/search.tsx", + "src/repo/blob/codemirror/sourcegraph-extensions.ts", + "src/repo/blob/codemirror/token-selection/code-intel-tooltips.ts", + "src/repo/blob/codemirror/token-selection/decorations.ts", + "src/repo/blob/codemirror/token-selection/definition.ts", + "src/repo/blob/codemirror/token-selection/document-highlights.ts", + "src/repo/blob/codemirror/token-selection/extension.ts", + "src/repo/blob/codemirror/token-selection/keybindings.ts", + "src/repo/blob/codemirror/token-selection/languageSupport.ts", + "src/repo/blob/codemirror/token-selection/modifier-click.ts", + "src/repo/blob/codemirror/token-selection/selections.ts", + "src/repo/blob/codemirror/tooltips/CodeIntelTooltip.tsx", + "src/repo/blob/codemirror/tooltips/LoadingTooltip.ts", + "src/repo/blob/codemirror/tooltips/TemporaryTooltip.tsx", + "src/repo/blob/codemirror/utils.ts", + "src/repo/blob/definitions.ts", + "src/repo/blob/own/FileOwnershipEntry.tsx", + "src/repo/blob/own/FileOwnershipPanel.tsx", + "src/repo/blob/own/HistoryAndOwnBar.tsx", + "src/repo/blob/own/grapqlQueries.ts", + "src/repo/blob/panel/BlobPanel.tsx", + "src/repo/blob/use-blob-store.ts", + "src/repo/branches/RepositoryBranchesAllPage.tsx", + "src/repo/branches/RepositoryBranchesArea.tsx", + "src/repo/branches/RepositoryBranchesNavbar.tsx", + "src/repo/branches/RepositoryBranchesOverviewPage.tsx", + "src/repo/commit/CommitMessageWithLinks.tsx", + "src/repo/commit/DiffModeSelector.tsx", + "src/repo/commit/RepositoryCommitPage.tsx", + "src/repo/commits/GitCommitNode.tsx", + "src/repo/commits/GitCommitNodeByline.tsx", + "src/repo/commits/GitCommitNodeTableRow.tsx", + "src/repo/commits/RepositoryCommitsPage.tsx", + "src/repo/compare/RepositoryCompareArea.tsx", + "src/repo/compare/RepositoryCompareCommitsPage.tsx", + "src/repo/compare/RepositoryCompareDiffPage.tsx", + "src/repo/compare/RepositoryCompareHeader.tsx", + "src/repo/compare/RepositoryCompareOverviewPage.tsx", + "src/repo/compare/RepositoryComparePopover.tsx", + "src/repo/compare/dom-functions.ts", + "src/repo/components/RepoHeaderActions/RepoHeaderActions.tsx", + "src/repo/components/RepoHeaderActions/index.ts", + "src/repo/components/RepoRevision/RepoRevision.tsx", + "src/repo/components/RepoRevision/index.ts", + "src/repo/packages/isPackageServiceType.ts", + "src/repo/releases/RepositoryReleasesArea.tsx", + "src/repo/releases/RepositoryReleasesTagsPage.tsx", + "src/repo/repoContainerRoutes.tsx", + "src/repo/repoHeaderActionButtons.tsx", + "src/repo/repoRevisionContainerRoutes.tsx", + "src/repo/settings/RepoSettingsArea.tsx", + "src/repo/settings/RepoSettingsIndexPage.tsx", + "src/repo/settings/RepoSettingsMirrorPage.tsx", + "src/repo/settings/RepoSettingsOptionsPage.tsx", + "src/repo/settings/RepoSettingsSidebar.tsx", + "src/repo/settings/backend.ts", + "src/repo/settings/components/ActionContainer.tsx", + "src/repo/settings/components/ExternalServiceEntry.tsx", + "src/repo/settings/components/RedirectionAlert.tsx", + "src/repo/settings/routes.ts", + "src/repo/settings/sidebaritems.ts", + "src/repo/stats/RepositoryStatsArea.tsx", + "src/repo/stats/RepositoryStatsContributorsPage.tsx", + "src/repo/tree/TreePage.tsx", + "src/repo/tree/TreePageContent.tsx", + "src/repo/tree/TreePagePanels.tsx", + "src/routes.constants.ts", + "src/routes.tsx", + "src/savedSearches/SavedSearchCreateForm.tsx", + "src/savedSearches/SavedSearchForm.tsx", + "src/savedSearches/SavedSearchListPage.tsx", + "src/savedSearches/SavedSearchModal.tsx", + "src/savedSearches/SavedSearchUpdateForm.tsx", + "src/search/Notepad.tsx", + "src/search/QuickLinks.tsx", + "src/search/SearchConsolePage.tsx", + "src/search/SearchPageWrapper.tsx", + "src/search/backend.tsx", + "src/search/helpers.tsx", + "src/search/home/SearchPage.tsx", + "src/search/home/SearchPageFooter.tsx", + "src/search/home/SearchPageInput.tsx", + "src/search/index.ts", + "src/search/input/SearchNavbarItem.tsx", + "src/search/input/lazy.ts", + "src/search/input/suggestions.ts", + "src/search/input/useRecentSearches.ts", + "src/search/results/ComputeResults.tsx", + "src/search/results/CreateActionsMenu.tsx", + "src/search/results/SearchActionsMenu.tsx", + "src/search/results/SearchAlert.tsx", + "src/search/results/SearchResultsCacheProvider.tsx", + "src/search/results/SearchResultsInfoBar.tsx", + "src/search/results/StreamingSearchResults.tsx", + "src/search/results/components/aggregation/SearchAggregationResult.tsx", + "src/search/results/components/aggregation/components/AggregationLimitLabel.tsx", + "src/search/results/components/aggregation/components/aggregation-chart-card/AggregationChartCard.tsx", + "src/search/results/components/aggregation/components/aggregation-chart-card/components/AggregationChart.tsx", + "src/search/results/components/aggregation/components/aggregation-chart-card/components/AggregationLayouts.tsx", + "src/search/results/components/aggregation/components/aggregation-chart-card/components/index.ts", + "src/search/results/components/aggregation/components/aggregation-mode-controls/AggregationModeControls.tsx", + "src/search/results/components/aggregation/components/index.ts", + "src/search/results/components/aggregation/constants.ts", + "src/search/results/components/aggregation/hooks.ts", + "src/search/results/components/aggregation/index.ts", + "src/search/results/components/aggregation/pings.ts", + "src/search/results/components/aggregation/types.ts", + "src/search/results/createActions.ts", + "src/search/results/searchResultsExport.ts", + "src/search/results/sidebar/Revisions.mocks.ts", + "src/search/results/sidebar/Revisions.tsx", + "src/search/results/sidebar/SearchAggregations.tsx", + "src/search/results/sidebar/SearchFiltersSidebar.tsx", + "src/search/results/sidebar/search-aggregation-types.ts", + "src/search/suggestion/DidYouMean.tsx", + "src/search/suggestion/SmartSearch.tsx", + "src/search/useExperimentalSearchInput.ts", + "src/settings/DynamicallyImportedMonacoSettingsEditor.tsx", + "src/settings/EditorActionsGroup.tsx", + "src/settings/MonacoSettingsEditor.tsx", + "src/settings/SettingsArea.tsx", + "src/settings/SettingsFile.tsx", + "src/settings/SettingsPage.tsx", + "src/settings/tokens/AccessTokenCreatedAlert.tsx", + "src/settings/tokens/AccessTokenNode.tsx", + "src/setup-wizard/SetupWizard.tsx", + "src/setup-wizard/components/ProgressBar.tsx", + "src/setup-wizard/components/remote-repositories-step/RemoteRepositoriesStep.tsx", + "src/setup-wizard/components/remote-repositories-step/components/code-host-delete-modal/CodeHostDeleteModal.tsx", + "src/setup-wizard/components/remote-repositories-step/components/code-host-delete-modal/index.ts", + "src/setup-wizard/components/remote-repositories-step/components/code-host-picker/CodeHostsPicker.tsx", + "src/setup-wizard/components/remote-repositories-step/components/code-host-picker/index.ts", + "src/setup-wizard/components/remote-repositories-step/components/code-hosts/CodeHostCreation.tsx", + "src/setup-wizard/components/remote-repositories-step/components/code-hosts/CodeHostEdit.tsx", + "src/setup-wizard/components/remote-repositories-step/components/code-hosts/common/CodeHostConnection.tsx", + "src/setup-wizard/components/remote-repositories-step/components/code-hosts/common/index.ts", + "src/setup-wizard/components/remote-repositories-step/components/code-hosts/common/radio-group-section/RadioGroupSection.tsx", + "src/setup-wizard/components/remote-repositories-step/components/code-hosts/github/GithubConnectView.tsx", + "src/setup-wizard/components/remote-repositories-step/components/code-hosts/github/GithubEntityPickers.tsx", + "src/setup-wizard/components/remote-repositories-step/components/code-hosts/index.ts", + "src/setup-wizard/components/remote-repositories-step/components/navigation/CodeHostsNavigation.tsx", + "src/setup-wizard/components/remote-repositories-step/components/navigation/index.ts", + "src/setup-wizard/components/remote-repositories-step/helpers.ts", + "src/setup-wizard/components/remote-repositories-step/index.ts", + "src/setup-wizard/components/remote-repositories-step/queries.ts", + "src/setup-wizard/components/setup-steps/SetupSteps.tsx", + "src/setup-wizard/components/setup-steps/index.ts", + "src/setup-wizard/index.ts", + "src/site-admin/AccessRequestsPage/AccessRequestsGlobalNavItem.tsx", + "src/site-admin/AccessRequestsPage/index.tsx", + "src/site-admin/AccessRequestsPage/queries.tsx", + "src/site-admin/RepositoryNode.tsx", + "src/site-admin/SiteAdminAlert.tsx", + "src/site-admin/SiteAdminArea.tsx", + "src/site-admin/SiteAdminBackgroundJobsPage.tsx", + "src/site-admin/SiteAdminConfigurationPage.tsx", + "src/site-admin/SiteAdminCreateUserPage.tsx", + "src/site-admin/SiteAdminExternalServicesArea.tsx", + "src/site-admin/SiteAdminFeatureFlagConfigurationPage.tsx", + "src/site-admin/SiteAdminFeatureFlagsPage.tsx", + "src/site-admin/SiteAdminMigrationsPage.tsx", + "src/site-admin/SiteAdminOrgsPage.tsx", + "src/site-admin/SiteAdminOutboundRequestsPage.tsx", + "src/site-admin/SiteAdminPackagesPage.tsx", + "src/site-admin/SiteAdminPingsPage.tsx", + "src/site-admin/SiteAdminReportBugPage.tsx", + "src/site-admin/SiteAdminRepositoriesContainer.tsx", + "src/site-admin/SiteAdminRepositoriesPage.tsx", + "src/site-admin/SiteAdminSettingsPage.tsx", + "src/site-admin/SiteAdminSidebar.tsx", + "src/site-admin/SiteAdminSlowRequestsPage.tsx", + "src/site-admin/SiteAdminSurveyResponsesPage.tsx", + "src/site-admin/SiteAdminTokensPage.tsx", + "src/site-admin/SiteAdminUpdatesPage.tsx", + "src/site-admin/SiteAdminWebhookCreatePage.tsx", + "src/site-admin/SiteAdminWebhookPage.tsx", + "src/site-admin/SiteAdminWebhookUpdatePage.tsx", + "src/site-admin/SiteAdminWebhooksPage.tsx", + "src/site-admin/UserManagement/components/Calendar/Calendar.tsx", + "src/site-admin/UserManagement/components/Calendar/index.ts", + "src/site-admin/UserManagement/components/DateRangeSelect.tsx", + "src/site-admin/UserManagement/components/Table.tsx", + "src/site-admin/UserManagement/components/UsersList.tsx", + "src/site-admin/UserManagement/components/useUserListActions.tsx", + "src/site-admin/UserManagement/index.tsx", + "src/site-admin/UserManagement/queries.tsx", + "src/site-admin/WebhookCreateUpdatePage.tsx", + "src/site-admin/WebhookInfoLogPageHeader.tsx", + "src/site-admin/WebhookInformation.tsx", + "src/site-admin/WebhookNode.tsx", + "src/site-admin/analytics/AnalyticsBatchChangesPage/index.tsx", + "src/site-admin/analytics/AnalyticsBatchChangesPage/queries.ts", + "src/site-admin/analytics/AnalyticsCodeInsightsPage/index.tsx", + "src/site-admin/analytics/AnalyticsCodeInsightsPage/queries.ts", + "src/site-admin/analytics/AnalyticsCodeIntelPage/index.tsx", + "src/site-admin/analytics/AnalyticsCodeIntelPage/queries.ts", + "src/site-admin/analytics/AnalyticsExtensionsPage/index.tsx", + "src/site-admin/analytics/AnalyticsExtensionsPage/queries.ts", + "src/site-admin/analytics/AnalyticsNotebooksPage/index.tsx", + "src/site-admin/analytics/AnalyticsNotebooksPage/queries.ts", + "src/site-admin/analytics/AnalyticsOverviewPage/DevTimeSaved.tsx", + "src/site-admin/analytics/AnalyticsOverviewPage/Sidebar.tsx", + "src/site-admin/analytics/AnalyticsOverviewPage/index.tsx", + "src/site-admin/analytics/AnalyticsOverviewPage/queries.ts", + "src/site-admin/analytics/AnalyticsSearchPage/index.tsx", + "src/site-admin/analytics/AnalyticsSearchPage/queries.ts", + "src/site-admin/analytics/AnalyticsUsersPage/index.tsx", + "src/site-admin/analytics/AnalyticsUsersPage/queries.ts", + "src/site-admin/analytics/components/AnalyticsPageTitle.tsx", + "src/site-admin/analytics/components/ChartContainer.tsx", + "src/site-admin/analytics/components/HorizontalSelect.tsx", + "src/site-admin/analytics/components/TimeSavedCalculatorGroup.tsx", + "src/site-admin/analytics/components/ToggleSelect.tsx", + "src/site-admin/analytics/components/ValueLegendList.tsx", + "src/site-admin/analytics/useChartFilters.ts", + "src/site-admin/analytics/utils.ts", + "src/site-admin/backend.ts", + "src/site-admin/components/AccountCreatedAlert.tsx", + "src/site-admin/components/ExternalRepositoryIcon.tsx", + "src/site-admin/components/RepoMirrorInfo.tsx", + "src/site-admin/components/SiteAdminPageTitle.tsx", + "src/site-admin/fixtures.ts", + "src/site-admin/flags.ts", + "src/site-admin/init/SiteInitPage.tsx", + "src/site-admin/outbound-webhooks/CreatePage.tsx", + "src/site-admin/outbound-webhooks/EditPage.tsx", + "src/site-admin/outbound-webhooks/OutboundWebhooksPage.tsx", + "src/site-admin/outbound-webhooks/backend.ts", + "src/site-admin/outbound-webhooks/create-edit/EventTypes.tsx", + "src/site-admin/outbound-webhooks/create-edit/SubmitButton.tsx", + "src/site-admin/outbound-webhooks/delete/DeleteButton.tsx", + "src/site-admin/outbound-webhooks/logs/Logs.tsx", + "src/site-admin/outbound-webhooks/logs/backend.ts", + "src/site-admin/permissions-center/PermissionsSyncJobNode.tsx", + "src/site-admin/permissions-center/PermissionsSyncJobsTable.tsx", + "src/site-admin/permissions-center/backend.ts", + "src/site-admin/routes.tsx", + "src/site-admin/sidebaritems.ts", + "src/site-admin/webhooks/MessagePanel.tsx", + "src/site-admin/webhooks/PerformanceGauge.tsx", + "src/site-admin/webhooks/StatusCode.tsx", + "src/site-admin/webhooks/WebhookLogNode.tsx", + "src/site-admin/webhooks/WebhookLogPage.tsx", + "src/site-admin/webhooks/WebhookLogPageHeader.tsx", + "src/site-admin/webhooks/backend.ts", + "src/site-admin/webhooks/story/StyledPerformanceGauge.tsx", + "src/site-admin/webhooks/story/fixtures.ts", + "src/site/DockerForMacAlert.tsx", + "src/site/FreeUsersExceededAlert.tsx", + "src/site/LicenseExpirationAlert.tsx", + "src/site/NeedsRepositoryConfigurationAlert.tsx", + "src/site/backend.ts", + "src/site/index.ts", + "src/staticAppConfig.ts", + "src/stores/index.ts", + "src/stores/navbarSearchQueryState.ts", + "src/stores/notepad.ts", + "src/team/TeamAvatar.tsx", + "src/team/TeamsArea.tsx", + "src/team/area/TeamArea.tsx", + "src/team/area/TeamChildTeamsPage.tsx", + "src/team/area/TeamHeader.tsx", + "src/team/area/TeamMembersPage.tsx", + "src/team/area/TeamProfilePage.tsx", + "src/team/area/backend.ts", + "src/team/backend.ts", + "src/team/index.ts", + "src/team/list/DeleteTeamModal.tsx", + "src/team/list/TeamListPage.tsx", + "src/team/list/TeamNode.tsx", + "src/team/list/backend.ts", + "src/team/members/AddTeamMemberModal.tsx", + "src/team/members/RemoveTeamMemberModal.tsx", + "src/team/members/TeamMemberListPage.tsx", + "src/team/members/TeamMemberNode.tsx", + "src/team/members/backend.ts", + "src/team/members/user-select/UserSelect.tsx", + "src/team/members/user-select/backend.ts", + "src/team/new/NewTeamPage.tsx", + "src/team/new/team-select/ParentTeamSelect.tsx", + "src/team/new/team-select/backend.ts", + "src/tour/GettingStartedTour.tsx", + "src/tour/components/ItemPicker.tsx", + "src/tour/components/Tour/Tour.tsx", + "src/tour/components/Tour/TourAgent.tsx", + "src/tour/components/Tour/TourContent.tsx", + "src/tour/components/Tour/TourInfo.tsx", + "src/tour/components/Tour/TourNewTabLink.tsx", + "src/tour/components/Tour/TourTask.tsx", + "src/tour/components/Tour/context.tsx", + "src/tour/components/Tour/useTour.ts", + "src/tour/components/Tour/utils.tsx", + "src/tour/components/withErrorBoundary.tsx", + "src/tour/data/index.tsx", + "src/tracking/TelemetricLink.tsx", + "src/tracking/eventLogger.ts", + "src/tracking/services/serverAdminWrapper.tsx", + "src/tracking/util.ts", + "src/tree/ChildTreeLayer.tsx", + "src/tree/Directory.tsx", + "src/tree/File.tsx", + "src/tree/SingleChildTreeLayer.tsx", + "src/tree/Tree.tsx", + "src/tree/TreeContext.tsx", + "src/tree/TreeLayer.tsx", + "src/tree/TreeRoot.tsx", + "src/tree/components/TreeLayerCell.tsx", + "src/tree/components/TreeLayerRowContents.tsx", + "src/tree/components/TreeLayerRowContentsText.tsx", + "src/tree/components/TreeLayerTable.tsx", + "src/tree/components/TreeRow.tsx", + "src/tree/components/TreeRowAlert.tsx", + "src/tree/components/TreeRowIcon.tsx", + "src/tree/components/TreeRowLabel.tsx", + "src/tree/components/index.ts", + "src/tree/constants.ts", + "src/tree/util.tsx", + "src/types/fzy.js/index.d.ts", + "src/types/string-score/index.d.ts", + "src/user/area/UserArea.tsx", + "src/user/area/UserAreaHeader.tsx", + "src/user/area/navitems.ts", + "src/user/area/routes.tsx", + "src/user/index.ts", + "src/user/profile/UserProfile.tsx", + "src/user/settings/RedirectToUserPage.tsx", + "src/user/settings/RedirectToUserSettings.tsx", + "src/user/settings/UserSettingsArea.tsx", + "src/user/settings/UserSettingsSidebar.tsx", + "src/user/settings/aboutOrganization/AboutOrganizationPage.tsx", + "src/user/settings/aboutOrganization/index.ts", + "src/user/settings/accessTokens/UserSettingsCreateAccessTokenCallbackPage.tsx", + "src/user/settings/accessTokens/UserSettingsCreateAccessTokenPage.tsx", + "src/user/settings/accessTokens/UserSettingsTokensArea.tsx", + "src/user/settings/accessTokens/UserSettingsTokensPage.tsx", + "src/user/settings/accessTokens/create.ts", + "src/user/settings/auth/AddGerritAccountModal.tsx", + "src/user/settings/auth/ExternalAccount.tsx", + "src/user/settings/auth/ExternalAccountsSignIn.tsx", + "src/user/settings/auth/RemoveExternalAccountModal.tsx", + "src/user/settings/auth/UserSettingsPasswordPage.tsx", + "src/user/settings/auth/UserSettingsSecurityPage.tsx", + "src/user/settings/backend.tsx", + "src/user/settings/cloud-ga.ts", + "src/user/settings/emails/AddUserEmailForm.tsx", + "src/user/settings/emails/SetUserPrimaryEmailForm.tsx", + "src/user/settings/emails/UserEmail.tsx", + "src/user/settings/emails/UserSettingsEmailsPage.tsx", + "src/user/settings/profile/EditUserProfileForm.tsx", + "src/user/settings/profile/UserProfileFormFields.tsx", + "src/user/settings/profile/UserSettingsProfilePage.tsx", + "src/user/settings/research/ProductResearch.tsx", + "src/user/settings/routes.tsx", + "src/user/settings/sidebaritems.ts", + "src/util/checkRequestAccessAllowed.ts", + "src/util/contributions.ts", + "src/util/dom.ts", + "src/util/getReactElements.ts", + "src/util/index.tsx", + "src/util/path.tsx", + "src/util/prettyBytesBigint.ts", + "src/util/security.ts", + "src/util/settings.ts", + "src/util/time.ts", + "src/util/url.ts", + ], + data = [ + ":batch-yaml", + ], + tsconfig = ":tsconfig", + # TODO(bazel): type-only #keep imports + deps = [ + ":graphql_operations", + ":module_style_typings", + ":node_modules/@sourcegraph/branded", + ":node_modules/@sourcegraph/codeintellify", + ":node_modules/@sourcegraph/common", + ":node_modules/@sourcegraph/extension-api-types", #keep + ":node_modules/@sourcegraph/http-client", + ":node_modules/@sourcegraph/observability-client", + ":node_modules/@sourcegraph/shared", + ":node_modules/@sourcegraph/wildcard", + "//:node_modules/@apollo/client", + "//:node_modules/@codemirror/commands", + "//:node_modules/@codemirror/lang-json", + "//:node_modules/@codemirror/lang-markdown", + "//:node_modules/@codemirror/language", + "//:node_modules/@codemirror/search", + "//:node_modules/@codemirror/state", + "//:node_modules/@codemirror/view", + "//:node_modules/@graphiql/react", + "//:node_modules/@lezer/common", #keep + "//:node_modules/@lezer/highlight", + "//:node_modules/@mdi/js", + "//:node_modules/@microsoft/fetch-event-source", + "//:node_modules/@opentelemetry/context-zone", + "//:node_modules/@opentelemetry/exporter-trace-otlp-http", + "//:node_modules/@opentelemetry/instrumentation", + "//:node_modules/@opentelemetry/instrumentation-fetch", + "//:node_modules/@opentelemetry/resources", + "//:node_modules/@opentelemetry/sdk-trace-base", + "//:node_modules/@opentelemetry/semantic-conventions", + "//:node_modules/@reach/accordion", + "//:node_modules/@reach/combobox", + "//:node_modules/@reach/tabs", #keep + "//:node_modules/@reach/visually-hidden", + "//:node_modules/@sentry/browser", #keep + "//:node_modules/@sourcegraph/extension-api-classes", + "//:node_modules/@types/bloomfilter", + "//:node_modules/@types/chrome", #keep + "//:node_modules/@types/classnames", + "//:node_modules/@types/d3-time-format", + "//:node_modules/@types/escape-html", + "//:node_modules/@types/history", + "//:node_modules/@types/js-cookie", + "//:node_modules/@types/js-yaml", + "//:node_modules/@types/lodash", + "//:node_modules/@types/lru-cache", + "//:node_modules/@types/marked", + "//:node_modules/@types/mocha", #keep + "//:node_modules/@types/node", + "//:node_modules/@types/react", + "//:node_modules/@types/react-calendar", + "//:node_modules/@types/react-circular-progressbar", + "//:node_modules/@types/react-dom", + "//:node_modules/@types/react-grid-layout", + "//:node_modules/@types/recharts", + "//:node_modules/@types/semver", + "//:node_modules/@types/uuid", + "//:node_modules/@visx/responsive", + "//:node_modules/@visx/scale", + "//:node_modules/ajv", + "//:node_modules/ajv-formats", + "//:node_modules/bloomfilter", + "//:node_modules/classnames", + "//:node_modules/comlink", #keep + "//:node_modules/copy-to-clipboard", + "//:node_modules/d3-time-format", + "//:node_modules/date-fns", + "//:node_modules/escape-html", + "//:node_modules/fast-json-stable-stringify", + "//:node_modules/focus-visible", + "//:node_modules/fzf", + "//:node_modules/graphiql", + "//:node_modules/graphql", + "//:node_modules/history", + "//:node_modules/http-status-codes", + "//:node_modules/is-absolute-url", + "//:node_modules/js-cookie", + "//:node_modules/js-yaml", + "//:node_modules/jsonc-parser", + "//:node_modules/linguist-languages", + "//:node_modules/lodash", + "//:node_modules/lru-cache", + "//:node_modules/marked", + "//:node_modules/mdi-react", + "//:node_modules/monaco-editor", + "//:node_modules/monaco-yaml", + "//:node_modules/ordinal", + "//:node_modules/pretty-bytes", + "//:node_modules/react", + "//:node_modules/react-calendar", + "//:node_modules/react-circular-progressbar", + "//:node_modules/react-dom", + "//:node_modules/react-grid-layout", + "//:node_modules/react-router-dom", + "//:node_modules/react-spring", + "//:node_modules/react-sticky-box", + "//:node_modules/react-use-websocket", + "//:node_modules/recharts", + "//:node_modules/rxjs", + "//:node_modules/semver", + "//:node_modules/tagged-template-noop", + "//:node_modules/ts-key-enum", + "//:node_modules/use-callback-ref", + "//:node_modules/use-debounce", + "//:node_modules/use-deep-compare-effect", + "//:node_modules/use-resize-observer", + "//:node_modules/utility-types", #keep + "//:node_modules/uuid", + "//:node_modules/wildcard-mock-link", + "//:node_modules/yaml-ast-parser", + "//:node_modules/zustand", + "//client/shared:graphql_operations", + "//schema:schema-json", + ], +) + +ts_project( + name = "web_tests", + testonly = True, + srcs = [ + "src/__mocks__/zustand.ts", + "src/auth/RequestAccessPage.test.tsx", + "src/auth/SignInPage.test.tsx", + "src/auth/SignUpPage.test.tsx", + "src/backend/persistenceMapper.test.ts", + "src/codeintel/ReferencesPanel.test.tsx", + "src/components/ErrorBoundary.test.tsx", + "src/components/FilteredConnection/FilteredConnection.test.tsx", + "src/components/FilteredConnection/hooks/usePageSwitcherPagination.test.tsx", + "src/components/FilteredConnection/hooks/useShowMorePagination.test.tsx", + "src/components/KeyboardShortcutsHelp/KeyboardShortcutsHelp.test.tsx", + "src/components/LoaderButton.test.tsx", + "src/components/branding/BrandLogo.test.tsx", + "src/components/diff/DiffHunk.test.tsx", + "src/components/diff/DiffSplitHunk.test.tsx", + "src/components/diff/DiffStat.test.tsx", + "src/components/externalServices/ExternalServiceForm.test.tsx", + "src/components/fuzzyFinder/FuzzyFinder.test.tsx", + "src/enterprise/batches/MultiSelectContext.test.tsx", + "src/enterprise/batches/batch-spec/yaml-util.test.ts", + "src/enterprise/code-monitoring/CodeMonitoringPage.test.tsx", + "src/enterprise/code-monitoring/CreateCodeMonitorPage.test.tsx", + "src/enterprise/code-monitoring/ManageCodeMonitorPage.test.tsx", + "src/enterprise/code-monitoring/components/CodeMonitorForm.test.tsx", + "src/enterprise/code-monitoring/components/FormActionArea.test.tsx", + "src/enterprise/code-monitoring/components/FormTriggerArea.test.tsx", + "src/enterprise/code-monitoring/components/actions/ActionEditor.test.tsx", + "src/enterprise/code-monitoring/components/actions/EmailAction.test.tsx", + "src/enterprise/code-monitoring/components/actions/SlackWebhookAction.test.tsx", + "src/enterprise/code-monitoring/components/actions/WebhookAction.test.tsx", + "src/enterprise/insights/components/creation-ui/code-insight-time-step-picker/get-interval-descrtiption-text/get-interval-description.text.test.ts", + "src/enterprise/insights/hooks/use-parallel-requests/use-prallel-requests.test.ts", + "src/enterprise/insights/pages/CodeInsightsRootPage.test.tsx", + "src/enterprise/insights/pages/dashboards/dashboard-view/DashboardsContentPage.test.tsx", + "src/enterprise/insights/pages/insights/creation/capture-group/utils/capture-insigh-url-parsers/capture-insight-url-parsers.test.ts", + "src/enterprise/insights/pages/insights/creation/capture-group/utils/search-query-validator.test.ts", + "src/enterprise/insights/pages/insights/creation/search-insight/utils/search-insight-url-parsers/search-insight-url-parsers.test.ts", + "src/enterprise/insights/pages/insights/creation/search-insight/utils/use-url-query-insight/use-url-query-insight.test.ts", + "src/enterprise/searchContexts/SearchContextsList.test.tsx", + "src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminGenerateProductLicenseForSubscriptionForm.test.tsx", + "src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductLicenseNode.test.tsx", + "src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionPage.test.tsx", + "src/enterprise/user/productSubscriptions/UserProductSubscriptionStatus.test.tsx", + "src/enterprise/user/productSubscriptions/UserSubscriptionsProductSubscriptionPage.test.tsx", + "src/featureFlags/lib/FeatureFlagClient.test.ts", + "src/featureFlags/lib/parseUrlOverrideFeatureFlags.test.ts", + "src/featureFlags/useFeatureFlag.test.tsx", + "src/featureFlags/withFeatureFlag.test.tsx", + "src/fuzzyFinder/CaseInsensitiveFuzzySearch.test.ts", + "src/fuzzyFinder/WordSensitiveFuzzySearch.test.ts", + "src/global/Notices.test.tsx", + "src/hooks/useScrollManager/useScrollManager.test.tsx", + "src/hooks/useUrlSyncedState.test.ts", + "src/insights/utils/use-series-toggle.test.tsx", + "src/marketing/page/SurveyPage.test.tsx", + "src/marketing/toast/SurveyToast.test.tsx", + "src/monitoring/shouldErrorBeReported.test.ts", + "src/nav/GlobalNavbar.test.tsx", + "src/nav/StatusMessagesNavItem.test.tsx", + "src/nav/UserNavItem.test.tsx", + "src/notebooks/serialize/convertMarkdownToBlocks.test.ts", + "src/notebooks/serialize/index.test.ts", + "src/open-in-editor/build-url.test.ts", + "src/open-in-editor/migrate-legacy-settings.test.ts", + "src/person/PersonLink.test.tsx", + "src/repo/RepoRevisionSidebarSymbols.test.tsx", + "src/repo/RepositoriesPopover/RepositoriesPopover.test.tsx", + "src/repo/RevisionsPopover/RevisionsPopover.test.tsx", + "src/repo/blob/actions/ToggleRenderedFileMode.test.tsx", + "src/repo/blob/codemirror/document-highlights.test.ts", + "src/repo/blob/codemirror/utils.test.ts", + "src/repo/commits/GitCommitNodeByline.test.tsx", + "src/repo/releases/RepositoryReleasesTagsPage.test.tsx", + "src/search/Notepad.test.tsx", + "src/search/helpers.test.tsx", + "src/search/index.test.ts", + "src/search/input/useRecentSearches.test.tsx", + "src/search/results/SearchResultsInfoBar.test.tsx", + "src/search/results/StreamingSearchResults.test.tsx", + "src/search/results/searchResultsExport.test.ts", + "src/search/results/sidebar/Revisions.test.tsx", + "src/site-admin/SiteAdminMigrationsPage.test.ts", + "src/site-admin/init/SiteInitPage.test.tsx", + "src/site-admin/outbound-webhooks/mocks.ts", + "src/site/LicenseExpirationAlert.test.tsx", + "src/stores/navbarSearchQueryState.test.ts", + "src/stores/notepad.test.ts", + "src/tour/components/Tour/Tour.test.tsx", + "src/tour/components/Tour/useTour.test.tsx", + "src/tracking/util.test.ts", + "src/user/index.test.ts", + "src/user/settings/profile/UserSettingsProfilePage.test.tsx", + "src/user/settings/research/ProductResearch.test.tsx", + "src/util/codeStatsUtils.test.ts", + "src/util/getReactElements.test.tsx", + "src/util/prettyBytesBigint.test.ts", + "src/util/time.test.ts", + "src/util/url.test.ts", + ], + tsconfig = ":tsconfig", + # TODO(bazel): type-only #keep imports + deps = [ + ":graphql_operations", + ":module_style_typings", + ":node_modules/@sourcegraph/common", + ":node_modules/@sourcegraph/http-client", + ":node_modules/@sourcegraph/shared", + ":node_modules/@sourcegraph/testing", + ":node_modules/@sourcegraph/wildcard", + ":web_lib", + "//:node_modules/@apollo/client", + "//:node_modules/@codemirror/state", + "//:node_modules/@codemirror/view", + "//:node_modules/@testing-library/dom", + "//:node_modules/@testing-library/react", + "//:node_modules/@testing-library/react-hooks", #keep + "//:node_modules/@testing-library/user-event", + "//:node_modules/@types/history", + "//:node_modules/@types/lodash", + "//:node_modules/@types/react", + "//:node_modules/@types/react-dom", + "//:node_modules/@types/semver", + "//:node_modules/@types/sinon", + "//:node_modules/date-fns", + "//:node_modules/delay", + "//:node_modules/history", + "//:node_modules/lodash", + "//:node_modules/react", + "//:node_modules/react-dom", + "//:node_modules/react-router-dom", + "//:node_modules/rxjs", + "//:node_modules/semver", + "//:node_modules/sinon", + "//:node_modules/wildcard-mock-link", + "//:node_modules/zustand", + ], +) + +npm_package( + name = "web_pkg", + srcs = [ + "package.json", + ":module_styles", #keep + ":package_styles", #keep + ":web_lib", + ], +) + +jest_test( + name = "test", + data = [ + ":web_tests", + ], + # TODO(bazel): enable when snapshots updated to support pre-compiled .js files + tags = ["manual"], +) + +# webpack dev environment ------------------- +WEBPACK_CONFIG_DEPS = [ + ":node_modules/@sourcegraph/build-config", + "//:node_modules/@pmmmwh/react-refresh-webpack-plugin", + "//:node_modules/@sentry/webpack-plugin", + "//:node_modules/css-loader", + "//:node_modules/style-loader", + "//:node_modules/css-minimizer-webpack-plugin", + "//:node_modules/lodash", + "//:node_modules/mini-css-extract-plugin", + "//:node_modules/path-browserify", + "//:node_modules/punycode", + "//:node_modules/webpack-manifest-plugin", + "//:node_modules/webpack-stats-plugin", + "//:node_modules/monaco-editor", + "//:node_modules/babel-loader", + "//:node_modules/compression-webpack-plugin", + "//:node_modules/webpack", + "//:node_modules/react-refresh", + "//client/web/dev", + "//:node_modules/react-visibility-sensor", # required for https://github.com/joshwnj/react-visibility-sensor/issues/148 workaround + + # HACKS: bundle-time css import + "//:node_modules/open-color", +] + +# Bundled data which was replaced with *.d.ts files at ts compiletime +BUNDLE_DATA_DEPS = [ + ":module_styles", + ":package_styles", +] + +[ + webpack_bundle( + name = "bundle" if prod else "bundle-dev", + srcs = BUNDLE_DATA_DEPS + [ + "//:babel_config", + "//:browserslist", + "//:package_json", + ], + entry_points = { + "src/main.js": "app", + }, + env = { + "NODE_ENV": "production" if prod else "development", + }, + output_dir = True, + webpack_config = "webpack.bazel.config.js", + deps = WEBPACK_CONFIG_DEPS, + ) + for prod in [ + True, + False, + ] +] + +webpack_bundle( + name = "bundle-enterprise", + srcs = BUNDLE_DATA_DEPS + [ + "//:babel_config", + "//:browserslist", + "//:package_json", + ], + entry_points = { + "src/enterprise/main.js": "app", + }, + env = { + "NODE_ENV": "production", + }, + output_dir = True, + webpack_config = "webpack.bazel.config.js", + deps = WEBPACK_CONFIG_DEPS, +) + +webpack_devserver( + name = "devserver", + data = WEBPACK_CONFIG_DEPS + [ + ":module_styles", + ":package_styles", + "//:babel_config", + "//:browserslist", + "//:package_json", + ], + webpack_config = "webpack.bazel.config.js", +) + +build_test( + name = "webpack_test", + targets = [ + ":bundle", + ":bundle-dev", + ], ) diff --git a/client/web/dev/BUILD.bazel b/client/web/dev/BUILD.bazel new file mode 100644 index 00000000000..461c9cc7672 --- /dev/null +++ b/client/web/dev/BUILD.bazel @@ -0,0 +1,63 @@ +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("//dev:defs.bzl", "ts_project") + +# dev/ does not contain a src/ +# gazelle:js_files **/*.{ts,tsx} +# gazelle:js_test_files there-are-no-tests + +# TODO(bazel): wip - currently broken +# gazelle:exclude **/server/development.server.ts + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//client/web:tsconfig", + ], +) + +ts_project( + name = "dev", + srcs = [ + "esbuild/build.ts", + "esbuild/manifestPlugin.ts", + "esbuild/server.ts", + "mocks/mockEventLogger.ts", + "server/production.server.ts", + "utils/constants.ts", + "utils/create-js-context.ts", + "utils/environment-config.ts", + "utils/get-api-proxy-settings.ts", + "utils/get-index-html.ts", + "utils/get-site-config.ts", + "utils/index.ts", + "utils/should-compress-response.ts", + "utils/success-banner.ts", + ], + module = "commonjs", + tsconfig = ":tsconfig", + deps = [ + "//:node_modules/@types/compression", + "//:node_modules/@types/connect-history-api-fallback", + "//:node_modules/@types/express", + "//:node_modules/@types/jest", #keep + "//:node_modules/@types/lodash", + "//:node_modules/@types/node", + "//:node_modules/@types/signale", + "//:node_modules/chalk", + "//:node_modules/compression", + "//:node_modules/connect-history-api-fallback", + "//:node_modules/esbuild", + "//:node_modules/express", + "//:node_modules/express-static-gzip", + "//:node_modules/http-proxy-middleware", + "//:node_modules/jsonc-parser", + "//:node_modules/lodash", + "//:node_modules/signale", + "//:node_modules/webpack", #keep + "//client/web:node_modules/@sourcegraph/build-config", + "//client/web:node_modules/@sourcegraph/common", + "//client/web:web_lib", #keep + ], +) diff --git a/client/web/dev/tsconfig.json b/client/web/dev/tsconfig.json index 6da93044c31..22e4707a9f5 100644 --- a/client/web/dev/tsconfig.json +++ b/client/web/dev/tsconfig.json @@ -3,4 +3,5 @@ "compilerOptions": { "module": "commonjs", }, + "include": ["**/*"], } diff --git a/client/web/src/end-to-end/BUILD.bazel b/client/web/src/end-to-end/BUILD.bazel new file mode 100644 index 00000000000..fed29c29311 --- /dev/null +++ b/client/web/src/end-to-end/BUILD.bazel @@ -0,0 +1,59 @@ +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("//dev:defs.bzl", "ts_project") +load("//dev:mocha.bzl", "mocha_test") + +# end-to-end/ does not contain a src/ +# gazelle:js_files **/*.{ts,tsx} + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:node_modules/@types/mocha", + "//:node_modules/@types/node", + "//client/shared/src/testing:tsconfig", + "//client/web:tsconfig", + "//schema:tsconfig", + ], +) + +ts_project( + name = "end-to-end", + srcs = [ + "utils/cloneRepos.ts", + "utils/initEndToEndTest.ts", + ], + tsconfig = ":tsconfig", + deps = [ + "//:node_modules/@types/mockdate", + "//:node_modules/mockdate", + "//client/web:node_modules/@sourcegraph/shared", + ], +) + +ts_project( + name = "end-to-end_tests", + testonly = True, + srcs = [ + "code-intel/repository-component.test.ts", + "frontend-platform/site-admin.test.ts", + "frontend-platform/theme-switcher.test.ts", + ], + tsconfig = ":tsconfig", + deps = [ + ":end-to-end", + "//:node_modules/@types/lodash", + "//:node_modules/@types/mocha", + "//:node_modules/expect", + "//:node_modules/lodash", + "//:node_modules/mocha", + "//client/web:node_modules/@sourcegraph/shared", + ], +) + +mocha_test( + name = "e2e", + tests = [test.replace(".ts", ".js") for test in glob(["**/*.test.ts"])], + deps = [":end-to-end_tests"], +) diff --git a/client/web/src/integration/BUILD.bazel b/client/web/src/integration/BUILD.bazel new file mode 100644 index 00000000000..89b555ee205 --- /dev/null +++ b/client/web/src/integration/BUILD.bazel @@ -0,0 +1,98 @@ +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("//dev:defs.bzl", "ts_project") + +# integration/ does not contain a src/ +# gazelle:js_files **/*.{ts,tsx} + +# gazelle:js_resolve sourcegraph //client/shared:node_modules/@sourcegraph/client-api + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//client/shared/src/testing:tsconfig", + "//client/web:tsconfig", + ], +) + +ts_project( + name = "integration", + srcs = [ + "context.ts", + "environment.ts", + "graphQlResponseHelpers.ts", + "graphQlResults.ts", + "insights/utils/override-insights-graphql-api.ts", + "jscontext.ts", + "temporarySettingsContext.ts", + "utils.ts", + ], + tsconfig = ":tsconfig", + # TODO(bazel): type-only imports + deps = [ + "//:node_modules/@types/pollyjs__core", #keep + "//:node_modules/puppeteer", #keep + "//client/web:graphql_operations", + "//client/web:node_modules/@sourcegraph/common", + "//client/web:node_modules/@sourcegraph/shared", + "//client/web:web_lib", #keep + "//client/web/dev", + ], +) + +ts_project( + name = "integration_tests", + testonly = True, + srcs = [ + "batches.test.ts", + "blob-viewer.test.ts", + "code-monitoring.test.ts", + "codemirror-blob-view.test.ts", + "commit-page.test.ts", + "insights/create-insights.test.ts", + "insights/dashboards/add-remove-insights.test.ts", + "insights/dashboards/create-dashboard.test.ts", + "insights/dashboards/delete-dashboard.test.ts", + "insights/dashboards/render-empty-dashboard.test.ts", + "insights/dashboards/render-populated-dashboard.test.ts", + "insights/dashboards/update-dashboard.test.ts", + "insights/delete-insights.test.ts", + "insights/drill-down-filters.test.ts", + "insights/edit-search-insights.test.ts", + "insights/fixtures/calculated-insights.ts", + "insights/fixtures/dashboards.ts", + "insights/fixtures/insights-metadata.ts", + "insights/fixtures/runtime-insights.ts", + "insights/insight/dashboard-cards.test.ts", + "insights/insight/insight-chart-focus.test.ts", + "insights/single-insight-page.test.ts", + "insights/utils/mock-helpers.ts", + "nav.test.ts", + "notebook.test.ts", + "org.test.ts", + "profile.test.ts", + "repository.test.ts", + "request-access.test.ts", + "search.test.ts", + "search-aggregation.test.ts", + "search-contexts.test.ts", + "settings.test.ts", + "sign-in.test.ts", + ], + tsconfig = ":tsconfig", + deps = [ + ":integration", + "//:node_modules/@types/lodash", + "//:node_modules/@types/mocha", + "//:node_modules/@types/node", + "//:node_modules/date-fns", + "//:node_modules/delay", + "//:node_modules/expect", + "//:node_modules/lodash", + "//:node_modules/mocha", + "//:node_modules/ts-key-enum", + "//client/web:graphql_operations", + "//client/web:node_modules/@sourcegraph/common", + "//client/web:node_modules/@sourcegraph/shared", + ], +) diff --git a/client/web/src/regression/BUILD.bazel b/client/web/src/regression/BUILD.bazel new file mode 100644 index 00000000000..82df1082987 --- /dev/null +++ b/client/web/src/regression/BUILD.bazel @@ -0,0 +1,78 @@ +load("@aspect_rules_js//js:defs.bzl", "js_library") +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("//dev:defs.bzl", "ts_project") + +# regression/ does not contain a src/ +# gazelle:js_files **/*.{ts,tsx} + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:node_modules/@types/mocha", + "//:node_modules/@types/node", + "//client/shared/src/testing:tsconfig", + "//client/web:tsconfig", + "//schema:tsconfig", + ], +) + +js_library( + name = "graphql_operations_files", + # Keep in sync with glob in client/shared/dev/generateGraphQlOperations.js + srcs = glob(["**/*.*"]), + visibility = ["//client/web:__pkg__"], +) + +ts_project( + name = "regression", + srcs = [ + "util/GraphQlClient.ts", + "util/ScreenshotVerifier.ts", + "util/TestResourceManager.ts", + "util/api.ts", + "util/helpers.ts", + "util/init.ts", + "util/settings.ts", + ], + tsconfig = ":tsconfig", + deps = [ + "//:node_modules/@types/lodash", + "//:node_modules/jsonc-parser", + "//:node_modules/lodash", + "//:node_modules/puppeteer", #keep + "//:node_modules/rxjs", + "//:node_modules/ts-key-enum", + "//client/web:graphql_operations", #keep + "//client/web:node_modules/@sourcegraph/common", + "//client/web:node_modules/@sourcegraph/http-client", + "//client/web:node_modules/@sourcegraph/shared", + ], +) + +ts_project( + name = "regression_tests", + testonly = True, + srcs = [ + "codeintel.test.ts", + "core.test.ts", + "init.test.ts", + "integrations.test.ts", + ], + tsconfig = ":tsconfig", + deps = [ + ":regression", + "//:node_modules/@types/mocha", + "//:node_modules/delay", + "//:node_modules/expect", + "//:node_modules/jsonc-parser", + "//:node_modules/mocha", + "//:node_modules/rxjs", + "//:node_modules/ts-key-enum", + "//client/web:graphql_operations", + "//client/web:node_modules/@sourcegraph/common", + "//client/web:node_modules/@sourcegraph/http-client", + "//client/web:node_modules/@sourcegraph/shared", + ], +) diff --git a/client/web/webpack.bazel.config.js b/client/web/webpack.bazel.config.js new file mode 100644 index 00000000000..94d43e911fe --- /dev/null +++ b/client/web/webpack.bazel.config.js @@ -0,0 +1,296 @@ +// @ts-check + +const path = require('path') + +const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin') +const SentryWebpackPlugin = require('@sentry/webpack-plugin') +const CompressionPlugin = require('compression-webpack-plugin') +const CssMinimizerWebpackPlugin = require('css-minimizer-webpack-plugin') +const mapValues = require('lodash/mapValues') +const MiniCssExtractPlugin = require('mini-css-extract-plugin') +const webpack = require('webpack') +const { WebpackManifestPlugin } = require('webpack-manifest-plugin') +const { StatsWriterPlugin } = require('webpack-stats-plugin') + +const { + ROOT_PATH, + STATIC_ASSETS_PATH, + getBabelLoader, + getCacheConfig, + getMonacoWebpackPlugin, + getBazelCSSLoaders: getCSSLoaders, + getTerserPlugin, + getProvidePlugin, + getCSSModulesLoader, + getMonacoCSSRule, + getMonacoTTFRule, + getBasicCSSLoader, + getStatoscopePlugin, +} = require('@sourcegraph/build-config') + +const { IS_PRODUCTION, IS_DEVELOPMENT, ENVIRONMENT_CONFIG, writeIndexHTMLPlugin } = require('./dev/utils') +// const { isHotReloadEnabled } = require('./src/integration/environment') + +const { + NODE_ENV, + CI: IS_CI, + INTEGRATION_TESTS, + ENTERPRISE, + EMBED_DEVELOPMENT, + ENABLE_SENTRY, + ENABLE_OPEN_TELEMETRY, + SOURCEGRAPH_API_URL, + WEBPACK_BUNDLE_ANALYZER, + WEBPACK_EXPORT_STATS_FILENAME, + WEBPACK_SERVE_INDEX, + WEBPACK_STATS_NAME, + WEBPACK_USE_NAMED_CHUNKS, + WEBPACK_DEVELOPMENT_DEVTOOL, + SENTRY_UPLOAD_SOURCE_MAPS, + COMMIT_SHA, + VERSION, + SENTRY_DOT_COM_AUTH_TOKEN, + SENTRY_ORGANIZATION, + SENTRY_PROJECT, +} = ENVIRONMENT_CONFIG + +const IS_PERSISTENT_CACHE_ENABLED = IS_DEVELOPMENT && !IS_CI +const IS_EMBED_ENTRY_POINT_ENABLED = ENTERPRISE && (IS_PRODUCTION || (IS_DEVELOPMENT && EMBED_DEVELOPMENT)) + +const RUNTIME_ENV_VARIABLES = { + NODE_ENV, + ENABLE_SENTRY, + ENABLE_OPEN_TELEMETRY, + INTEGRATION_TESTS, + COMMIT_SHA, + ...(WEBPACK_SERVE_INDEX && { SOURCEGRAPH_API_URL }), +} + +const hotLoadablePaths = ['branded', 'shared', 'web', 'wildcard'].map(workspace => + path.resolve(ROOT_PATH, 'client', workspace, 'src') +) + +// Third-party npm dependencies that contain jsx syntax +const NPM_JSX = ['react-visibility-sensor/visibility-sensor.js'] + +const enterpriseDirectory = path.resolve(__dirname, 'src', 'enterprise') +const styleLoader = IS_DEVELOPMENT ? 'style-loader' : MiniCssExtractPlugin.loader + +// Used to ensure that we include all initial chunks into the Webpack manifest. +const initialChunkNames = { + react: 'react', + opentelemetry: 'opentelemetry', +} + +/** @type {import('webpack').Configuration} */ +const config = { + context: process.cwd(), + mode: IS_PRODUCTION ? 'production' : 'development', + stats: { + // Minimize logging in case if Webpack is used along with multiple other services. + // Use `normal` output preset in case of running standalone web server. + preset: WEBPACK_SERVE_INDEX || IS_PRODUCTION ? 'normal' : 'errors-warnings', + errorDetails: true, + timings: true, + }, + infrastructureLogging: { + // Controls webpack-dev-server logging level. + level: 'warn', + }, + target: 'browserslist', + // Use cache only in `development` mode to speed up production build. + cache: IS_PERSISTENT_CACHE_ENABLED && getCacheConfig({ invalidateCacheFiles: [] }), + optimization: { + minimize: IS_PRODUCTION, + minimizer: [getTerserPlugin(), new CssMinimizerWebpackPlugin()], + splitChunks: { + cacheGroups: { + [initialChunkNames.react]: { + test: /[/\\]node_modules.*[/\\](react|react-dom)[/\\]/, + name: initialChunkNames.react, + chunks: 'all', + }, + [initialChunkNames.opentelemetry]: { + test: /[/\\]node_modules.*[/\\](@opentelemetry)[/\\]/, + name: initialChunkNames.opentelemetry, + chunks: 'all', + }, + }, + }, + ...(IS_DEVELOPMENT && { + removeAvailableModules: false, + removeEmptyChunks: false, + splitChunks: false, + }), + }, + // entry: { ... SET BY BAZEL RULE ... } + // TODO(bazel): why is this sest by webpack_bundle() but not webpack_dev_server()? + entry: { + app: './client/web/src/main.js', + }, + devServer: { + port: 8080, + }, + output: { + // path: STATIC_ASSETS_PATH, + // Do not [hash] for development -- see https://github.com/webpack/webpack-dev-server/issues/377#issuecomment-241258405 + // Note: [name] will vary depending on the Webpack chunk. If specified, it will use a provided chunk name, otherwise it will fallback to a deterministic id. + filename: + IS_PRODUCTION && !WEBPACK_USE_NAMED_CHUNKS + ? 'scripts/[name].[contenthash].bundle.js' + : 'scripts/[name].bundle.js', + chunkFilename: + IS_PRODUCTION && !WEBPACK_USE_NAMED_CHUNKS ? 'scripts/[name]-[contenthash].chunk.js' : 'scripts/[name].chunk.js', + publicPath: '/.assets/', + globalObject: 'self', + pathinfo: false, + }, + // Inline source maps for integration tests to preserve readable stack traces. + // See related issue here: https://github.com/puppeteer/puppeteer/issues/985 + devtool: IS_PRODUCTION ? (INTEGRATION_TESTS ? 'inline-source-map' : 'source-map') : WEBPACK_DEVELOPMENT_DEVTOOL, + plugins: [ + // Change scss imports to the pre-compiled css files + new webpack.NormalModuleReplacementPlugin(/.*\.scss$/, resource => { + resource.request = resource.request.replace(/\.scss$/, '.css') + }), + + // TODO(bazel): implement *.worker.ts support + new webpack.IgnorePlugin({ + resourceRegExp: /.*\.worker\.ts/, + }), + + new webpack.DefinePlugin({ + 'process.env': mapValues(RUNTIME_ENV_VARIABLES, JSON.stringify), + }), + // TODO(bazel): why does the provide plugin crash? + // getProvidePlugin(), + new MiniCssExtractPlugin({ + // Do not [hash] for development -- see https://github.com/webpack/webpack-dev-server/issues/377#issuecomment-241258405 + filename: + IS_PRODUCTION && !WEBPACK_USE_NAMED_CHUNKS + ? 'styles/[name].[contenthash].bundle.css' + : 'styles/[name].bundle.css', + }), + // getMonacoWebpackPlugin(), + new WebpackManifestPlugin({ + writeToFileEmit: false, + fileName: 'webpack.manifest.json', + seed: { + environment: NODE_ENV, + }, + // Only output files that are required to run the application. + filter: ({ isInitial, name }) => + isInitial || Object.values(initialChunkNames).some(initialChunkName => name?.includes(initialChunkName)), + }), + ...(WEBPACK_SERVE_INDEX && IS_PRODUCTION ? [writeIndexHTMLPlugin] : []), + WEBPACK_BUNDLE_ANALYZER && getStatoscopePlugin(WEBPACK_STATS_NAME), + // isHotReloadEnabled && new ReactRefreshWebpackPlugin({ overlay: false }), + IS_PRODUCTION && + new CompressionPlugin({ + filename: '[path][base].gz', + algorithm: 'gzip', + test: /\.(js|css|svg)$/, + compressionOptions: { + /** Maximum compression level for Gzip */ + level: 9, + }, + }), + IS_PRODUCTION && + new CompressionPlugin({ + filename: '[path][base].br', + algorithm: 'brotliCompress', + test: /\.(js|css|svg)$/, + compressionOptions: { + /** Maximum compression level for Brotli */ + level: 11, + }, + /** + * We get little/no benefits from compressing files that are already under this size. + * We can fall back to dynamic gzip for these. + */ + threshold: 10240, + }), + VERSION && + SENTRY_UPLOAD_SOURCE_MAPS && + new SentryWebpackPlugin({ + silent: true, + org: SENTRY_ORGANIZATION, + project: SENTRY_PROJECT, + authToken: SENTRY_DOT_COM_AUTH_TOKEN, + release: `frontend@${VERSION}`, + include: path.join(STATIC_ASSETS_PATH, 'scripts', '*.map'), + }), + WEBPACK_EXPORT_STATS_FILENAME && + new StatsWriterPlugin({ + filename: WEBPACK_EXPORT_STATS_FILENAME, + stats: { + all: false, // disable all the stats + hash: true, // compilation hash + entrypoints: true, + chunks: true, + chunkModules: true, // modules + ids: true, // IDs of modules and chunks (webpack 5) + cachedAssets: true, // information about the cached assets (webpack 5) + nestedModules: true, // concatenated modules + usedExports: true, + assets: true, + chunkOrigins: true, // chunks origins stats (to find out which modules require a chunk) + timings: true, // modules timing information + performance: true, // info about oversized assets + }, + }), + ].filter(Boolean), + resolve: { + extensions: ['.mjs', '.jsx', '.js', '.json'], + mainFields: ['es2015', 'module', 'browser', 'main'], + fallback: { + path: require.resolve('path-browserify'), + punycode: require.resolve('punycode'), + util: require.resolve('util'), + }, + alias: { + // react-visibility-sensor's main field points to a UMD bundle instead of ESM + // https://github.com/joshwnj/react-visibility-sensor/issues/148 + 'react-visibility-sensor': require.resolve('react-visibility-sensor').replace('/dist/', '/'), + }, + }, + module: { + rules: [ + // Some third-party deps need jsx transpiled still + { + test: new RegExp('node_modules/' + NPM_JSX.join('|')), + use: [{ loader: require.resolve('babel-loader') }], + }, + { + test: /\.m?js$/, + type: 'javascript/auto', + resolve: { + // Allow importing without file extensions + // https://webpack.js.org/configuration/module/#resolvefullyspecified + fullySpecified: false, + }, + }, + // TODO(bazel): why is this required when it is supposedly enabled by default? + { + test: /\.json$/, + type: 'json', + }, + { + test: /\.css$/, + // CSS Modules loaders are only applied when the file is explicitly named as CSS module stylesheet using the extension `.module.scss`. + include: /\.module\.css$/, + use: getCSSLoaders(styleLoader, getCSSModulesLoader({ sourceMap: IS_DEVELOPMENT })), + }, + { + test: /\.css$/, + exclude: /\.module\.css$/, + use: getCSSLoaders(styleLoader, getBasicCSSLoader()), + }, + getMonacoTTFRule(), + { test: /\.ya?ml$/, type: 'asset/source' }, + { test: /\.(png|woff2)$/, type: 'asset/resource' }, + ], + }, +} + +module.exports = config diff --git a/client/wildcard/BUILD.bazel b/client/wildcard/BUILD.bazel index 091faa16e7c..79f502cd1e9 100644 --- a/client/wildcard/BUILD.bazel +++ b/client/wildcard/BUILD.bazel @@ -1,6 +1,27 @@ load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin") +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") +load("@npm//:defs.bzl", "npm_link_all_packages") +load("//dev:defs.bzl", "jest_test", "npm_package", "sass", "ts_project") load("//client/shared/dev:tools.bzl", "module_style_typings") -load("//dev:defs.bzl", "sass") + +# TODO(bazel): storybook build +# gazelle:exclude **/*.story.{ts,tsx} + +# gazelle:js_resolve **/*.module.scss :module_style_typings +# gazelle:js_ignore_imports **/global-styles/index.scss + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + "//client/common:tsconfig", + "//client/testing:tsconfig", + ], +) + +npm_link_all_packages(name = "node_modules") module_style_typings( name = "module_style_typings", @@ -8,7 +29,6 @@ module_style_typings( ":sass-breakpoints", "//:node_modules/@reach/dialog", "//:node_modules/@reach/tabs", - "//:node_modules/open-color", ], ) @@ -70,3 +90,463 @@ copy_to_bin( srcs = SASS_UTILS, visibility = ["//visibility:public"], ) + +ts_project( + name = "wildcard_lib", + srcs = [ + "globals.d.ts", + "src/components/Alert/Alert.tsx", + "src/components/Alert/AlertLink.tsx", + "src/components/Alert/constants.ts", + "src/components/Alert/index.ts", + "src/components/Alert/utils.ts", + "src/components/Badge/Badge.tsx", + "src/components/Badge/ProductStatusBadge.tsx", + "src/components/Badge/constants.ts", + "src/components/Badge/index.ts", + "src/components/BeforeUnloadPrompt/BeforeUnloadPrompt.tsx", + "src/components/BeforeUnloadPrompt/index.ts", + "src/components/Button/Button.tsx", + "src/components/Button/ButtonGroup.tsx", + "src/components/Button/constants.ts", + "src/components/Button/index.ts", + "src/components/Button/story/ButtonVariants.tsx", + "src/components/Button/utils.ts", + "src/components/ButtonLink/ButtonLink.tsx", + "src/components/ButtonLink/index.ts", + "src/components/Card/Card.tsx", + "src/components/Card/components/CardBody.tsx", + "src/components/Card/components/CardFooter.tsx", + "src/components/Card/components/CardHeader.tsx", + "src/components/Card/components/CardList.tsx", + "src/components/Card/components/CardSubtitle.tsx", + "src/components/Card/components/CardText.tsx", + "src/components/Card/components/CardTitle.tsx", + "src/components/Card/components/index.ts", + "src/components/Card/constants.ts", + "src/components/Card/index.ts", + "src/components/Charts/components/bar-chart/BarChart.tsx", + "src/components/Charts/components/bar-chart/BarChartContent.tsx", + "src/components/Charts/components/bar-chart/components/GroupedBars.tsx", + "src/components/Charts/components/bar-chart/components/StackedBars.tsx", + "src/components/Charts/components/bar-chart/components/TooltipContent.tsx", + "src/components/Charts/components/bar-chart/index.ts", + "src/components/Charts/components/bar-chart/types.ts", + "src/components/Charts/components/bar-chart/utils/get-grouped-categories.ts", + "src/components/Charts/components/line-chart/LineChart.tsx", + "src/components/Charts/components/line-chart/LineChartContent.tsx", + "src/components/Charts/components/line-chart/components/LineDataSeries.tsx", + "src/components/Charts/components/line-chart/components/PointGlyph.tsx", + "src/components/Charts/components/line-chart/components/index.ts", + "src/components/Charts/components/line-chart/components/legend-list/LegendList.tsx", + "src/components/Charts/components/line-chart/components/stacked-area/StackedArea.tsx", + "src/components/Charts/components/line-chart/components/stacked-area/get-stacked-area-paths.ts", + "src/components/Charts/components/line-chart/components/tooltip/TooltipContent.tsx", + "src/components/Charts/components/line-chart/components/tooltip/index.ts", + "src/components/Charts/components/line-chart/components/tooltip/utils/get-list-window.ts", + "src/components/Charts/components/line-chart/event-helpers.ts", + "src/components/Charts/components/line-chart/index.ts", + "src/components/Charts/components/line-chart/keyboard-navigation.ts", + "src/components/Charts/components/line-chart/types.ts", + "src/components/Charts/components/line-chart/utils/colors.ts", + "src/components/Charts/components/line-chart/utils/data-guards.ts", + "src/components/Charts/components/line-chart/utils/data-series-processing/get-series-data.ts", + "src/components/Charts/components/line-chart/utils/data-series-processing/get-stacked-series-data.ts", + "src/components/Charts/components/line-chart/utils/data-series-processing/helpers.ts", + "src/components/Charts/components/line-chart/utils/data-series-processing/index.ts", + "src/components/Charts/components/line-chart/utils/data-series-processing/types.ts", + "src/components/Charts/components/line-chart/utils/generate-points-field.ts", + "src/components/Charts/components/line-chart/utils/get-chart-content-sizes.ts", + "src/components/Charts/components/line-chart/utils/get-min-max-boundary.ts", + "src/components/Charts/components/line-chart/utils/index.ts", + "src/components/Charts/components/pie-chart/PieChart.tsx", + "src/components/Charts/components/pie-chart/components/PieArc.tsx", + "src/components/Charts/components/pie-chart/index.ts", + "src/components/Charts/components/stacked-meter/StackedMeter.tsx", + "src/components/Charts/components/stacked-meter/index.ts", + "src/components/Charts/constants.ts", + "src/components/Charts/core/components/MaybeLink.tsx", + "src/components/Charts/core/components/SvgRoot.tsx", + "src/components/Charts/core/components/axis/Axis.tsx", + "src/components/Charts/core/components/axis/Tick.tsx", + "src/components/Charts/core/components/axis/tick-formatters.ts", + "src/components/Charts/core/components/scroll-box/ScrollBox.tsx", + "src/components/Charts/core/components/scroll-box/index.ts", + "src/components/Charts/core/components/tooltip/Tooltip.tsx", + "src/components/Charts/core/index.ts", + "src/components/Charts/index.ts", + "src/components/Charts/types.ts", + "src/components/Collapse/Collapse.tsx", + "src/components/Collapse/index.ts", + "src/components/Combobox/Combobox.tsx", + "src/components/Combobox/MultiCombobox.tsx", + "src/components/Combobox/index.ts", + "src/components/Container/Container.tsx", + "src/components/Container/index.ts", + "src/components/ErrorAlert/ErrorAlert.tsx", + "src/components/ErrorAlert/index.ts", + "src/components/ErrorMessage/ErrorMessage.tsx", + "src/components/ErrorMessage/index.ts", + "src/components/Feedback/FeedbackBadge/FeedbackBadge.tsx", + "src/components/Feedback/FeedbackBadge/constant.ts", + "src/components/Feedback/FeedbackBadge/index.ts", + "src/components/Feedback/FeedbackPrompt/FeedbackPrompt.tsx", + "src/components/Feedback/FeedbackPrompt/index.ts", + "src/components/Feedback/FeedbackText/FeedbackText.tsx", + "src/components/Feedback/FeedbackText/index.ts", + "src/components/Feedback/index.ts", + "src/components/Form/Checkbox/Checkbox.tsx", + "src/components/Form/Checkbox/index.tsx", + "src/components/Form/FlexTextArea/FlexTextArea.tsx", + "src/components/Form/FlexTextArea/index.ts", + "src/components/Form/Form/Form.tsx", + "src/components/Form/Form/getDefaultInputProps.ts", + "src/components/Form/Form/hooks/index.ts", + "src/components/Form/Form/hooks/useCheckboxes.ts", + "src/components/Form/Form/hooks/useField.ts", + "src/components/Form/Form/hooks/useForm.ts", + "src/components/Form/Form/hooks/utils/get-event-value.ts", + "src/components/Form/Form/hooks/utils/use-async-validation.ts", + "src/components/Form/Form/hooks/validators.ts", + "src/components/Form/Form/index.ts", + "src/components/Form/FormGroup/FormGroup.tsx", + "src/components/Form/FormGroup/index.ts", + "src/components/Form/Input/Input.tsx", + "src/components/Form/Input/index.tsx", + "src/components/Form/Input/utils/getInputStatus.ts", + "src/components/Form/LoaderInput/LoaderInput.tsx", + "src/components/Form/LoaderInput/index.ts", + "src/components/Form/RadioButton/RadioButton.tsx", + "src/components/Form/RadioButton/index.tsx", + "src/components/Form/Select/Select.tsx", + "src/components/Form/Select/index.ts", + "src/components/Form/TextArea/TextArea.tsx", + "src/components/Form/TextArea/index.ts", + "src/components/Form/index.ts", + "src/components/Form/internal/AccessibleFieldType.ts", + "src/components/Form/internal/BaseControlInput.tsx", + "src/components/Form/internal/FormFieldLabel.tsx", + "src/components/Form/internal/FormFieldMessage.tsx", + "src/components/Form/internal/utils.ts", + "src/components/Grid/Grid.tsx", + "src/components/Grid/index.tsx", + "src/components/Icon/Icon.tsx", + "src/components/Icon/constants.ts", + "src/components/Icon/index.ts", + "src/components/Link/AnchorLink/AnchorLink.tsx", + "src/components/Link/AnchorLink/index.ts", + "src/components/Link/Link/Link.tsx", + "src/components/Link/Link/index.ts", + "src/components/Link/LinkOrSpan/LinkOrSpan.tsx", + "src/components/Link/LinkOrSpan/index.ts", + "src/components/Link/RouterLink/RouterLink.tsx", + "src/components/Link/RouterLink/index.ts", + "src/components/Link/createLinkUrl.tsx", + "src/components/Link/index.ts", + "src/components/LoadingSpinner/LoadingSpinner.tsx", + "src/components/LoadingSpinner/index.ts", + "src/components/Markdown/Markdown.tsx", + "src/components/Markdown/index.ts", + "src/components/Menu/Menu.tsx", + "src/components/Menu/MenuButton.tsx", + "src/components/Menu/MenuDisabledItem.tsx", + "src/components/Menu/MenuDivider.tsx", + "src/components/Menu/MenuHeader.tsx", + "src/components/Menu/MenuItem.tsx", + "src/components/Menu/MenuLink.tsx", + "src/components/Menu/MenuList.tsx", + "src/components/Menu/MenuText.tsx", + "src/components/Menu/index.ts", + "src/components/Modal/Modal.tsx", + "src/components/Modal/constants.ts", + "src/components/Modal/index.ts", + "src/components/NavMenu/NavMenu.tsx", + "src/components/NavMenu/index.ts", + "src/components/PageHeader/Breadcrumb/Breadcrumb.tsx", + "src/components/PageHeader/Breadcrumb/index.ts", + "src/components/PageHeader/Heading/Heading.tsx", + "src/components/PageHeader/Heading/index.ts", + "src/components/PageHeader/PageHeader.tsx", + "src/components/PageHeader/index.ts", + "src/components/PageSelector/PageSelector.tsx", + "src/components/PageSelector/index.tsx", + "src/components/PageSwitcher/PageSwitcher.tsx", + "src/components/PageSwitcher/index.tsx", + "src/components/Panel/Panel.tsx", + "src/components/Panel/constants.ts", + "src/components/Panel/index.ts", + "src/components/Panel/story/TabbedPanelContent.fixtures.ts", + "src/components/Panel/useResizablePanel.ts", + "src/components/Panel/utils.ts", + "src/components/Popover/Popover.tsx", + "src/components/Popover/components/PopoverTrigger.tsx", + "src/components/Popover/components/floating-panel/FloatingPanel.tsx", + "src/components/Popover/components/popover-content/PopoverContent.tsx", + "src/components/Popover/components/popover-content/index.ts", + "src/components/Popover/components/popover-tail/PopoverTail.tsx", + "src/components/Popover/components/popover-tail/index.ts", + "src/components/Popover/contexts/internal-context.ts", + "src/components/Popover/contexts/public-context.ts", + "src/components/Popover/index.ts", + "src/components/Popover/tether/index.ts", + "src/components/Popover/tether/models/geometry/point.ts", + "src/components/Popover/tether/models/geometry/rectangle.ts", + "src/components/Popover/tether/models/tether-models.ts", + "src/components/Popover/tether/services/geometry/actions/get-constrained-element.ts", + "src/components/Popover/tether/services/geometry/actions/get-element-constraints.ts", + "src/components/Popover/tether/services/geometry/actions/get-elements-intersection.ts", + "src/components/Popover/tether/services/geometry/actions/get-extended-constraint.ts", + "src/components/Popover/tether/services/geometry/actions/get-joined-element.ts", + "src/components/Popover/tether/services/geometry/actions/get-target-element.ts", + "src/components/Popover/tether/services/geometry/actions/rectangle-position-helpers.ts", + "src/components/Popover/tether/services/geometry/actions/tooltip-marker-utils.ts", + "src/components/Popover/tether/services/geometry/constants.ts", + "src/components/Popover/tether/services/geometry/index.ts", + "src/components/Popover/tether/services/tether-browser.ts", + "src/components/Popover/tether/services/tether-layout.ts", + "src/components/Popover/tether/services/tether-position.ts", + "src/components/Popover/tether/services/tether-registry.ts", + "src/components/Popover/tether/services/tether-render.ts", + "src/components/Popover/tether/services/tether-state.ts", + "src/components/Popover/tether/services/types.ts", + "src/components/Popover/types.ts", + "src/components/SourcegraphIcon/SourcegraphIcon.tsx", + "src/components/SourcegraphIcon/index.ts", + "src/components/Tabs/Tabs.tsx", + "src/components/Tabs/context.ts", + "src/components/Tabs/index.ts", + "src/components/Tabs/useScrollBackToActive.ts", + "src/components/Tabs/useShouldPanelRender.ts", + "src/components/Tooltip/Tooltip.tsx", + "src/components/Tooltip/index.ts", + "src/components/Tree/Tree.tsx", + "src/components/Tree/index.ts", + "src/components/Tree/react-accessible-treeview/index.tsx", + "src/components/Tree/react-accessible-treeview/utils.ts", + "src/components/Typography/Code/Code.tsx", + "src/components/Typography/Code/index.ts", + "src/components/Typography/Heading/H1.tsx", + "src/components/Typography/Heading/H2.tsx", + "src/components/Typography/Heading/H3.tsx", + "src/components/Typography/Heading/H4.tsx", + "src/components/Typography/Heading/H5.tsx", + "src/components/Typography/Heading/H6.tsx", + "src/components/Typography/Heading/Heading.tsx", + "src/components/Typography/Heading/index.ts", + "src/components/Typography/Label/Label.tsx", + "src/components/Typography/Label/index.ts", + "src/components/Typography/Label/utils.ts", + "src/components/Typography/Text/Text.tsx", + "src/components/Typography/Text/index.ts", + "src/components/Typography/constants.ts", + "src/components/Typography/index.ts", + "src/components/Typography/utils.ts", + "src/components/index.ts", + "src/global-styles/GlobalStylesStory/ColorVariants/ColorVariants.tsx", + "src/global-styles/GlobalStylesStory/ColorVariants/index.ts", + "src/global-styles/GlobalStylesStory/FormFieldVariants/FormFieldVariants.tsx", + "src/global-styles/GlobalStylesStory/FormFieldVariants/index.ts", + "src/global-styles/GlobalStylesStory/TextVariants/TextVariants.tsx", + "src/global-styles/GlobalStylesStory/TextVariants/index.ts", + "src/global-styles/GlobalStylesStory/constants.ts", + "src/global-styles/GlobalStylesStory/utils.ts", + "src/hooks/index.ts", + "src/hooks/useAccordion.ts", + "src/hooks/useAutoFocus.ts", + "src/hooks/useControlledState.ts", + "src/hooks/useDebounce.ts", + "src/hooks/useDeepMemo.ts", + "src/hooks/useElementObscuredArea.ts", + "src/hooks/useFocusOnLoadedMore.ts", + "src/hooks/useInterval.ts", + "src/hooks/useIsMounted.ts", + "src/hooks/useIsTruncated.ts", + "src/hooks/useKeyboard.ts", + "src/hooks/useLocalStorage.ts", + "src/hooks/useMatchMedia.ts", + "src/hooks/useMeasure.ts", + "src/hooks/useObservable.ts", + "src/hooks/useOffsetPagination.ts", + "src/hooks/useOnClickOutside.ts", + "src/hooks/usePrompt.tsx", + "src/hooks/useSearchParameters.ts", + "src/hooks/useSessionStorage.ts", + "src/hooks/useStopwatch.ts", + "src/hooks/useStorageHook.ts", + "src/hooks/useTimeoutManager.ts", + "src/hooks/useUpdateEffect.ts", + "src/hooks/useWildcardTheme.tsx", + "src/hooks/useWindowSize.ts", + "src/index.ts", + "src/stories/BrandedStory.tsx", + "src/stories/hooks/index.ts", + "src/stories/hooks/useChromaticTheme.ts", + "src/stories/hooks/usePrependStyles.ts", + "src/stories/hooks/useStorybookTheme.ts", + "src/stories/index.ts", + "src/stories/utils/isChromatic.ts", + "src/testing/index.ts", + "src/testing/render-with-branded-context.tsx", + "src/types.ts", + "src/utils/index.ts", + "src/utils/linkClickHandler.ts", + "src/utils/screenReaderAnnounce.ts", + "src/viewports.ts", + ], + data = [ + ":global-styles", + ], + tsconfig = ":tsconfig", + deps = [ + ":module_style_typings", + ":node_modules/@sourcegraph/common", + "//:node_modules/@mdi/js", + "//:node_modules/@reach/auto-id", + "//:node_modules/@reach/combobox", + "//:node_modules/@reach/dialog", + "//:node_modules/@reach/menu-button", + "//:node_modules/@reach/tabs", + "//:node_modules/@reach/visually-hidden", + "//:node_modules/@react-aria/live-announcer", + "//:node_modules/@testing-library/react", + "//:node_modules/@types/classnames", + "//:node_modules/@types/d3-format", + "//:node_modules/@types/d3-scale", #keep + "//:node_modules/@types/d3-shape", #keep + "//:node_modules/@types/d3-time-format", + "//:node_modules/@types/d3-voronoi", #keep + "//:node_modules/@types/history", #keep + "//:node_modules/@types/lodash", + "//:node_modules/@types/node", #keep + "//:node_modules/@types/react", + "//:node_modules/@types/react-dom", + "//:node_modules/@types/uuid", + "//:node_modules/@visx/annotation", + "//:node_modules/@visx/axis", + "//:node_modules/@visx/event", + "//:node_modules/@visx/glyph", + "//:node_modules/@visx/grid", + "//:node_modules/@visx/group", + "//:node_modules/@visx/responsive", + "//:node_modules/@visx/scale", + "//:node_modules/@visx/shape", + "//:node_modules/@visx/text", #keep + "//:node_modules/@visx/voronoi", + "//:node_modules/chromatic", + "//:node_modules/classnames", + "//:node_modules/d3-format", + "//:node_modules/d3-scale", #keep + "//:node_modules/d3-shape", #keep + "//:node_modules/d3-time-format", + "//:node_modules/d3-voronoi", #keep + "//:node_modules/history", #keep + "//:node_modules/is-absolute-url", + "//:node_modules/lodash", + "//:node_modules/mdi-react", + "//:node_modules/react", + "//:node_modules/react-dom", + "//:node_modules/react-focus-lock", + "//:node_modules/react-router-dom", + "//:node_modules/react-spring", + "//:node_modules/rxjs", + "//:node_modules/storybook-addon-designs", + "//:node_modules/storybook-dark-mode", + "//:node_modules/ts-key-enum", + "//:node_modules/use-callback-ref", + "//:node_modules/use-resize-observer", + "//:node_modules/utility-types", #keep + "//:node_modules/uuid", + ], +) + +ts_project( + name = "wildcard_tests", + testonly = True, + srcs = [ + "src/components/Alert/Alert.test.tsx", + "src/components/Button/Button.test.tsx", + "src/components/ButtonLink/ButtonLink.test.tsx", + "src/components/Card/Card.test.tsx", + "src/components/Charts/components/line-chart/LineChart.test.tsx", + "src/components/Charts/components/line-chart/components/tooltip/utils/get-list-window.test.ts", + "src/components/Charts/components/line-chart/story/mocks.ts", + "src/components/Charts/components/line-chart/utils/data-series-processing/get-series-data.test.ts", + "src/components/Charts/components/line-chart/utils/get-min-max-boundary.test.ts", + "src/components/Charts/components/stacked-meter/StackedMeter.test.tsx", + "src/components/Collapse/Collapse.test.tsx", + "src/components/ErrorAlert/ErrorAlert.test.tsx", + "src/components/Feedback/FeedbackBadge/FeedbackBadge.test.tsx", + "src/components/Feedback/FeedbackPrompt/FeedbackPrompt.test.tsx", + "src/components/Feedback/FeedbackText/FeedbackText.test.tsx", + "src/components/Form/Input/Input.test.tsx", + "src/components/Form/LoaderInput/LoaderInput.test.tsx", + "src/components/Form/Select/Select.test.tsx", + "src/components/Form/TextArea/TextArea.test.tsx", + "src/components/Form/internal/BaseControlInput.test.tsx", + "src/components/Icon/Icon.test.tsx", + "src/components/Link/AnchorLink/AnchorLink.test.tsx", + "src/components/Link/LinkOrSpan/LinkOrSpan.test.tsx", + "src/components/Link/RouterLink/RouterLink.test.tsx", + "src/components/Link/createLinkUrl.test.tsx", + "src/components/Markdown/Markdown.test.tsx", + "src/components/NavMenu/NavMenu.test.tsx", + "src/components/PageHeader/PageHeader.test.tsx", + "src/components/PageSelector/PageSelector.test.tsx", + "src/components/PageSwitcher/PageSwitcher.test.tsx", + "src/components/Panel/Panel.test.tsx", + "src/components/Popover/tether/models/geometry/rectangle.spec.ts", + "src/components/Popover/tether/services/geometry/actions/get-constrained-element.spec.ts", + "src/components/Tabs/Tabs.test.tsx", + "src/components/Tooltip/Tooltip.test.tsx", + "src/components/Tree/Tree.test.tsx", + "src/components/Typography/Code/Code.test.tsx", + "src/components/Typography/Heading/H1.test.tsx", + "src/components/Typography/Heading/H2.test.tsx", + "src/components/Typography/Heading/H3.test.tsx", + "src/components/Typography/Heading/H4.test.tsx", + "src/components/Typography/Heading/H5.test.tsx", + "src/components/Typography/Heading/H6.test.tsx", + "src/components/Typography/Label/Label.test.tsx", + "src/components/Typography/Text/Text.test.tsx", + "src/hooks/useObservable.test.ts", + "src/hooks/useTimeoutManager.test.ts", + "src/utils/linkClickHandler.test.tsx", + ], + tsconfig = ":tsconfig", + deps = [ + ":node_modules/@sourcegraph/testing", + ":wildcard_lib", + "//:node_modules/@mdi/js", + "//:node_modules/@storybook/react", #keep + "//:node_modules/@testing-library/react", + "//:node_modules/@testing-library/user-event", + "//:node_modules/@types/history", + "//:node_modules/@types/node", + "//:node_modules/@types/react", + "//:node_modules/@types/sinon", + "//:node_modules/expect", + "//:node_modules/history", + "//:node_modules/mdi-react", + "//:node_modules/react", + "//:node_modules/rxjs", + "//:node_modules/sinon", + ], +) + +npm_package( + name = "wildcard_pkg", + srcs = [ + "package.json", + ":module_styles", #keep + ":wildcard_lib", + ], +) + +jest_test( + name = "test", + data = [ + ":wildcard_tests", + ], + # TODO(bazel): enable when snapshots updated to support pre-compiled .js files + tags = ["manual"], +) diff --git a/dev/BUILD.bazel b/dev/BUILD.bazel index e69de29bb2d..3d1632b41da 100644 --- a/dev/BUILD.bazel +++ b/dev/BUILD.bazel @@ -0,0 +1,6 @@ +load("@aspect_rules_webpack//webpack:defs.bzl", "webpack_binary") + +webpack_binary( + name = "webpack", + node_modules = "//:node_modules", +) diff --git a/dev/babel.bzl b/dev/babel.bzl new file mode 100644 index 00000000000..63ff4baa83e --- /dev/null +++ b/dev/babel.bzl @@ -0,0 +1,76 @@ +load("@aspect_rules_js//js:defs.bzl", "js_library") +load("@npm//:@babel/cli/package_json.bzl", "bin") + +def babel(name, srcs, module = None, **kwargs): + # rules_js runs in the execroot under the output tree in bazel-out/[arch]/bin + execroot = "../../.." + + visibility = kwargs.pop("visibility", ["//visibility:public"]) + source_map = kwargs.pop("source_map", True) + + ts_srcs = [] + outs = [] + data = kwargs.pop("data", []) + deps = kwargs.pop("deps", []) + + # Collect the srcs to compile and expected outputs + for src in srcs: + # JSON does not need to be compiled + if src.endswith(".json"): + data.append(src) + continue + + # dts are only for type-checking and not to be compiled + if src.endswith(".d.ts"): + continue + + if not (src.endswith(".ts") or src.endswith(".tsx")): + fail("babel example transpiler only supports source .ts[x] files, got: %s" % src) + + ts_srcs.append(src) + + # Predict the output paths where babel will write + js_out = src.replace(".tsx", ".js").replace(".ts", ".js") + + outs.append(js_out) + if source_map: + outs.append(js_out + ".map") + + # see https://babeljs.io/docs/en/babel-cli + args = [ + native.package_name(), + "--config-file", + "{}/$(location {})".format(execroot, "//:babel_config"), + "--presets=@babel/preset-typescript", + "--source-maps", + "true" if source_map else "false", + "--extensions", + ".ts,.tsx", + "--out-dir", + "{}/{}".format(".", native.package_name()), + ] + + env = {} + if module != None: + env["BABEL_MODULE"] = module + + bin.babel( + name = "{}_lib".format(name), + progress_message = "Compiling {}:{}".format(native.package_name(), name), + srcs = ts_srcs + [ + "//:babel_config", + "//:package_json", + ], + outs = outs, + args = args, + env = env, + **kwargs + ) + + js_library( + name = name, + srcs = outs, + deps = deps, + data = data, + visibility = visibility, + ) diff --git a/dev/defs.bzl b/dev/defs.bzl index d11f78797f1..b9e923e728f 100644 --- a/dev/defs.bzl +++ b/dev/defs.bzl @@ -1,26 +1,130 @@ +load("@bazel_skylib//lib:partial.bzl", "partial") +load("@bazel_skylib//rules:expand_template.bzl", "expand_template") +load("@aspect_rules_js//npm:defs.bzl", _npm_package = "npm_package") load("@aspect_rules_ts//ts:defs.bzl", _ts_project = "ts_project") +load("@aspect_rules_jest//jest:defs.bzl", _jest_test = "jest_test") load(":sass.bzl", _sass = "sass") +load(":babel.bzl", _babel = "babel") + +# Experiment using raw babel instead of tsc. +# TODO(bazel): ts_project(tsc=babel) currently still runs tsc to carry +# .d.ts when going into an npm_package(). +# For now use raw babel without any type-checking +USE_RAW_BABEL = True + +sass = _sass def ts_project(name, deps = [], **kwargs): deps = deps + [ "//:node_modules/tslib", ] - """Default arguments for ts_project.""" + visibility = kwargs.pop("visibility", ["//visibility:public"]) + + # Add standard test libraries for the repo test frameworks + if kwargs.get("testonly", False): + deps = deps + [d for d in [ + "//:node_modules/@types/jest", + "//:node_modules/@types/mocha", + "//:node_modules/@types/testing-library__jest-dom", + ] if not d in deps] + + if USE_RAW_BABEL: + _ts_project_babel_impl(name, deps = deps, visibility = visibility, **kwargs) + else: + _ts_project_tsc_impl(name, deps = deps, visibility = visibility, **kwargs) + +# ts_project() as an alias to babel with no type-checking or dts +def _ts_project_babel_impl(name, **kwargs): + # no tsconfig with babel + kwargs.pop("tsconfig", None) + kwargs.pop("allow_js", None) + kwargs.pop("incremental", None) + kwargs.pop("composite", None) + kwargs.pop("declaration_map", None) + kwargs.pop("emit_declaration_only", None) + + _babel( + name = name, + **kwargs + ) + +# ts_project() with full type-checking etc +def _ts_project_tsc_impl(name, visibility, **kwargs): + tsconfig = kwargs.pop("tsconfig", "//:tsconfig") + + # Default arguments for ts_project. _ts_project( name = name, - deps = deps, + deps = kwargs.pop("deps", []), - # tsconfig options - tsconfig = "//:tsconfig", - composite = True, - declaration = True, - declaration_map = True, - resolve_json_module = True, - source_map = True, + # tsconfig options, default to the root + tsconfig = tsconfig, + composite = kwargs.pop("composite", True), + declaration = kwargs.pop("declaration", True), + declaration_map = kwargs.pop("declaration_map", True), + resolve_json_module = kwargs.pop("resolve_json_module", True), + source_map = kwargs.pop("source_map", True), + preserve_jsx = kwargs.pop("preserve_jsx", None), + visibility = visibility, + + # use babel as the transpiler + transpiler = partial.make( + _babel, + module = kwargs.pop("module", None), + tags = kwargs.get("tags", []), + visibility = visibility, + testonly = kwargs.get("testonly", None), + ), + supports_workers = False, # Allow any other args **kwargs ) -sass = _sass +def npm_package(name, srcs = [], **kwargs): + replace_prefixes = kwargs.pop("replace_prefixes", {}) + + package_type = kwargs.pop("type", "module") + + # Modifications to package.json + # TODO(bazel): remove when package.json can be updated in source + srcs_no_pkg = [s for s in srcs if s != "package.json"] + if len(srcs) > len(srcs_no_pkg): + updated_pkg = "_%s_package" % name + updated_pkg_json = "%s.json" % updated_pkg + + # remove references to .ts in package.json files + expand_template( + name = updated_pkg, + template = "package.json", + out = updated_pkg_json, + substitutions = { + "src/index.ts": "src/index.js", + "\"name\"": "\"type\": \"%s\",\n \"name\"" % package_type, + }, + ) + + replace_prefixes[updated_pkg_json] = "package.json" + srcs = srcs_no_pkg + [updated_pkg_json] + + _npm_package( + name = name, + srcs = srcs, + replace_prefixes = replace_prefixes, + + # Default visiblity + visibility = kwargs.pop("visibility", ["//visibility:public"]), + + # Allow any other args + **kwargs + ) + +def jest_test(name, data = [], **kwargs): + _jest_test( + name = name, + config = "//:jest_config", + snapshots = kwargs.pop("snapshots", True), + data = data + native.glob(["**/__fixtures__/**/*"]), + **kwargs + ) diff --git a/dev/mocha.bzl b/dev/mocha.bzl new file mode 100644 index 00000000000..a615d5c14dd --- /dev/null +++ b/dev/mocha.bzl @@ -0,0 +1,69 @@ +load("@npm//:mocha/package_json.bzl", "bin") +load("@aspect_rules_esbuild//esbuild:defs.bzl", "esbuild") + +NON_BUNDLED = [ + # Dependencies loaded by mocha itself before the tests. + # Should be outside the test bundle to ensure a single copy is used + # mocha (launched by bazel) and the test bundle. + "mocha", + "puppeteer", + + # Dependencies used by mocha setup scripts. + "abort-controller", + "node-fetch", + "console", + + # Dependencies with bundling issues + "jsonc-parser" +] + +# ... some of which are needed at runtime +NON_BUNDLED_DEPS = [ + "//:node_modules/jsonc-parser", + "//:node_modules/puppeteer", +] + +def mocha_test(name, tests, deps = [], args = [], data = [], env = {}, **kwargs): + bundle_name = "%s_bundle" % name + + # Bundle the tests to remove the use of esm modules in tests + esbuild( + name = bundle_name, + entry_points = tests, + platform = "node", + target = "node12", + output_dir = True, + external = NON_BUNDLED, + sourcemap = "linked", + deps = deps, + config = { + "loader": { + # Packages such as fsevents require native .node binaries. + ".node": "copy", + }, + }, + ) + + bin.mocha_test( + name = name, + args = [ + "--config", + "$(location //:mocha_config)", + "$(location :%s)/**/*.test.js" % bundle_name, + ] + args, + data = data + deps + [ + ":%s" % bundle_name, + "//:mocha_config", + ] + NON_BUNDLED_DEPS, + env = dict(env, **{ + # Add environment variable so that mocha writes its test xml + # to the location Bazel expects. + "MOCHA_FILE": "$$XML_OUTPUT_FILE", + + # TODO(bazel): e2e test environment + "GH_TOKEN": "fake-token", + "TEST_USER_PASSWORD": "fake-password", + }), + tags = ["manual"], + **kwargs + ) diff --git a/dev/webpack.bzl b/dev/webpack.bzl new file mode 100644 index 00000000000..28c359e044c --- /dev/null +++ b/dev/webpack.bzl @@ -0,0 +1,15 @@ +load("@aspect_rules_webpack//webpack:defs.bzl", _webpack_bundle = "webpack_bundle", _webpack_devserver = "webpack_devserver") + +def webpack_bundle(name, **kwargs): + _webpack_bundle( + name = name, + webpack = "//dev:webpack", + **kwargs + ) + +def webpack_devserver(name, **kwargs): + _webpack_devserver( + name = name, + webpack = "//dev:webpack", + **kwargs + ) diff --git a/jest.config.base.js b/jest.config.base.js index fa9af85ebbc..6f1070eacb1 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -2,6 +2,23 @@ const path = require('path') +// TODO(bazel): drop when non-bazel removed. +const IS_BAZEL = !!(process.env.BAZEL_BINDIR || process.env.BAZEL_TEST) +const SRC_EXT = IS_BAZEL ? 'js' : 'ts' +const rootDir = IS_BAZEL ? process.cwd() : __dirname + +function toPackagePath(pkgPath) { + // TODO(bazel): bazel runs tests using the pre-compiled npm packages from + // the pnpm workspace projects. the legacy non-bazel tests run on local ts + // source files which are compiled by jest and npm packages are mapped to + // the compiled or local js files. + if (IS_BAZEL) { + return pkgPath.replace('.ts', '').replace('.js', '') + } + + return pkgPath +} + // Use the same locale for test runs so that snapshots generated using code that // uses Intl or toLocaleString() are consistent. // @@ -15,42 +32,54 @@ process.env.LANG = 'en_US.UTF-8' const ESM_NPM_DEPS = [ 'abortable-rx', - '@sourcegraph/comlink', + '@sourcegraph/.*', 'monaco-editor', 'monaco-yaml', + '@ampproject/.*', 'marked', 'date-fns', 'react-sticky-box', 'uuid', 'vscode-languageserver-types', -] - .join('|') - .replace(/\//g, '\\+') +].join('|') /** @type {import('@jest/types').Config.InitialOptions} */ const config = { // uses latest jsdom and exposes jsdom as a global, // for example to change the URL in window.location - testEnvironment: __dirname + '/client/shared/dev/jest-environment.js', + testEnvironment: toPackagePath(path.join(rootDir, 'client/shared/dev/jest-environment.js')), collectCoverage: !!process.env.CI, - collectCoverageFrom: ['/src/**/*.{ts,tsx}'], + collectCoverageFrom: [`/src/**/*.{${SRC_EXT},${SRC_EXT}x}`], coverageDirectory: '/coverage', - coveragePathIgnorePatterns: [/\/node_modules\//.source, /\.(test|story)\.tsx?$/.source, /\.d\.ts$/.source], + coveragePathIgnorePatterns: [/\/node_modules\//.source, /\.(test|story)\.[jt]sx?$/.source, /\.d\.ts$/.source], roots: ['/src'], + snapshotResolver: path.join(rootDir, 'jest.snapshot-resolver.js'), - transform: { '\\.[jt]sx?$': ['babel-jest', { root: __dirname }] }, + transform: { + [IS_BAZEL ? '\\.js$' : '\\.[jt]sx?$']: [ + 'babel-jest', + { + root: rootDir, + configFile: path.join(rootDir, IS_BAZEL ? 'babel.config.jest.js' : 'babel.config.js'), + }, + ], + }, // Transform packages that do not distribute CommonJS packages (typically because they only distribute ES6 // modules). If you get an error from jest like "Jest encountered an unexpected token. ... SyntaxError: // unexpected token import/export", then add it here. See // https://github.com/facebook/create-react-app/issues/5241#issuecomment-426269242 for more information on why // this is necessary. + // Include the pnpm-style rules_js. + // See pnpm notes at https://jestjs.io/docs/configuration#transformignorepatterns-arraystring transformIgnorePatterns: [ + // TODO(bazel): remove when @sourcegraph/shared is no longer compiled as commonjs. See client/common/BUILD.bazel + '@sourcegraph/shared', // packages within the root pnpm/rules_js package store - `/node_modules/.(aspect_rules_js|pnpm)/(?!(${ESM_NPM_DEPS})@)`, + `/node_modules/.(aspect_rules_js|pnpm)/(?!(${ESM_NPM_DEPS.replace('/', '\\+')})@)`, // files under a subdir: eg. '/packages/lib-a/' - `(../)+node_modules/.(aspect_rules_js|pnpm)/(?!(${ESM_NPM_DEPS})@)`, + `(../)+node_modules/.(aspect_rules_js|pnpm)/(?!(${ESM_NPM_DEPS.replace('/', '\\+')})@)`, // packages nested within another `node_modules/(?!.aspect_rules_js|.pnpm|${ESM_NPM_DEPS})`, ], @@ -72,25 +101,26 @@ const config = { coverageReporters: ['json', 'lcov', 'text-summary'], setupFiles: [ - path.join(__dirname, 'client/shared/dev/mockDate.js'), + path.join(rootDir, 'client/shared/dev/mockDate.js'), // Needed for reusing API functions that use fetch // Neither NodeJS nor JSDOM have fetch + AbortController yet require.resolve('abort-controller/polyfill'), - path.join(__dirname, 'client/shared/dev/fetch'), - path.join(__dirname, 'client/shared/dev/setLinkComponentForTest.ts'), - path.join(__dirname, 'client/shared/dev/mockDomRect.ts'), - path.join(__dirname, 'client/shared/dev/mockResizeObserver.ts'), - path.join(__dirname, 'client/shared/dev/mockUniqueId.ts'), - path.join(__dirname, 'client/shared/dev/mockSentryBrowser.ts'), - path.join(__dirname, 'client/shared/dev/mockMatchMedia.ts'), - ], + path.join(rootDir, 'client/shared/dev/fetch'), + path.join(rootDir, 'client/shared/dev/setLinkComponentForTest.ts'), + path.join(rootDir, 'client/shared/dev/mockDomRect.ts'), + path.join(rootDir, 'client/shared/dev/mockResizeObserver.ts'), + path.join(rootDir, 'client/shared/dev/mockUniqueId.ts'), + path.join(rootDir, 'client/shared/dev/mockSentryBrowser.ts'), + path.join(rootDir, 'client/shared/dev/mockMatchMedia.ts'), + ].map(toPackagePath), + setupFilesAfterEnv: [ require.resolve('core-js/stable'), require.resolve('regenerator-runtime/runtime'), require.resolve('@testing-library/jest-dom'), - path.join(__dirname, 'client/shared/dev/reactCleanup.ts'), + toPackagePath(path.join(rootDir, 'client/shared/dev/reactCleanup.ts')), ], - globalSetup: path.join(__dirname, 'client/shared/dev/jestGlobalSetup.js'), + globalSetup: toPackagePath(path.join(rootDir, 'client/shared/dev/jestGlobalSetup.js')), globals: { Uint8Array, }, diff --git a/jest.snapshot-resolver.js b/jest.snapshot-resolver.js new file mode 100644 index 00000000000..e26d7f037ab --- /dev/null +++ b/jest.snapshot-resolver.js @@ -0,0 +1,27 @@ +// @ts-check + +const path = require('path') + +// TODO(bazel): bazel runs tests on the pre-compiled .js files, non-bazel runs on .ts files. +// This snapshot resolver edits the pre-compiled .js to snapshots assuming a .tsx extension. +// This can be removed and snapshot files renamed to .js when non-bazel is removed. +// NOTE: this assumes all snapshot tests are in .tsx files, not .ts or .jsx and will not work for non-.tsx files. + +const SNAPSHOT_EXTENSION = '.snap' +const TEST_EXTENSION = '.tsx' + +module.exports = { + resolveSnapshotPath: testPath => + path.join( + path.join(path.dirname(testPath), '__snapshots__'), + path.basename(testPath).replace('.js', TEST_EXTENSION) + SNAPSHOT_EXTENSION + ), + + resolveTestPath: snapshotPath => + path.join( + path.dirname(path.dirname(snapshotPath)), + path.basename(snapshotPath, SNAPSHOT_EXTENSION).replace('.js', TEST_EXTENSION) + ), + + testPathForConsistencyCheck: path.posix.join('consistency_check', '__tests__', 'example.test.tsx'), +} diff --git a/package.json b/package.json index 0fe75bbdad1..4c71e9732e6 100644 --- a/package.json +++ b/package.json @@ -93,6 +93,7 @@ "devDependencies": { "@atlassian/aui": "^7.10.3", "@axe-core/puppeteer": "^4.4.2", + "@babel/cli": "^7.20.7", "@babel/core": "^7.20.5", "@babel/plugin-transform-typescript": "^7.20.2", "@babel/preset-env": "^7.20.2", @@ -110,7 +111,6 @@ "@lhci/cli": "0.8.1", "@mermaid-js/mermaid-cli": "^8.13.10", "@octokit/rest": "^16.36.0", - "@peculiar/webcrypto": "^1.1.7", "@percy/cli": "^1.16.0", "@percy/puppeteer": "^2.0.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", @@ -152,7 +152,6 @@ "@terminus-term/to-string-loader": "^1.1.7-beta.1", "@testing-library/dom": "^8.13.0", "@testing-library/jest-dom": "^5.16.4", - "@testing-library/react": "^13.4.0", "@testing-library/react-hooks": "^8.0.0", "@testing-library/user-event": "^13.5.0", "@types/babel__core": "7.1.20", @@ -263,7 +262,6 @@ "identity-obj-proxy": "^3.0.0", "jest": "^28.1.0", "jest-canvas-mock": "^2.3.0", - "jest-environment-jsdom": "^28.1.0", "jest-fetch-mock": "^3.0.3", "jest-junit": "^13.0.0", "jest-mock-extended": "^2.0.2-beta2", @@ -361,6 +359,7 @@ "@opentelemetry/sdk-trace-base": "1.9.1", "@opentelemetry/sdk-trace-web": "^1.9.1", "@opentelemetry/semantic-conventions": "^1.9.1", + "@peculiar/webcrypto": "^1.1.7", "@reach/accordion": "^0.16.1", "@reach/auto-id": "^0.16.0", "@reach/combobox": "^0.16.5", @@ -372,6 +371,7 @@ "@sentry/browser": "^7.8.1", "@sourcegraph/extension-api-classes": "^1.1.0", "@storybook/addon-controls": "^6.5.14", + "@testing-library/react": "^13.4.0", "@visx/annotation": "^2.10.0", "@visx/axis": "^2.11.1", "@visx/event": "2.6.0", @@ -419,6 +419,7 @@ "https-proxy-agent": "^5.0.1", "is-absolute-url": "^3.0.3", "iterare": "^1.2.1", + "jest-environment-jsdom": "^28.1.0", "js-base64": "^3.7.2", "js-cookie": "^2.2.1", "js-yaml": "^4.1.0", @@ -429,6 +430,7 @@ "marked": "4.0.16", "mdi-react": "^8.1.0", "minimatch": "^3.0.4", + "mockdate": "^3.0.2", "monaco-editor": "^0.24.0", "monaco-yaml": "^3.2.1", "nice-ticks": "^1.0.1", @@ -477,6 +479,20 @@ "zustand": "^3.6.9" }, "packageManager": "pnpm@7.24.2", + "pnpm": { + "packageExtensions": { + "cpu-features": { + "dependencies": { + "node-gyp": "*" + } + }, + "@percy/sdk-utils": { + "dependencies": { + "ws": "*" + } + } + } + }, "resolutions": { "@types/webpack": "5", "history": "4.5.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9281ba851d4..2aec3e1cd32 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,8 @@ overrides: webpack: '5' tslib: 2.1.0 +packageExtensionsChecksum: 8812149dda0bd1a50035894b0475085d + importers: .: @@ -14,6 +16,7 @@ importers: '@apollo/client': ^3.8.0-alpha.7 '@atlassian/aui': ^7.10.3 '@axe-core/puppeteer': ^4.4.2 + '@babel/cli': ^7.20.7 '@babel/core': ^7.20.5 '@babel/plugin-transform-typescript': ^7.20.2 '@babel/preset-env': ^7.20.2 @@ -419,6 +422,7 @@ importers: '@opentelemetry/sdk-trace-base': 1.9.1_@opentelemetry+api@1.4.0 '@opentelemetry/sdk-trace-web': 1.9.1_@opentelemetry+api@1.4.0 '@opentelemetry/semantic-conventions': 1.9.1 + '@peculiar/webcrypto': 1.4.1 '@reach/accordion': 0.16.1_ef5jwxihqo6n7gxfmzogljlgcm '@reach/auto-id': 0.16.0_ef5jwxihqo6n7gxfmzogljlgcm '@reach/combobox': 0.16.5_ef5jwxihqo6n7gxfmzogljlgcm @@ -430,6 +434,7 @@ importers: '@sentry/browser': 7.8.1 '@sourcegraph/extension-api-classes': 1.1.0_sohmsbidf4ixb2vnv3mpdkpiau '@storybook/addon-controls': 6.5.14_ajlcqac3kq4mzyqffu4vlpo7bm + '@testing-library/react': 13.4.0_ef5jwxihqo6n7gxfmzogljlgcm '@visx/annotation': 2.10.0_ef5jwxihqo6n7gxfmzogljlgcm '@visx/axis': 2.11.1_react@18.1.0 '@visx/event': 2.6.0 @@ -477,6 +482,7 @@ importers: https-proxy-agent: 5.0.1 is-absolute-url: 3.0.3 iterare: 1.2.1 + jest-environment-jsdom: 28.1.3 js-base64: 3.7.2 js-cookie: 2.2.1 js-yaml: 4.1.0 @@ -487,6 +493,7 @@ importers: marked: 4.0.16 mdi-react: 8.1.0_react@18.1.0 minimatch: 3.1.2 + mockdate: 3.0.2 monaco-editor: 0.24.0 monaco-yaml: 3.2.1_monaco-editor@0.24.0 nice-ticks: 1.0.1 @@ -536,6 +543,7 @@ importers: devDependencies: '@atlassian/aui': 7.10.5_jquery@2.2.4+yarn@1.22.19 '@axe-core/puppeteer': 4.4.2_puppeteer@13.7.0 + '@babel/cli': 7.20.7_@babel+core@7.20.5 '@babel/core': 7.20.5 '@babel/plugin-transform-typescript': 7.20.2_@babel+core@7.20.5 '@babel/preset-env': 7.20.2_@babel+core@7.20.5 @@ -553,7 +561,6 @@ importers: '@lhci/cli': 0.8.1 '@mermaid-js/mermaid-cli': 8.14.0 '@octokit/rest': 16.36.0 - '@peculiar/webcrypto': 1.4.1 '@percy/cli': 1.16.0 '@percy/puppeteer': 2.0.0_puppeteer@13.7.0 '@pmmmwh/react-refresh-webpack-plugin': 0.5.10_j3lj322d4usblreb4zevy6mwsq @@ -595,7 +602,6 @@ importers: '@terminus-term/to-string-loader': 1.1.7-beta.1 '@testing-library/dom': 8.13.0 '@testing-library/jest-dom': 5.16.4 - '@testing-library/react': 13.4.0_ef5jwxihqo6n7gxfmzogljlgcm '@testing-library/react-hooks': 8.0.0_i6xcbgvvylvakhe2evaee3dlf4 '@testing-library/user-event': 13.5.0_tlwynutqiyp5mns3woioasuxnq '@types/babel__core': 7.1.20 @@ -706,7 +712,6 @@ importers: identity-obj-proxy: 3.0.0 jest: 28.1.3_sgfsbmxe5qwkqmsj7h2d7flbny jest-canvas-mock: 2.3.0 - jest-environment-jsdom: 28.1.3 jest-fetch-mock: 3.0.3 jest-junit: 13.0.0 jest-mock-extended: 2.0.2-beta2_mgg23zyyvjoe75wbzvxzqqpmne @@ -721,7 +726,6 @@ importers: mini-css-extract-plugin: 2.7.2_webpack@5.75.0 mocha: 8.3.2 mock-require: 3.0.3 - mockdate: 3.0.2 mz: 2.7.0 node-fetch: 2.6.7 nyc: 15.1.0 @@ -1329,6 +1333,26 @@ packages: puppeteer: 13.7.0 dev: true + /@babel/cli/7.20.7_@babel+core@7.20.5: + resolution: {integrity: sha512-WylgcELHB66WwQqItxNILsMlaTd8/SO6SgTTjMp4uCI7P4QyH1r3nqgFmO3BfM4AtfniHgFMH3EpYFj/zynBkQ==} + engines: {node: '>=6.9.0'} + hasBin: true + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.5 + '@jridgewell/trace-mapping': 0.3.17 + commander: 4.1.1 + convert-source-map: 1.7.0 + fs-readdir-recursive: 1.1.0 + glob: 7.2.3 + make-dir: 2.1.0 + slash: 2.0.0 + optionalDependencies: + '@nicolo-ribaudo/chokidar-2': 2.1.8-no-fsevents.3 + chokidar: 3.5.3 + dev: true + /@babel/code-frame/7.0.0: resolution: {integrity: sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==} dependencies: @@ -2800,6 +2824,7 @@ packages: - '@swc/core' - '@swc/wasm' - better-sqlite3 + - bluebird - bufferutil - encoding - mysql @@ -2878,6 +2903,7 @@ packages: - '@swc/core' - '@swc/wasm' - better-sqlite3 + - bluebird - bufferutil - encoding - mysql @@ -2905,6 +2931,7 @@ packages: - '@swc/core' - '@swc/wasm' - better-sqlite3 + - bluebird - bufferutil - encoding - mysql @@ -2937,6 +2964,7 @@ packages: - '@swc/core' - '@swc/wasm' - better-sqlite3 + - bluebird - bufferutil - encoding - mysql @@ -3463,6 +3491,7 @@ packages: - '@swc/core' - '@swc/wasm' - better-sqlite3 + - bluebird - bufferutil - encoding - mysql @@ -3519,6 +3548,7 @@ packages: - '@swc/core' - '@swc/wasm' - better-sqlite3 + - bluebird - bufferutil - encoding - mysql @@ -3554,6 +3584,7 @@ packages: - '@swc/core' - '@swc/wasm' - better-sqlite3 + - bluebird - bufferutil - encoding - mysql @@ -3638,6 +3669,7 @@ packages: - '@swc/core' - '@swc/wasm' - better-sqlite3 + - bluebird - bufferutil - encoding - mysql @@ -4355,6 +4387,11 @@ packages: react: 18.1.0 dev: true + /@gar/promisify/1.1.3: + resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} + dev: false + optional: true + /@google-cloud/paginator/3.0.7: resolution: {integrity: sha512-jJNutk0arIQhmpUUQJPJErsojqo834KcyB6X7a1mxuic8i1tKXxde8E69IZxNZawRIlZdIK2QY4WALvlK5MzYQ==} engines: {node: '>=10'} @@ -5295,7 +5332,6 @@ packages: '@jest/types': 28.1.3 '@types/node': 18.11.18 jest-mock: 28.1.3 - dev: true /@jest/environment/29.4.0: resolution: {integrity: sha512-ocl1VGDcZHfHnYLTqkBY7yXme1bF4x0BevJ9wb6y0sLOSyBCpp8L5fEASChB+wU53WMrIK6kBfGt+ZYoM2kcdw==} @@ -5350,7 +5386,6 @@ packages: jest-message-util: 28.1.3 jest-mock: 28.1.3 jest-util: 28.1.3 - dev: true /@jest/fake-timers/29.4.0: resolution: {integrity: sha512-8sitzN2QrhDwEwH3kKcMMgrv/UIkmm9AUgHixmn4L++GQ0CqVTIztm3YmaIQooLmW3O4GhizNTTCyq3iLbWcMw==} @@ -5466,7 +5501,6 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: '@sinclair/typebox': 0.24.51 - dev: true /@jest/schemas/29.4.2: resolution: {integrity: sha512-ZrGzGfh31NtdVH8tn0mgJw4khQuNHiKqdzJAFbCaERbyCP9tHlxWuL/mnMu8P7e/+k4puWjI1NOzi/sFsjce/g==} @@ -5631,7 +5665,6 @@ packages: '@types/node': 18.11.18 '@types/yargs': 17.0.16 chalk: 4.1.2 - dev: true /@jest/types/29.4.2: resolution: {integrity: sha512-CKlngyGP0fwlgC1BRUtPZSiWLBhyS9dKwKmyGxk8Z6M82LBEGB2aLQSg+U1MyLsU+M7UjnlLllBM2BLWKVm/Uw==} @@ -6176,6 +6209,12 @@ packages: engines: {node: '>=12'} dev: false + /@nicolo-ribaudo/chokidar-2/2.1.8-no-fsevents.3: + resolution: {integrity: sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==} + requiresBuild: true + dev: true + optional: true + /@nodelib/fs.scandir/2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -6199,6 +6238,15 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.6.0 + /@npmcli/fs/2.1.2: + resolution: {integrity: sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + '@gar/promisify': 1.1.3 + semver: 7.3.8 + dev: false + optional: true + /@npmcli/move-file/1.0.1: resolution: {integrity: sha512-Uv6h1sT+0DrblvIrolFtbvM1FgWm+/sy4B3pvLp67Zys+thcukzS5ekn7HsZFGpWP4Q3fYJCljbWQE/XivMRLw==} engines: {node: '>=10'} @@ -6207,6 +6255,16 @@ packages: mkdirp: 1.0.4 dev: true + /@npmcli/move-file/2.0.1: + resolution: {integrity: sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + deprecated: This functionality has been moved to @npmcli/fs + dependencies: + mkdirp: 1.0.4 + rimraf: 3.0.2 + dev: false + optional: true + /@octokit/app/13.0.9: resolution: {integrity: sha512-3Uy/PtItK7wic6I2mDcVnxaUWygxXOzdLpzEY47zA4kTRSlrIRKPNtZ64FmQcI2rcvys2PkzTWpYvdTE0gNaUQ==} engines: {node: '>= 14'} @@ -6738,14 +6796,12 @@ packages: asn1js: 3.0.5 pvtsutils: 1.3.2 tslib: 2.1.0 - dev: true /@peculiar/json-schema/1.1.12: resolution: {integrity: sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==} engines: {node: '>=8.0.0'} dependencies: tslib: 2.1.0 - dev: true /@peculiar/webcrypto/1.4.1: resolution: {integrity: sha512-eK4C6WTNYxoI7JOabMoZICiyqRRtJB220bh0Mbj5RwRycleZf9BPyZoxsTvpP0FpmVS2aS13NKOuh5/tN3sIRw==} @@ -6756,7 +6812,6 @@ packages: pvtsutils: 1.3.2 tslib: 2.1.0 webcrypto-core: 1.7.5 - dev: true /@percy/cli-app/1.16.0: resolution: {integrity: sha512-Igmkod0vGcBj1KSB5JZrKoXuUSRPuceHVm+BjR23R5O/Gv9whKT7Zn1wEGhWNTS7cFz0B0Qg9uKiqjUcU9jNHQ==} @@ -6933,6 +6988,9 @@ packages: dependencies: '@percy/sdk-utils': 1.0.0-beta.68 puppeteer: 13.7.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate dev: true /@percy/sdk-utils/1.0.0-beta.68: @@ -6940,6 +6998,10 @@ packages: engines: {node: '>=12'} dependencies: '@percy/logger': 1.0.0-beta.68 + ws: 8.11.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate dev: true /@phenomnomnominal/tsquery/4.0.0_typescript@4.9.5: @@ -8107,7 +8169,6 @@ packages: /@sinclair/typebox/0.24.51: resolution: {integrity: sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==} - dev: true /@sinclair/typebox/0.25.21: resolution: {integrity: sha512-gFukHN4t8K4+wVC+ECqeqwzBDeFeTzBXroBTqE6vcWrQGbEUpHO7LYdG0f4xnvYq4VOEwITSlHlp0JBAIFMS/g==} @@ -8131,7 +8192,6 @@ packages: resolution: {integrity: sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==} dependencies: type-detect: 4.0.8 - dev: true /@sinonjs/commons/2.0.0: resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} @@ -8159,7 +8219,6 @@ packages: resolution: {integrity: sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==} dependencies: '@sinonjs/commons': 1.8.3 - dev: true /@sinonjs/formatio/5.0.1: resolution: {integrity: sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==} @@ -10308,7 +10367,6 @@ packages: dom-accessibility-api: 0.5.13 lz-string: 1.4.4 pretty-format: 27.5.1 - dev: true /@testing-library/jest-dom/5.16.4: resolution: {integrity: sha512-Gy+IoFutbMQcky0k+bqqumXZ1cTGswLsFqmNLzNdSKkU9KGV2u9oXhukCbbJ9/LRPKiqwxEE8VpV/+YZlfkPUA==} @@ -10374,7 +10432,7 @@ packages: '@types/react-dom': 18.0.2 react: 18.1.0 react-dom: 18.1.0_react@18.1.0 - dev: true + dev: false /@testing-library/user-event/13.5.0_tlwynutqiyp5mns3woioasuxnq: resolution: {integrity: sha512-5Kwtbo3Y/NowpkbRuSepbyMFkZmHgD+vPzYB/RJ4oxt5Gj/avFFBYjhw27cqSVPVw/3a67NK1PbiIr9k4Gwmdg==} @@ -10426,7 +10484,6 @@ packages: /@types/aria-query/4.2.1: resolution: {integrity: sha512-S6oPal772qJZHoRZLFc/XoZW2gFvwXusYUmXPXkgxJLuEk2vOt7jc4Yo6z/vtI0EBkbPBVrJJ0B+prLIKiWqHg==} - dev: true /@types/aws-lambda/8.10.106: resolution: {integrity: sha512-yzgMaql7aW1by1XuhKhovuhLyK/1A60lapFXDXXBeHmoyRGQFO2T8lkL3g8hAhHoW5PEvqPJFWPd8jvXiRnxeQ==} @@ -10838,7 +10895,7 @@ packages: '@types/node': 18.11.18 '@types/parse5': 6.0.3 '@types/tough-cookie': 2.3.5 - dev: true + dev: false /@types/jsdom/20.0.1: resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} @@ -10973,7 +11030,7 @@ packages: /@types/parse5/6.0.3: resolution: {integrity: sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==} - dev: true + dev: false /@types/pixelmatch/5.2.3: resolution: {integrity: sha512-p+nAQVYK/DUx7+s1Xyu9dqAg0gobf7VmJ+iDA4lljg1o4XRgQHr7R2h1NwFt3gdNOZiftxWB11+0TuZqXYf19w==} @@ -11060,7 +11117,6 @@ packages: resolution: {integrity: sha512-UxeS+Wtj5bvLRREz9tIgsK4ntCuLDo0EcAcACgw3E+9wE8ePDr9uQpq53MfcyxyIS55xJ+0B6mDS8c4qkkHLBg==} dependencies: '@types/react': 18.0.8 - dev: true /@types/react-grid-layout/1.3.2: resolution: {integrity: sha512-ZzpBEOC1JTQ7MGe1h1cPKSLP4jSWuxc+yvT4TsAlEW9+EFPzAf8nxQfFd7ea9gL17Em7PbwJZAsiwfQQBUklZQ==} @@ -12110,11 +12166,9 @@ packages: /abab/2.0.6: resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} - dev: true /abbrev/1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} - dev: true /abort-controller/3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} @@ -12138,7 +12192,6 @@ packages: dependencies: acorn: 7.4.1 acorn-walk: 7.2.0 - dev: true /acorn-globals/7.0.1: resolution: {integrity: sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==} @@ -12172,7 +12225,6 @@ packages: /acorn-walk/7.2.0: resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} engines: {node: '>=0.4.0'} - dev: true /acorn-walk/8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} @@ -12182,7 +12234,6 @@ packages: resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} engines: {node: '>=0.4.0'} hasBin: true - dev: true /acorn/8.8.1: resolution: {integrity: sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==} @@ -12209,13 +12260,24 @@ packages: transitivePeerDependencies: - supports-color + /agentkeepalive/4.2.1: + resolution: {integrity: sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==} + engines: {node: '>= 8.0.0'} + dependencies: + debug: 4.3.4 + depd: 1.1.2 + humanize-ms: 1.2.1 + transitivePeerDependencies: + - supports-color + dev: false + optional: true + /aggregate-error/3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} dependencies: clean-stack: 2.0.0 indent-string: 4.0.0 - dev: true /airbnb-js-shims/2.2.1: resolution: {integrity: sha512-wJNXPH66U2xjgo1Zwyjf9EydvJ2Si94+vSdk6EERcBfB2VZkeltpqIats0cqIZMLCXP3zcyaUKGYQeIBT6XjsQ==} @@ -12494,6 +12556,15 @@ packages: delegates: 1.0.0 readable-stream: 3.6.0 + /are-we-there-yet/3.0.1: + resolution: {integrity: sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + delegates: 1.0.0 + readable-stream: 3.6.0 + dev: false + optional: true + /arg/4.1.0: resolution: {integrity: sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==} @@ -12516,7 +12587,6 @@ packages: /aria-query/5.0.0: resolution: {integrity: sha512-V+SM7AbUwJ+EBnB8+DXs0hPZHO0W6pqBcc0dW90OwtVG02PswOu/teuARoLQjdDOH+t9pJgGnW5/Qmouf3gPJg==} engines: {node: '>=6.0'} - dev: true /arr-diff/4.0.0: resolution: {integrity: sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==} @@ -12706,7 +12776,6 @@ packages: pvtsutils: 1.3.2 pvutils: 1.1.3 tslib: 2.1.0 - dev: true /assert-plus/1.0.0: resolution: {integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==} @@ -13505,7 +13574,6 @@ packages: /browser-process-hrtime/1.0.0: resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==} - dev: true /browser-stdout/1.3.1: resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} @@ -13714,6 +13782,33 @@ packages: - bluebird dev: true + /cacache/16.1.3: + resolution: {integrity: sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + '@npmcli/fs': 2.1.2 + '@npmcli/move-file': 2.0.1 + chownr: 2.0.0 + fs-minipass: 2.1.0 + glob: 8.1.0 + infer-owner: 1.0.4 + lru-cache: 7.14.0 + minipass: 3.3.5 + minipass-collect: 1.0.2 + minipass-flush: 1.0.5 + minipass-pipeline: 1.2.4 + mkdirp: 1.0.4 + p-map: 4.0.0 + promise-inflight: 1.0.1 + rimraf: 3.0.2 + ssri: 9.0.1 + tar: 6.1.13 + unique-filename: 2.0.1 + transitivePeerDependencies: + - bluebird + dev: false + optional: true + /cache-base/1.0.1: resolution: {integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==} engines: {node: '>=0.10.0'} @@ -14231,7 +14326,6 @@ packages: /clean-stack/2.0.0: resolution: {integrity: sha512-VEoL9Qh7I8s8iHnV53DaeWSt8NJ0g3khMfK6NiCPB7H657juhro+cSw2O88uo3bo0c0X5usamtXk0/Of0wXa5A==} engines: {node: '>=6'} - dev: true /cli-boxes/2.2.1: resolution: {integrity: sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==} @@ -14955,6 +15049,10 @@ packages: dependencies: buildcheck: 0.0.3 nan: 2.17.0 + node-gyp: 9.3.1 + transitivePeerDependencies: + - bluebird + - supports-color dev: false optional: true @@ -15412,7 +15510,6 @@ packages: /cssom/0.3.8: resolution: {integrity: sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==} - dev: true /cssom/0.4.4: resolution: {integrity: sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==} @@ -15420,7 +15517,6 @@ packages: /cssom/0.5.0: resolution: {integrity: sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==} - dev: true /cssstyle/1.2.1: resolution: {integrity: sha512-7DYm8qe+gPx/h77QlCyFmX80+fGaE/6A/Ekl0zaszYOubvySO2saYFdQ78P29D0UsULxFKCetDGNaNRUdSF+2A==} @@ -15433,7 +15529,6 @@ packages: engines: {node: '>=8'} dependencies: cssom: 0.3.8 - dev: true /csstype/2.6.21: resolution: {integrity: sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==} @@ -15977,7 +16072,6 @@ packages: abab: 2.0.6 whatwg-mimetype: 3.0.0 whatwg-url: 11.0.0 - dev: true /dataloader/2.1.0: resolution: {integrity: sha512-qTcEYLen3r7ojZNgVUaRggOI+KM7jrKxXeSHhogh/TWxYMeONEMqY+hmkobiYQozsGIyg9OYVzO4ZIfoB4I0pQ==} @@ -16071,7 +16165,6 @@ packages: /decimal.js/10.4.3: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} - dev: true /decode-named-character-reference/1.0.2: resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} @@ -16445,6 +16538,7 @@ packages: split-ca: 1.0.1 ssh2: 1.11.0 transitivePeerDependencies: + - bluebird - supports-color dev: false @@ -16456,6 +16550,7 @@ packages: docker-modem: 3.0.6 tar-fs: 2.0.1 transitivePeerDependencies: + - bluebird - supports-color dev: false @@ -16473,7 +16568,6 @@ packages: /dom-accessibility-api/0.5.13: resolution: {integrity: sha512-R305kwb5CcMDIpSHUnLyIAp7SrSPBx6F0VfQFB3M75xVMHhXJJIdePYgbPPh1o57vCHNu5QztokWUPsLjWzFqw==} - dev: true /dom-converter/0.2.0: resolution: {integrity: sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==} @@ -16542,7 +16636,6 @@ packages: engines: {node: '>=12'} dependencies: webidl-conversions: 7.0.0 - dev: true /domhandler/4.2.0: resolution: {integrity: sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==} @@ -16745,6 +16838,14 @@ packages: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} + /encoding/0.1.13: + resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} + requiresBuild: true + dependencies: + iconv-lite: 0.6.3 + dev: false + optional: true + /end-of-stream/1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} dependencies: @@ -16827,6 +16928,12 @@ packages: engines: {node: '>=0.12'} dev: true + /env-paths/2.2.1: + resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} + engines: {node: '>=6'} + dev: false + optional: true + /envalid/7.3.1: resolution: {integrity: sha512-KL1YRwn8WcoF/Ty7t+yLLtZol01xr9ZJMTjzoGRM8NaSU+nQQjSWOQKKJhJP2P57bpdakJ9jbxqQX4fGTOicZg==} engines: {node: '>=8.12'} @@ -16839,6 +16946,11 @@ packages: engines: {node: '>=4'} hasBin: true + /err-code/2.0.3: + resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} + dev: false + optional: true + /errno/0.1.8: resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} hasBin: true @@ -17137,7 +17249,6 @@ packages: optionator: 0.8.3 optionalDependencies: source-map: 0.6.1 - dev: true /eslint-config-prettier/6.15.0_eslint@8.34.0: resolution: {integrity: sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==} @@ -18517,7 +18628,6 @@ packages: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 - dev: true /format/0.2.2: resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} @@ -18624,6 +18734,10 @@ packages: /fs-monkey/1.0.3: resolution: {integrity: sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q==} + /fs-readdir-recursive/1.1.0: + resolution: {integrity: sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==} + dev: true + /fs.realpath/1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -18714,6 +18828,21 @@ packages: strip-ansi: 6.0.1 wide-align: 1.1.5 + /gauge/4.0.4: + resolution: {integrity: sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + aproba: 1.2.0 + color-support: 1.1.3 + console-control-strings: 1.1.0 + has-unicode: 2.0.1 + signal-exit: 3.0.7 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wide-align: 1.1.5 + dev: false + optional: true + /gaxios/2.1.0: resolution: {integrity: sha512-Gtpb5sdQmb82sgVkT2GnS2n+Kx4dlFwbeMYcDlD395aEvsLCSQXJJcHt7oJ2LrGxDEAeiOkK79Zv2A8Pzt6CFg==} engines: {node: '>=8.10.0'} @@ -19020,7 +19149,6 @@ packages: inherits: 2.0.4 minimatch: 5.1.6 once: 1.4.0 - dev: true /global-agent/3.0.0: resolution: {integrity: sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==} @@ -19897,7 +20025,6 @@ packages: engines: {node: '>=12'} dependencies: whatwg-encoding: 2.0.0 - dev: true /html-entities/2.3.2: resolution: {integrity: sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ==} @@ -20147,6 +20274,13 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} + /humanize-ms/1.2.1: + resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} + dependencies: + ms: 2.1.3 + dev: false + optional: true + /humps/2.0.1: resolution: {integrity: sha512-E0eIbrFWUhwfXJmsbdjRQFQPrl5pTEoKlz163j1mTqqUnU9PgR4AgB8AIITzuB3vLBdxZXyZ9TDIrwB2OASz4g==} dev: true @@ -20165,7 +20299,6 @@ packages: engines: {node: '>=0.10.0'} dependencies: safer-buffer: 2.1.2 - dev: true /icss-replace-symbols/1.1.0: resolution: {integrity: sha512-chIaY3Vh2mh2Q3RGXttaDIzeiPvaVXJ+C4DAh/w3c37SKZ/U6PGMmuicR2EQQp9bKG8zLMCl7I+PtIoOOPp8Gg==} @@ -20314,7 +20447,6 @@ packages: /indent-string/4.0.0: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} - dev: true /indexes-of/1.0.1: resolution: {integrity: sha512-bup+4tap3Hympa+JBJUG7XuOsdNQ6fxt0MHyXMKuLBKn0OqsTfvUxkUrroEX1+B2VsSHvCjiIcZVxRtYa4nllA==} @@ -20326,7 +20458,6 @@ packages: /infer-owner/1.0.4: resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==} - dev: true /inflight/1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} @@ -20467,7 +20598,6 @@ packages: /ip/2.0.0: resolution: {integrity: sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==} - dev: true /ipaddr.js/1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} @@ -20742,6 +20872,11 @@ packages: resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} engines: {node: '>=8'} + /is-lambda/1.0.1: + resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} + dev: false + optional: true + /is-lower-case/2.0.2: resolution: {integrity: sha512-bVcMJy4X5Og6VZfdOZstSexlEy20Sr0k/p/b2IlQJlfdKAQuMpiv5w2Ccxb8sKdRUNAG1PnHVHjFSdRDVS6NlQ==} dependencies: @@ -20853,7 +20988,6 @@ packages: /is-potential-custom-element-name/1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - dev: true /is-primitive/3.0.1: resolution: {integrity: sha512-GljRxhWvlCNRfZyORiH77FwdFwGcMO620o37EOYC0ORWdq+WYNVqW0w2Juzew4M+L81l6/QS3t5gkkihyRqv9w==} @@ -21629,7 +21763,7 @@ packages: - canvas - supports-color - utf-8-validate - dev: true + dev: false /jest-environment-jsdom/29.4.0: resolution: {integrity: sha512-z1tB/qtReousDnU695K38ZzoR6B3dRXazwgyhTHzMviSC2T3KmVy0T722fZxR2q3x/Jvv85JxU/2xs8kwX394w==} @@ -21893,7 +22027,6 @@ packages: pretty-format: 28.1.3 slash: 3.0.0 stack-utils: 2.0.5 - dev: true /jest-message-util/29.4.0: resolution: {integrity: sha512-0FvobqymmhE9pDEifvIcni9GeoKLol8eZspzH5u41g1wxYtLS60a9joT95dzzoCgrKRidNz64eaAXyzaULV8og==} @@ -21926,7 +22059,6 @@ packages: dependencies: '@jest/types': 28.1.3 '@types/node': 18.11.18 - dev: true /jest-mock/29.4.0: resolution: {integrity: sha512-+ShT5i+hcu/OFQRV0f/V/YtwpdFcHg64JZ9A8b40JueP+X9HNrZAYGdkupGIzsUK8AucecxCt4wKauMchxubLQ==} @@ -22323,7 +22455,6 @@ packages: ci-info: 3.3.1 graceful-fs: 4.2.10 picomatch: 2.3.1 - dev: true /jest-util/29.4.0: resolution: {integrity: sha512-lCCwlze7UEV8TpR9ArS8w0cTbcMry5tlBkg7QSc5og5kNyV59dnY2aKHu5fY2k5aDJMQpCUGpvL2w6ZU44lveA==} @@ -22707,7 +22838,7 @@ packages: - bufferutil - supports-color - utf-8-validate - dev: true + dev: false /jsdom/20.0.3: resolution: {integrity: sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==} @@ -23224,7 +23355,6 @@ packages: dependencies: prelude-ls: 1.1.2 type-check: 0.3.2 - dev: true /levn/0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} @@ -23696,7 +23826,6 @@ packages: /lz-string/1.4.4: resolution: {integrity: sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ==} hasBin: true - dev: true /macos-release/2.3.0: resolution: {integrity: sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA==} @@ -23740,6 +23869,32 @@ packages: /make-error/1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + /make-fetch-happen/10.2.1: + resolution: {integrity: sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + agentkeepalive: 4.2.1 + cacache: 16.1.3 + http-cache-semantics: 4.1.0 + http-proxy-agent: 5.0.0 + https-proxy-agent: 5.0.1 + is-lambda: 1.0.1 + lru-cache: 7.14.0 + minipass: 3.3.5 + minipass-collect: 1.0.2 + minipass-fetch: 2.1.2 + minipass-flush: 1.0.5 + minipass-pipeline: 1.2.4 + negotiator: 0.6.3 + promise-retry: 2.0.1 + socks-proxy-agent: 7.0.0 + ssri: 9.0.1 + transitivePeerDependencies: + - bluebird + - supports-color + dev: false + optional: true + /make-iterator/1.0.1: resolution: {integrity: sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==} engines: {node: '>=0.10.0'} @@ -24863,21 +25018,38 @@ packages: engines: {node: '>= 8'} dependencies: minipass: 3.3.5 - dev: true + + /minipass-fetch/2.1.2: + resolution: {integrity: sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + minipass: 3.3.5 + minipass-sized: 1.0.3 + minizlib: 2.1.2 + optionalDependencies: + encoding: 0.1.13 + dev: false + optional: true /minipass-flush/1.0.5: resolution: {integrity: sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==} engines: {node: '>= 8'} dependencies: minipass: 3.3.5 - dev: true /minipass-pipeline/1.2.4: resolution: {integrity: sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==} engines: {node: '>=8'} dependencies: minipass: 3.3.5 - dev: true + + /minipass-sized/1.0.3: + resolution: {integrity: sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==} + engines: {node: '>=8'} + dependencies: + minipass: 3.3.5 + dev: false + optional: true /minipass/3.3.5: resolution: {integrity: sha512-rQ/p+KfKBkeNwo04U15i+hOwoVBVmekmm/HcfTkTN2t9pbQKCMm4eN5gFeqgrrSp/kH/7BYYhTIHOxGqzbBPaA==} @@ -24961,7 +25133,7 @@ packages: /mockdate/3.0.2: resolution: {integrity: sha512-ldfYSUW1ocqSHGTK6rrODUiqAFPGAg0xaHqYJ5tvj1hQyFsjuHpuWgWFTZWwDVlzougN/s2/mhDr8r5nY5xDpA==} - dev: true + dev: false /module-details-from-path/1.0.3: resolution: {integrity: sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A==} @@ -25276,6 +25448,27 @@ packages: resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} engines: {node: '>= 6.13.0'} + /node-gyp/9.3.1: + resolution: {integrity: sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==} + engines: {node: ^12.13 || ^14.13 || >=16} + hasBin: true + dependencies: + env-paths: 2.2.1 + glob: 7.2.3 + graceful-fs: 4.2.10 + make-fetch-happen: 10.2.1 + nopt: 6.0.0 + npmlog: 6.0.2 + rimraf: 3.0.2 + semver: 7.3.8 + tar: 6.1.13 + which: 2.0.2 + transitivePeerDependencies: + - bluebird + - supports-color + dev: false + optional: true + /node-int64/0.4.0: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} @@ -25330,6 +25523,15 @@ packages: osenv: 0.1.5 dev: true + /nopt/6.0.0: + resolution: {integrity: sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + hasBin: true + dependencies: + abbrev: 1.1.1 + dev: false + optional: true + /normalize-package-data/2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: @@ -25447,6 +25649,17 @@ packages: gauge: 3.0.2 set-blocking: 2.0.0 + /npmlog/6.0.2: + resolution: {integrity: sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + are-we-there-yet: 3.0.1 + console-control-strings: 1.1.0 + gauge: 4.0.4 + set-blocking: 2.0.0 + dev: false + optional: true + /nth-check/1.0.2: resolution: {integrity: sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==} dependencies: @@ -25473,7 +25686,6 @@ packages: /nwsapi/2.2.2: resolution: {integrity: sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==} - dev: true /nyc/15.1.0: resolution: {integrity: sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==} @@ -25770,7 +25982,6 @@ packages: prelude-ls: 1.1.2 type-check: 0.3.2 word-wrap: 1.2.3 - dev: true /optionator/0.9.1: resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} @@ -25975,7 +26186,6 @@ packages: engines: {node: '>=10'} dependencies: aggregate-error: 3.1.0 - dev: true /p-queue/6.6.2: resolution: {integrity: sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==} @@ -26177,7 +26387,6 @@ packages: /parse5/6.0.1: resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} - dev: true /parse5/7.1.2: resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} @@ -27137,7 +27346,6 @@ packages: /prelude-ls/1.1.2: resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} engines: {node: '>= 0.8.0'} - dev: true /prelude-ls/1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} @@ -27232,7 +27440,6 @@ packages: ansi-regex: 5.0.1 ansi-styles: 5.2.0 react-is: 17.0.2 - dev: true /pretty-format/28.1.3: resolution: {integrity: sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==} @@ -27242,7 +27449,6 @@ packages: ansi-regex: 5.0.1 ansi-styles: 5.2.0 react-is: 18.2.0 - dev: true /pretty-format/29.4.0: resolution: {integrity: sha512-J+EVUPXIBHCdWAbvGBwXs0mk3ljGppoh/076g1S8qYS8nVG4u/yrhMvyTFHYYYKWnDdgRLExx0vA7pzxVGdlNw==} @@ -27305,12 +27511,20 @@ packages: peerDependenciesMeta: bluebird: optional: true - dev: true /promise-polyfill/8.2.1: resolution: {integrity: sha512-3p9zj0cEHbp7NVUxEYUWjQlffXqnXaZIMPkAO7HhFh8u5636xLRDHOUo2vpWSK0T2mqm6fKLXYn1KP6PAZ2gKg==} dev: true + /promise-retry/2.0.1: + resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} + engines: {node: '>=10'} + dependencies: + err-code: 2.0.3 + retry: 0.12.0 + dev: false + optional: true + /promise.allsettled/1.0.2: resolution: {integrity: sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==} engines: {node: '>= 0.4'} @@ -27502,12 +27716,10 @@ packages: resolution: {integrity: sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==} dependencies: tslib: 2.1.0 - dev: true /pvutils/1.1.3: resolution: {integrity: sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==} engines: {node: '>=6.0.0'} - dev: true /q/1.5.1: resolution: {integrity: sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==} @@ -29235,6 +29447,12 @@ packages: - supports-color dev: false + /retry/0.12.0: + resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} + engines: {node: '>= 4'} + dev: false + optional: true + /retry/0.13.1: resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} engines: {node: '>= 4'} @@ -29588,7 +29806,6 @@ packages: engines: {node: '>=10'} dependencies: xmlchars: 2.2.0 - dev: true /saxes/6.0.0: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} @@ -30060,7 +30277,6 @@ packages: /smart-buffer/4.2.0: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} - dev: true /snake-case/3.0.4: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} @@ -30160,13 +30376,24 @@ packages: - supports-color dev: true + /socks-proxy-agent/7.0.0: + resolution: {integrity: sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==} + engines: {node: '>= 10'} + dependencies: + agent-base: 6.0.2 + debug: 4.3.4 + socks: 2.7.0 + transitivePeerDependencies: + - supports-color + dev: false + optional: true + /socks/2.7.0: resolution: {integrity: sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==} engines: {node: '>= 10.13.0', npm: '>= 3.0.0'} dependencies: ip: 2.0.0 smart-buffer: 4.2.0 - dev: true /sorcery/0.11.0: resolution: {integrity: sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==} @@ -30417,6 +30644,9 @@ packages: optionalDependencies: cpu-features: 0.0.4 nan: 2.17.0 + transitivePeerDependencies: + - bluebird + - supports-color dev: false /sshpk/1.17.0: @@ -30446,6 +30676,14 @@ packages: minipass: 3.3.5 dev: true + /ssri/9.0.1: + resolution: {integrity: sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + minipass: 3.3.5 + dev: false + optional: true + /stable/0.1.8: resolution: {integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==} deprecated: 'Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility' @@ -31255,7 +31493,6 @@ packages: /symbol-tree/3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - dev: true /symbol.prototype.description/1.0.0: resolution: {integrity: sha512-I9mrbZ5M96s7QeJDv95toF1svkUjeBybe8ydhY7foPaBmr0SPJMFupArmMkDrOKTTj0sJVr+nvQNxWLziQ7nDQ==} @@ -31777,7 +32014,6 @@ packages: punycode: 2.1.1 universalify: 0.2.0 url-parse: 1.5.10 - dev: true /tr46/0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} @@ -31794,7 +32030,6 @@ packages: engines: {node: '>=12'} dependencies: punycode: 2.1.1 - dev: true /traverse/0.3.9: resolution: {integrity: sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==} @@ -32028,7 +32263,6 @@ packages: engines: {node: '>= 0.8.0'} dependencies: prelude-ls: 1.1.2 - dev: true /type-check/0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} @@ -32358,12 +32592,28 @@ packages: unique-slug: 2.0.1 dev: true + /unique-filename/2.0.1: + resolution: {integrity: sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + unique-slug: 3.0.0 + dev: false + optional: true + /unique-slug/2.0.1: resolution: {integrity: sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==} dependencies: imurmurhash: 0.1.4 dev: true + /unique-slug/3.0.0: + resolution: {integrity: sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + imurmurhash: 0.1.4 + dev: false + optional: true + /unique-stream/2.2.1: resolution: {integrity: sha512-/GNX/RGgMszHjKb8lBKSbTzgKgLfpnyJ4ZgRf73oZxhsrZB5rMkhdgnUleOwTyoBFsAni1iAAUaWuCIPnXDwWA==} dependencies: @@ -32485,7 +32735,6 @@ packages: /universalify/0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} - dev: true /universalify/1.0.0: resolution: {integrity: sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==} @@ -33127,7 +33376,6 @@ packages: deprecated: Use your platform's native performance.now() and performance.timeOrigin. dependencies: browser-process-hrtime: 1.0.0 - dev: true /w3c-keyname/2.2.4: resolution: {integrity: sha512-tOhfEwEzFLJzf6d1ZPkYfGj+FWhIpBux9ppoP3rlclw3Z0BZv3N7b7030Z1kYth+6rDuAsXUFr+d0VE6Ed1ikw==} @@ -33145,7 +33393,7 @@ packages: engines: {node: '>=12'} dependencies: xml-name-validator: 4.0.0 - dev: true + dev: false /w3c-xmlserializer/4.0.0: resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} @@ -33215,7 +33463,6 @@ packages: asn1js: 3.0.5 pvtsutils: 1.3.2 tslib: 2.1.0 - dev: true /webext-additional-permissions/1.0.0: resolution: {integrity: sha512-QHMAah++muVoK/d+aYM56BY2DdpMAFMvW/dG28/+SdYJxgUsShsm3fOuwCPIiAIgsC8lsM52hZNJ1ROeii1lKg==} @@ -33249,7 +33496,6 @@ packages: /webidl-conversions/7.0.0: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} engines: {node: '>=12'} - dev: true /webpack-bundle-analyzer/4.7.0: resolution: {integrity: sha512-j9b8ynpJS4K+zfO5GGwsAcQX4ZHpWV+yRiHDiL+bE0XHJ8NiPYLTNVQdlFYWxtpg9lfAQNlwJg16J9AJtFSXRg==} @@ -33707,7 +33953,6 @@ packages: engines: {node: '>=12'} dependencies: iconv-lite: 0.6.3 - dev: true /whatwg-fetch/3.5.0: resolution: {integrity: sha512-jXkLtsR42xhXg7akoDKvKWE40eJeI+2KZqcp2h3NsOrRnDvtWX36KcKl30dy+hxECivdk2BVUHVNrPtoMBUx6A==} @@ -33719,7 +33964,6 @@ packages: /whatwg-mimetype/3.0.0: resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} engines: {node: '>=12'} - dev: true /whatwg-url/10.0.0: resolution: {integrity: sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==} @@ -33727,7 +33971,7 @@ packages: dependencies: tr46: 3.0.0 webidl-conversions: 7.0.0 - dev: true + dev: false /whatwg-url/11.0.0: resolution: {integrity: sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==} @@ -33735,7 +33979,6 @@ packages: dependencies: tr46: 3.0.0 webidl-conversions: 7.0.0 - dev: true /whatwg-url/5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} @@ -34083,7 +34326,6 @@ packages: /xml-name-validator/4.0.0: resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} engines: {node: '>=12'} - dev: true /xml/1.0.1: resolution: {integrity: sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==} @@ -34116,7 +34358,6 @@ packages: /xmlchars/2.2.0: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} - dev: true /xmlhttprequest-ssl/2.0.0: resolution: {integrity: sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==} diff --git a/schema/BUILD.bazel b/schema/BUILD.bazel index 82f753cb8d3..41d33c32a68 100644 --- a/schema/BUILD.bazel +++ b/schema/BUILD.bazel @@ -1,7 +1,18 @@ +load("@aspect_rules_ts//ts:defs.bzl", "ts_config") load("@io_bazel_rules_go//go:def.bzl", "go_library") load("@aspect_rules_js//js:defs.bzl", "js_library") +load("//dev:defs.bzl", "npm_package") -package(default_visibility = ["//client/shared:__pkg__"]) +package(default_visibility = ["//visibility:public"]) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + visibility = ["//client:__subpackages__"], + deps = [ + "//:tsconfig", + ], +) js_library( name = "json-schema-draft-07", @@ -71,3 +82,14 @@ go_library( visibility = ["//visibility:public"], deps = ["@com_github_sourcegraph_go_jsonschema//jsonschema"], ) + +js_library( + name = "schema-json", + srcs = glob(["*.schema.json"]), + visibility = ["//visibility:public"], +) + +npm_package( + name = "schema_pkg", + srcs = ["package.json"], +) diff --git a/tsconfig.bazel.json b/tsconfig.bazel.json deleted file mode 100644 index 46a50170041..00000000000 --- a/tsconfig.bazel.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "include": ["**/*"], - "exclude": [] -} diff --git a/ui/assets/img/BUILD.bazel b/ui/assets/img/BUILD.bazel new file mode 100644 index 00000000000..6f9ef8b9701 --- /dev/null +++ b/ui/assets/img/BUILD.bazel @@ -0,0 +1,4 @@ +filegroup( + name = "img", + srcs = glob(["**/*.*"]), +)