Commit Graph

32 Commits

Author SHA1 Message Date
Taras Yemets
23a2cea646
Create a shared Cody Ignore dataset (#61968) 2024-05-09 13:18:35 +00:00
Vova Kulikov
ff6f396abb
Cody web: Bring back old packages from git history (#61376)
* Add cody-shared package

* Add cody-ui package

* Adjust web package and install new deps

* Minor fixes in build bazel

* Configure

* Run prettier

* Run prettier

* Fix linters

* Fix eslint problems

* Update tsconfig refs

* Remove unused code

* Update packages build files

* Update packages build files

* Update packages build files 2

* Remove wildcard from cody-ui

* Attempt to fix bazel file for cody-ui

* Run prettier

* fix cody bazel file

* Update tsconfig refs

* Remove unused/unsupported recipes  from cody-shared
2024-04-08 14:21:41 +02:00
Vova Kulikov
0f8b28b5b9
Revert "use vite for web builds (#58228)" (#59132)
This reverts commit 86180de04a.
2023-12-20 16:23:45 -03:00
Quinn Slack
86180de04a
use vite for web builds (#58228)
* remove little-used `web-standalone-http-prod`

This let you run a local web app built in production mode against a remote Sourcegraph endpoint. You can still run a local web app built in *dev* mode.

* add `sg test bazel-backend-integration`

* fix DeveloperDialog positioning

It was taking up 100% width and was translated -50% so the left half of it was off-viewport.

* use vite for web builds

[Vite](https://vitejs.dev/) is a fast web bundler. With Vite, a local dev server is available as fast as with esbuild, and incremental builds are (1) hot (no page reload needed) and (2) much faster (<500ms).

* fix "manifestPlugin.d.ts" was not created

* sg lint

* remove little-used `web-standalone-http-prod`

This let you run a local web app built in production mode against a remote Sourcegraph endpoint. You can still run a local web app built in *dev* mode.

* add `sg test bazel-backend-integration`

* fix DeveloperDialog positioning

It was taking up 100% width and was translated -50% so the left half of it was off-viewport.

* use vite for web builds

[Vite](https://vitejs.dev/) is a fast web bundler. With Vite, a local dev server is available as fast as with esbuild, and incremental builds are (1) hot (no page reload needed) and (2) much faster (<500ms).

* fix "manifestPlugin.d.ts" was not created

* sg lint

* small lint fix

* added events shim to client/web/BUILD.bazel

* updated via bazel configure

* added in side-effectful import for EventEmitter

* added in side-effectful import for EventEmitter

* ran bazel configure

* re-run bazel configure

* pnpm dedupe

---------

Co-authored-by: William Bezuidenhout <william.bezuidenhout@sourcegraph.com>
Co-authored-by: jamesmcnamara <jamesscottmcnamara@gmail.com>
Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
2023-12-19 19:16:51 -08:00
Quinn Slack
4002774429
reapply "switch from jest to vitest for faster, simpler tests (#57886)" (#58145)
* reapply "switch from jest to vitest for faster, simpler tests (https://github.com/sourcegraph/sourcegraph/pull/57886)"

This was reverted in https://github.com/sourcegraph/sourcegraph/pull/58116 due to an issue with the browser tests.

* include fetch-mock

* fix flakiness

* rm mock that did not work in experimentalVmThreads

* fix

* timeout

* fixup

---------

Co-authored-by: William Bezuidenhout <william.bezuidenhout@sourcegraph.com>
2023-11-07 12:00:18 +02:00
William Bezuidenhout
7f4bebe29d
Revert: bazel+vitest - when running vitests concurrently the target //client/browser:test fails (#58116)
When running vitests concurrently the target //client/browser:test fails

Revert "switch from jest to vitest for faster, simpler tests (#57886)"

This reverts commit ae5325e432.
2023-11-06 14:02:35 +02:00
Quinn Slack
ae5325e432
switch from jest to vitest for faster, simpler tests (#57886)
Replaces our usage of jest with vitest. Also removes the babel transpiler. This simplifies our test configuration by a lot, makes tests run 10% faster, and makes further modernizations to our build/test stuff possible (such as using vite for frontend builds).

This removes some of the junit exporting for Buildkite, and the vitest bazel defs don't really cleanly implement bazel testing guidelines (like sharding). But vitest is only used for unit tests (all integration/e2e/regression tests have always run in mocha), so none of them are very slow anyway.

## Codemods for vitest imports

fastmod -e js,ts,tsx @jest/globals vitest client/ dev/release/
fastmod -e js,ts,tsx 'jest\.(\w+)\(' 'vi.$1(' client/ dev/release/
fastmod -e js,ts,tsx 'jest,' 'vi,' client/ dev/release/
fastmod -e js,ts,tsx 'jest }' 'vi }' client/ dev/release/
git diff --diff-filter=M --name-only | xargs pnpm exec prettier --write
2023-11-05 21:57:04 -10:00
Quinn Slack
6bdcd5e59c
simplify tsconfig.json files (#57913) 2023-10-26 03:03:11 -07:00
Quinn Slack
006bd2fea3
remove cody code that was moved to separate cody repo (#54729)
Cody code is being moved to https://github.com/sourcegraph/cody. This PR
removes the moved code and configures this repository to use the
`@sourcegraph/cody-{shared,ui}` packages published by the new separate
Cody repository.

## Test plan

Ensure that the new separate Cody repository tests pass. Ensure that
this repository's tests pass now that it uses 2 npm packages published
by the new separate Cody repository.
2023-07-10 00:31:47 -10:00
Quinn Slack
e38f81574d
extract Cody UI package, add Cody to web app (#50270)
- The new `client/cody-ui` package (`@sourcegraph/cody-ui`) contains
reusable components for Cody's UI that are shared among all web UIs for
Cody.
- The Sourcegraph web app repo sidebar now adds a `Cody` tab (alongside
files and symbols) when the `cody-experimental` feature flag is enabled.
This lets you use Cody in the web app.
- A new demonstration `client/cody-web` package implements a standalone
web app for Cody.

No behavior change is intended to the Cody code.

## Test plan

Build and run the Cody extension locally. Ensure that it still functions
as is. All other changes are experimental and behind a feature flag (in
the main web app).
2023-04-02 17:41:20 -07:00
Valery Bugakov
ce38bbc724
web: fix pnpm-lock issue (#47478)
Fixes the issue caused by the presence of the `sourcegraph: ''` entry in the `pnpm-lock.yaml`. If we install any new dependency, the `pnpm install` command fails on CI. [Failure example](https://github.com/sourcegraph/sourcegraph/actions/runs/4121774771/jobs/7117792725).
2023-02-09 22:04:31 -08:00
Valery Bugakov
3512fb9aa2
web: sync TS project refenreces (#46407) 2023-01-16 18:55:10 -08:00
GitStart-SourceGraph
2729f21766
[SG-46115] - Merge the search-ui package into the branded package (#46197)
* chore: merge search-ui package into branded package
2023-01-11 18:27:19 +01:00
Valery Bugakov
b10c94b717
web: eliminate storybook & wildcard circle (#45976) 2023-01-04 18:39:15 -08:00
Valery Bugakov
6d45dee7f5
web: merge the search package into shared (#45949) 2022-12-25 20:23:54 -08:00
Bolaji Olajide
407dd57e2c
run prettier command (#42896)
Run `yarn format` on the codebase.
2022-10-12 18:09:13 +00:00
Philipp Spiess
dd4fa82d98
Report bundle size diff in PRs (#42277) 2022-10-12 10:19:51 +02:00
Valery Bugakov
19218b075b
web: create the observability-client package (#40398) 2022-08-17 01:57:00 -07:00
GitStart-SourceGraph
44082f5b73
[SG-33302] Upgrade all client packages to use the latest version of the JSX transform (#34287)
Co-authored-by: gitstart-sourcegraph <gitstart@users.noreply.github.com>
2022-04-22 12:25:38 +01:00
GitStart-SourceGraph
6cb8f5016a
Create a client-api package (#31151) 2022-03-17 01:17:26 -07:00
GitStart-SourceGraph
a39e8c44b6
Move modules to the @sourcegraph/common package into util (#29976)
* Move modules to the @sourcegraph/common package into util

Co-authored-by: gitstart-sourcegraph <gitstart@users.noreply.github.com>
2022-02-08 12:09:56 +07:00
TJ Kandala
29ef1da2a9
Create search and search-ui packages (#29773)
Co-authored-by: Juliana Peña <juliana@sourcegraph.com>
2022-01-20 12:56:23 -05:00
GitStart-SourceGraph
e7e705c808
[SG-28893] refactor: extract graphql folder into a new http-client package. (#29346)
Co-authored-by: gitstart-sourcegraph <gitstart@users.noreply.github.com>
2022-01-13 18:40:35 +01:00
GitStart-SourceGraph
f9dc317cfe
refactor: extract codeintellify as new package (#29233)
* refactor: extract codeintellify as new package

* feat: add client/codeintellify into lsif-ts

Co-authored-by: gitstart-sourcegraph <gitstart@users.noreply.github.com>
2022-01-10 22:29:47 +07:00
GitStart-SourceGraph
f9ecd86d79
Extract util/errors.ts into a new common package (#29040)
Co-authored-by: gitstart-sourcegraph <gitstart@users.noreply.github.com>
2021-12-24 17:50:53 +07:00
Tom Ross
16b1203984
Fix: Colors Storybook unable to retrieve CSS variables (#22113) 2021-06-16 15:41:20 +01:00
Erik Seliger
6aed7c14f3
Upgrade css-loader to latest version (#20184)
There were a few config changes and a change to the URL resolution algorithm, which was easiest to work around by moving the one only url in the entire webapp outside of the sass code. This should be another precursor for webpack 5 support.
Also I had to switch to a republished version of pin to-string-loader that fixes usage with css-loader v4+, but was never released to NPM.
2021-04-22 18:30:36 +02:00
Erik Seliger
c03cc7bd1e
Support multiple GraphQL schema files (#20077)
This PR adjusts all configs/generators/linters that we use to support multiple `.graphql` files to be stitched together for the final schema.
This should help a bit with the MASSIVE `schema.graphql` file that has grown to around 10k loc by now, by encapsulating different fields of concern into separate files. Using the `extend` keyword, there is nothing that cannot be expressed with separate files that could have been with a single file, so there are no drawbacks to this method, that I'm aware of.

In a follow-up PR, I will restructure the backend code for this a bit and make it so the enterprise schema is not used in OSS (which gives better introspection, because there is less noise from fields that aren't accessible because OSS) and doesn't require us to implement a `defaultXXResolver`.
2021-04-19 14:35:49 +02:00
Valery Bugakov
179498b257
web: flatten frontend packages inside of the client folder (#19378)
* web: flattened frontend packages inside of the client folder

* web: please prettier 🙏

* web: reverted redundant changes

* web: reverted redundant whitespace changes

* Update client/README.md

Co-authored-by: Patrick Dubroy <patrick@sourcegraph.com>

* Update client/README.md

Co-authored-by: Patrick Dubroy <patrick@sourcegraph.com>

* Update client/README.md

Co-authored-by: Patrick Dubroy <patrick@sourcegraph.com>

* web: updated client/README

* Update client/README.md

Co-authored-by: Tom Ross <tom@umpox.com>

* web: changed licenses to Apache-2.0 for frontend packages

* web: reverted redudant change

* web: updated client/README

* web: added issue #

* web: added issue #

Co-authored-by: Patrick Dubroy <patrick@sourcegraph.com>
Co-authored-by: Tom Ross <tom@umpox.com>
2021-03-26 15:35:26 +08:00
Eric Fritz
f580846978
codeintel: Add UI to configure indexing jobs (#16470) 2020-12-07 18:31:40 -06:00
Felix Becker
85f198b04c
Move shared branded code to branded/ (#14515) 2020-10-08 15:14:34 +02:00
Felix Becker
45f9839011
Move all client code into client/ folder (#14480) 2020-10-07 22:23:53 +02:00