Commit Graph

38 Commits

Author SHA1 Message Date
Camden Cheek
1ead945267
Docs: update links to point to new site (#60381)
We have a number of docs links in the product that point to the old doc site. 

Method:
- Search the repo for `docs.sourcegraph.com`
- Exclude the `doc/` dir, all test fixtures, and `CHANGELOG.md`
- For each, replace `docs.sourcegraph.com` with `sourcegraph.com/docs`
- Navigate to the resulting URL ensuring it's not a dead link, updating the URL if necessary

Many of the URLs updated are just comments, but since I'm doing a manual audit of each URL anyways, I felt it was worth it to update these while I was at it.
2024-02-13 00:23:47 +00:00
Quinn Slack
07f29c98d6
use @typescript-eslint projectService for faster eslint (#57851)
See https://github.com/typescript-eslint/typescript-eslint/pull/6754.

Also removes needless `.eslintrc.js` files (now that we can use the root `tsconfig.all.json` for linting and it's still fast enough).

Some of our eslint rules were unintentionally made ineffective in `client/web`, and this commit also re-enables them and in some cases suppresses the eslint warning where a fix is not urgent.
2023-10-24 01:40:40 +00:00
Quinn Slack
59c82bcfb1
disable frontend code coverage tracking (#57820)
Our tracking of frontend (TypeScript) code coverage has decayed and was no longer being used. The Codecov report at https://app.codecov.io/gh/sourcegraph/sourcegraph significantly under-counts coverage, and what coverage tasks we did have were flaky in CI and relied on old libraries that have not been updated recently to keep with modern practices (such as `@storybook/addon-storyshots` only supporting Jest with `injectGlobals`).

From https://sourcegraph.slack.com/archives/C04MYFW01NV/p1698059032863009?thread_ts=1698054092.709309&cid=C04MYFW01NV, the proposal is to remove coverage tracking for now and prioritize getting tests to run really fast and smooth locally first, including upgrading our testing infra, and then reenable code coverage tracking.
2023-10-23 21:29:40 +00:00
Quinn Slack
3a730c6f9a
remove client/extension-api stub (#57451) 2023-10-08 14:05:20 +09:00
coury-clark
3cd931ef54
relicense all paths other than MIT licensed code, client/cody*, jetbrains, VS code, and browser extension to enterprise (#53345) (#53345)
Preparing for 5.1 based on latest executive decisions. Re-licensing the
majority of sourcegraph/sourcegraph to enterprise instead of Apache.
Official external statements forthcoming with 5.1 release.

[Searching this branch for LICENSE files
](https://sourcegraph.sourcegraph.com/search?q=context:sourcegraph+repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24+file:LICENSE%24+-file:client/cody+rev:cclark/relicense&patternType=standard&sm=1&groupBy=path)

This leaves only 2 licenses in directories other than `client/cody*`
1. MIT code in syntax highlighter
2. MIT code in react-accessible-treeview

Edit: updates from exec team
Jetbrains extension / VS Code extension / browser extension will remain
Apache

Here is a search showing all Apache licensed paths in this branch
https://sourcegraph.sourcegraph.com/search?q=context:sourcegraph+repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24+file:LICENSE%24++rev:cclark/relicense&patternType=standard&sm=1&groupBy=path

If either of those should be changing, please let me know.
## Test plan
N/A
<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->
2023-06-13 10:28:11 -07:00
Greg Magolan
b398952eca
Revert "revert "bazel: improve ESLint rule" (#52853)" (#52878)
- Revert "revert "bazel: improve ESLint rule" (#52853)"
- bazel: fix eslint custom rule so js_binary runfiles are included as
tool inputs to ctx.actions.run_shell

## Test plan

Tested locally that fix commit resolves the
```
FATAL: aspect_rules_js[js_test]: RUNFILES environment variable is not set
```
flaky issue that prompted the revert
2023-06-04 19:06:39 -07:00
Valery Bugakov
e4b4c631cf
revert "bazel: improve ESLint rule" (#52853)
This reverts commit ff3ce9fe93 because of
the flaky errors on `main`. See [this Slack
thread](https://sourcegraph.slack.com/archives/C02FLQDD3TQ/p1685697360822839?thread_ts=1685696480.396849&cid=C02FLQDD3TQ).
2023-06-02 13:29:06 +00:00
Valery Bugakov
ff3ce9fe93
bazel: improve ESLint rule and disable ESLint outside of Bazel (#52667)
- Custom ESLint Bazel rule now relies on `sh_test`. The build part of
the rule produces the output file with ESLint errors, and the `sh_test`
target verifies that it's empty. If it's not empty, the ESLint test
fails, and the report content is printed to stdout.
- Added additional ESLint targets to `*.js` files in the root of each
client package.
- Added additional ESLint targets for `*.story.tsx` files for client
packages with stories. It's temporary until we start building Storybook
story modules with `ts_project`.
- Disabled ESLint outside of Bazel: **10-12m job is gone!** 🎉

## Test plan

bazel test `bazel query 'attr("name", ".*_eslint$", //client/...)'`
2023-06-02 08:37:40 +00:00
Valery Bugakov
760db946dd
bazel: implement custom ESLint Bazel rule (#52062)
- Upgraded `aspect_bazel_lib`, `aspect_rules_js` and `aspect_rules_ts`
to the latest versions.
- Ran [bazel run
//.aspect/bazelrc:update_aspect_bazelrc_presets](40a7422385)
- Added `eslint_config` macro for client package eslint configuration
`js_library` targets.
- Implemented the custom ESLint rule, which copies `srcs` with
dependencies and **declarations** to the Bazel to lint them. This way,
we maintain the ability to do type-aware linting in Bazel.
- Added a custom ESLint formatter used in Bazel to print out relative
paths in ESLint reports.

In the follow-up PR, I will look into improvements suggested by
@alexeagle that should allow us to convert ESLint build targets into
test targets and gracefully manage linting failures.

## Test plan

1. CI
2. `bazel build $(bazel query 'kind("_eslint_test_with_types",
//client/...)')`
2023-05-22 04:05:45 -07:00
Vova Kulikov
5fca5ae3b0
Remove views api from extension api (#50451)
This PR removes old views extension logic that was used primary for the
first prototype version of code insights and it's no longer used
anywhere in our application at the moment.

## Test plan
- Make sure that CI is green and there is no regression in still used
extension logic
2023-04-06 16:59:30 -03:00
Quinn Slack
ae338b9797
remove code host native tooltip toggle, hover alerts, command palette, notifs (#48688)
- Remove support for toggling native tooltips from the browser
extension. This let users choose to keep the browser extension installed
and partially active on GitHub but not show Sourcegraph's hovers. This
functionality is less important now that GitHub's new code nav no longer
uses hovers. For old GitHub Enterprise server instances (and GitHub.com
users who have not enabled the new code view), users can disable the
browser extension if they want to disable Sourcegraph's hover
functionality.
- Remove hover alerts, which were used to warn users that the results
are imprecise. We still show this in a hover badge, which is a much
nicer UI for this than a dismissible warning (which felt more "CYA").
- Remove command palette because it was inextricable from notifications
and it was only used by the Sourcegraph extension API (which is
deprecated and will be removed).
- Remove the old notifications UI, which showed notification messages in
Sourcegraph and code host UIs. This is no longer necessary with the
removal of the command palette, because it is no longer possible to
invoke long-running actions whose errors must be shown in a separate,
global UI.

## Test plan

Existing tests suffice to test the existing code intelligence
functionality. This PR just removes functionality.
2023-03-06 20:36:18 -08:00
Quinn Slack
bd499cc8ef
remove queryTransformer API and undocumented go.imports: search operator (#48686)
There was an undocumented `go.imports:` search operator that did a hacky
attempt to find Go files that imported a given package. This was never
documented and was the only known use of the query transformer API in
the deprecated Sourcegraph extension API. This removal is part of the
removal of the deprecated Sourcegraph extension API. The upcoming
support for packages in Sourcegraph will be a better way to support this
in the future.

## Test plan

The existing search integration tests are sufficient to ensure that this
does not break searches in general.
2023-03-05 19:24:08 -08:00
Jason Bedard
10aefc4bb7
bazel: add bazel build,tests for client/* (#46193)
Webpack bundles compile but need further testing. Jest + mocha tests
compile but are marked as `manual` until further work is done to get them
passing. The four jest tests are green and enabled now, though.

## Test plan

`bazel build //client/...` and `bazel test //client/...`
2023-02-28 20:46:03 -08: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
304acdb5da
web: migrate from yarn to pnpm (#46143)
Bazel's rules_js rely on the pnpm package manager. To simplify the integration, we're migrating to pnpm from our current package manager — yarn. Another reason to migrate is that pnpm is cool and fast. 😉
2023-01-11 19:50:09 -08:00
Quinn Slack
8a43f44fe2
remove extension decorations (#46056)
This is part of the deprecation and removal of the extension API. This change will only affect instances using `enableLegacyExtensions` that upgrade to version 4.4 on Jan 20 or later.
2023-01-03 05:37:05 -10:00
Quinn Slack
4a178dad52
remove deprecated browser extension completion and link preview providers (#46022)
These features have been deprecated for more than 1 year and were always experimental. They rely on the (also) deprecated extension API, which is slated for removal soon. This commit is one step on the way to that removal.
2023-01-01 19:38:30 -10:00
Quinn Slack
80024726b7
remove extension registry UI and related GraphQL API (#45891)
Removes the extension registry UI and the GraphQL API that is necessary for the registry extension UI.

Any extensions that already exist locally or remotely can still be used with the enableLegacyExtensions site config flag and by enabling the extensions in your user settings.

This change is an intermediate step toward removing the extension registry (except the endpoint that's needed to support pre-4.0 Sourcegraph instances).

I think this PR has a 99% chance of going into the 4.4 release (2023-01-20) and not needing to be reverted. Subsequent PRs that actually make it impossible to use local or custom legacy extensions are still pending customer communication and confirmation. I hope we can merge other future PRs there as well, but there is a greater chance we'd need to revert them before 4.4. By making this PR first, it means less of a revert and more progress regardless of what we learn from customers.
2022-12-22 00:10:56 -08:00
Quinn Slack
9527dcc62a
remove extension API status bar (#45921)
This was not used in any important way by any legacy extensions and is not used by the new code intel support. Removing this is part of our removal of the legacy extension API.
2022-12-22 06:31:00 +00:00
Jason Bedard
fc1589106d
bazel - build client/common + client/extension-api-types (#45689)
* bazel: add aspect rules_ts,jest, upgrade rules_js, generate pnpm-lock.yaml

* bazel: add initial typescript rules

* bazel: build client/extension-api-types

* bazel: build client/common
2022-12-15 11:58:45 +01:00
Philipp Spiess
b759461a2a
BExt: Update repo not found hover warning (#42509) 2022-10-06 17:45:06 +00:00
Taras Yemets
0fee82ddde
extensions: remove decorations column display support (#41124) 2022-09-01 17:08:27 +03:00
GitStart-SourceGraph
b283d24198
[SG-39284] Upgrade yarn to the latest version (#39728) 2022-08-31 20:39:53 -07:00
Cesar Jimenez
2e9aaa96f6
Renaming code intel routes (#38973) 2022-07-19 11:32:21 -04:00
Keegan Carruthers-Smith
65c731eecf
all: replace links to sourcegraph master to main (#36344)
Spotted a place linking to the master branch. Ended up updating all
references I could find with a simple regex:

  ruplacer --go '(sourcegraph/sourcegraph/[^/]+)/master/' '$1/main/'

Test Plan: CI
2022-06-29 22:29:07 +00:00
Taras Yemets
c9327d774d
extensions: show extensions decorations in separate columns as experimental feature (#36007) 2022-06-08 15:10:58 +03:00
Vova Kulikov
948ca3523d
WebApp [Typescript]: Update TS version to 4.7.2 (#36033)
* Update TS version to 4.7.2

* Update gql types and revert handling error type problems

* Update ts-loader

* Use T|null instead of Partial<T>| undefined for the GQL response data
2022-05-31 13:57:14 +08:00
Valery Bugakov
868472f43e
ci: run client linters on changed files (#33701) 2022-04-14 00:37:25 -07:00
Thorsten Ball
3daa1c5364
extension api: allow ext to specify max results in panels (#29738)
Follow up to #29629 to allow extensions to also use the user-configured
`codeIntelligence.maxPanelResults` setting to tell the Sourcegraph how
many results are shown in provided panel.
2022-01-17 14:11:24 +01:00
Vova Kulikov
ac384c1668
Code Insights: Add data points links to backend insights (#29587)
* Extend sourcegraph.d.ts API types

* Use link URLs map inline chart components

* Update insight chart data generators based on the new API of LineChart

* Support backward compatibility with linkURLs list interface
2022-01-12 22:01:31 +03:00
Chris Wendt
15715837e2
codeintel: add support for find-implementations (#24854) 2021-11-04 12:53:59 -06:00
Rok Novosel
5e13bccfc5
search: deprecate version contexts in the extension API (#26273) 2021-10-26 13:08:49 +02:00
Vova Kulikov
76d626ac7a
Code Insights: Fix funky colors of insight data-series (#25005)
* Add chart data preparation step for the line chart axis

* Add comments to process data methods

* Update CHANGELOG.md

* Add inactive Percy class to the root element of the line chart
2021-09-16 22:35:32 +03:00
Tom Ross
aaec1239e4
GraphQL Client: Update GraphQL error types (#22721) 2021-07-21 09:57:49 +01:00
Quinn Keast
e60b77a1f1
Add basic API doc, clean up links and stuff (#21727)
* Improve docs based on hallway test

* Scaffold the contexts API page

* Update heading level

* Add search contexts API docs examples. Remove experimental from search contexts docs and fix links.

* Fix links

* Add link to API doc

Co-authored-by: Rok <rok@sourcegraph.com>
2021-06-04 11:04:08 +02:00
TJ Kandala
fecd730df3
extensions: implement logging API (#20474)
Add sourcegraph.app.log to the extension API. Logs are automatically prefixed with the extension's ID.

Co-authored-by: Felix Becker <felix.b@outlook.com>
2021-05-13 12:55:11 -04:00
Rok Novosel
487adcb958
search contexts: add to extension API (#19803) 2021-04-19 07:43:17 +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