Skip to content

Commit

Permalink
Move all client code into client/ folder (sourcegraph#14480)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfbecker authored Oct 7, 2020
1 parent 2807f5f commit 45f9839
Show file tree
Hide file tree
Showing 1,705 changed files with 318 additions and 245 deletions.
32 changes: 16 additions & 16 deletions .buildkite/pipeline.e2e.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
env:
ENTERPRISE: "1"
DOCKER_BUILDKIT: "1"
FORCE_COLOR: "3"
GO111MODULE: "on"
IMAGE: "server_instrumented"
TAG: "${BUILDKITE_BUILD_NUMBER}_${BUILDKITE_RETRY_COUNT}"
COVERAGE_INSTRUMENT: "true"
VAGRANT_RUN_ENV: "CI"
ENTERPRISE: '1'
DOCKER_BUILDKIT: '1'
FORCE_COLOR: '3'
GO111MODULE: 'on'
IMAGE: 'server_instrumented'
TAG: '${BUILDKITE_BUILD_NUMBER}_${BUILDKITE_RETRY_COUNT}'
COVERAGE_INSTRUMENT: 'true'
VAGRANT_RUN_ENV: 'CI'

steps:
- artifact_paths: ./puppeteer/*.png;./web/e2e.mp4;./web/ffmpeg.log
# setting to pass until tests are 100% confirmed as working, so as to avoid disruting dev workflow on main
command:
- .buildkite/test.sh sourcegraph-e2e || true
timeout_in_minutes: 20
label: ':docker::arrow_right::chromium:'
agents:
queue: 'baremetal'
- artifact_paths: ./puppeteer/*.png;./client/web/e2e.mp4;./client/web/ffmpeg.log
# setting to pass until tests are 100% confirmed as working, so as to avoid disruting dev workflow on main
command:
- .buildkite/test.sh sourcegraph-e2e || true
timeout_in_minutes: 20
label: ':docker::arrow_right::chromium:'
agents:
queue: 'baremetal'
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ cmd/indexer/debug

# Web
node_modules/
/web
/client/web

# Extensions
/packages/sourcegraph-extension-api/dist
24 changes: 12 additions & 12 deletions .github/workflows/lsif.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- name: Generate
run: ./node_modules/.bin/gulp generate
- name: Generate LSIF data
working-directory: web/
working-directory: client/web/
run: lsif-tsc -p .
- name: Upload LSIF data
working-directory: web/
working-directory: client/web/
run: src lsif upload -github-token=${{ secrets.GITHUB_TOKEN }}

lsif-tsc-shared:
Expand All @@ -45,10 +45,10 @@ jobs:
- name: Generate
run: ./node_modules/.bin/gulp generate
- name: Generate LSIF data
working-directory: shared/
working-directory: client/shared/
run: lsif-tsc -p .
- name: Upload LSIF data
working-directory: shared/
working-directory: client/shared/
run: src lsif upload -github-token=${{ secrets.GITHUB_TOKEN }}

lsif-tsc-browser:
Expand All @@ -64,10 +64,10 @@ jobs:
- name: Generate
run: ./node_modules/.bin/gulp generate
- name: Generate LSIF data
working-directory: browser/
working-directory: client/browser/
run: lsif-tsc -p .
- name: Upload LSIF data
working-directory: browser/
working-directory: client/browser/
run: src lsif upload -github-token=${{ secrets.GITHUB_TOKEN }}

lsif-eslint-web:
Expand All @@ -85,10 +85,10 @@ jobs:
- name: Build TypeScript
run: yarn run --ignore-engines build-ts
- name: Generate LSIF data
working-directory: web/
working-directory: client/web/
run: yarn eslint -f lsif -o dump.lsif
- name: Upload LSIF data
working-directory: web/
working-directory: client/web/
run: src lsif upload -github-token=${{ secrets.GITHUB_TOKEN }}

lsif-eslint-shared:
Expand All @@ -106,10 +106,10 @@ jobs:
- name: Build TypeScript
run: yarn run --ignore-engines build-ts
- name: Generate LSIF data
working-directory: shared/
working-directory: client/shared/
run: yarn eslint -f lsif -o dump.lsif
- name: Upload LSIF data
working-directory: shared/
working-directory: client/shared/
run: src lsif upload -github-token=${{ secrets.GITHUB_TOKEN }}

lsif-eslint-browser:
Expand All @@ -127,8 +127,8 @@ jobs:
- name: Build TypeScript
run: yarn run --ignore-engines build-ts
- name: Generate LSIF data
working-directory: browser/
working-directory: client/browser/
run: yarn eslint -f lsif -o dump.lsif
- name: Upload LSIF data
working-directory: browser/
working-directory: client/browser/
run: src lsif upload -github-token=${{ secrets.GITHUB_TOKEN }}
30 changes: 25 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,43 @@ cmd/indexer/debug

/.gtm/

# Web
node_modules/
# Client
node_modules
package-lock.json
.nyc_output/
coverage/
out/
shared/src/graphql/schema.ts
web/src/schema/*
client/shared/src/graphql/schema.ts
client/web/src/schema/*
puppeteer/
package-lock.json
/dist
sourcegraph-webapp-*.tgz
*.tsbuildinfo
graphql-operations.ts

# We use symlinks in the deeper node_modules to share the same .bin as the root (for CLI tools)
# unignore node_modules itself
!/client/web/node_modules
!/client/shared/node_modules
!/client/browser/node_modules
!/client/packages/sourcegraph-extension-api/node_modules
!/client/packages/@sourcegraph/extension-api-types/node_modules
# ignore everything inside node_modules
/client/web/node_modules/*
/client/shared/node_modules/*
/client/browser/node_modules/*
/client/packages/sourcegraph-extension-api/node_modules/*
/client/packages/@sourcegraph/extension-api-types/node_modules/*
# except .bin
!/client/web/node_modules/.bin
!/client/shared/node_modules/.bin
!/client/browser/node_modules/.bin
!/client/packages/sourcegraph-extension-api/node_modules/.bin
!/client/packages/@sourcegraph/extension-api-types/node_modules/.bin

# Extensions
/packages/sourcegraph-extension-api/dist
/client/packages/sourcegraph-extension-api/dist

# Symbols service: PCRE extension to sqlite3
libsqlite3-pcre.dylib
Expand Down
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ run:
timeout: 5m

skip-dirs:
- browser
- client
- web
- ui
- vendor
- shared
- node_modules
2 changes: 1 addition & 1 deletion .mocharc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
require: ['ts-node/register', 'abort-controller/polyfill', __dirname + '/shared/dev/fetch'],
require: ['ts-node/register', 'abort-controller/polyfill', __dirname + '/client/shared/dev/fetch'],
extension: ['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
Expand Down
6 changes: 3 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.bin/
*.bundle.*
client/phabricator/scripts/loader.js
browser/build
client/browser/build
**/package.json
**/coverage
internal/db/schema.md
Expand All @@ -13,8 +13,8 @@ vendor/
.nyc_output/
out/
dist/
shared/src/graphqlschema.ts
web/src/schema/
client/shared/src/graphqlschema.ts
client/web/src/schema/
ts-node-*
testdata
.github/*
Expand Down
2 changes: 1 addition & 1 deletion .storybook/coverage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import initStoryshots from '@storybook/addon-storyshots'
import { puppeteerTest } from '@storybook/addon-storyshots-puppeteer'
import * as path from 'path'
import { pathToFileURL } from 'url'
import { recordCoverage } from '../shared/src/testing/coverage'
import { recordCoverage } from '../client/shared/src/testing/coverage'

// This test suite does not actually test anything.
// It just loads up the storybook in Puppeteer and records its coverage,
Expand Down
2 changes: 1 addition & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')
const monacoEditorPaths = [path.resolve(__dirname, '..', 'node_modules', 'monaco-editor')]

const config = {
stories: ['../**/*.story.tsx'],
stories: ['../client/**/*.story.tsx'],
addons: ['@storybook/addon-knobs', '@storybook/addon-actions', '@storybook/addon-options', 'storybook-addon-designs'],
/**
* @param config {import('webpack').Configuration}
Expand Down
2 changes: 1 addition & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { configureActions } from '@storybook/addon-actions'
import { withConsole } from '@storybook/addon-console'
import { withKnobs } from '@storybook/addon-knobs'
import { addDecorator } from '@storybook/react'
import { setLinkComponent, AnchorLink } from '../shared/src/components/Link'
import { setLinkComponent, AnchorLink } from '../client/shared/src/components/Link'
import { withDesign } from 'storybook-addon-designs'
import isChromatic from 'chromatic/isChromatic'

Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"request": "launch",
"name": "Browser extension E2E Tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": ["--no-timeouts", "--colors", "${workspaceFolder}/browser/src/e2e/github.test"],
"args": ["--no-timeouts", "--colors", "${workspaceFolder}/client/browser/src/e2e/github.test"],
"internalConsoleOptions": "openOnSessionStart",
"skipFiles": ["<node_internals>/**"],
"env": {
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"**/bower_components": true,
"dist": true,
"ui/assets": true,
"browser/build": true,
"client/browser/build": true,
"**/coverage": true,
"**/out": true,
"**/__fixtures__/**": true,
Expand Down
8 changes: 4 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,21 @@
"label": "eslint:shared",
"type": "npm",
"script": "eslint",
"path": "shared/",
"path": "client/shared/",
"problemMatcher": ["$eslint-stylish"],
},
{
"label": "eslint:browser",
"type": "npm",
"script": "eslint",
"path": "browser/",
"path": "client/browser/",
"problemMatcher": ["$eslint-stylish"],
},
{
"label": "eslint:web",
"type": "npm",
"script": "eslint",
"path": "web/",
"path": "client/web/",
"problemMatcher": ["$eslint-stylish"],
},
{
Expand All @@ -100,7 +100,7 @@
"label": "eslint:extension-api",
"type": "npm",
"script": "eslint",
"path": "packages/sourcegraph-extension-api/",
"path": "client/packages/sourcegraph-extension-api/",
"problemMatcher": ["$eslint-stylish"],
},
],
Expand Down
4 changes: 2 additions & 2 deletions CODENOTIFY
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ doc/user/campaigns/**/* @eseliger
enterprise/internal/campaigns/**/* @eseliger
enterprise/cmd/frontend/internal/campaigns/**/* @eseliger
internal/campaigns/**/* @eseliger
web/src/enterprise/campaigns/**/* @eseliger
web/src/integration/campaigns.test.ts @eseliger
client/web/src/enterprise/campaigns/**/* @eseliger
client/web/src/integration/campaigns.test.ts @eseliger
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
LICENSE.apache (Apache License) applies to all files in this repository, except for those in the enterprise/ and web/src/enterprise/ directories, which are covered by LICENSE.enterprise.
LICENSE.apache (Apache License) applies to all files in this repository, except for those in the enterprise/ and client/web/src/enterprise/ directories, which are covered by LICENSE.enterprise.
12 changes: 6 additions & 6 deletions LICENSE.apache
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
##############################################################################
## ##
## NOTE: The following license applies to all files in this repository, ##
## except those in the enterprise/ and web/src/enterprise/ directories. ##
## ##
##############################################################################
#####################################################################################
## ##
## NOTE: The following license applies to all files in this repository, ##
## except those in the enterprise/ and client/web/src/enterprise/ directories. ##
## ##
#####################################################################################



Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ The `doc` directory has additional documentation for developing and understandin
### License
Sourcegraph OSS is available freely under the [Apache 2 license](LICENSE.apache). Sourcegraph OSS comprises all files in this repository except those in the `enterprise/` and `web/src/enterprise` directories.
Sourcegraph OSS is available freely under the [Apache 2 license](LICENSE.apache). Sourcegraph OSS comprises all files in this repository except those in the `enterprise/` and `client/web/src/enterprise` directories.
All files in the `enterprise/` and `web/src/enterprise/` directories are subject to the [Sourcegraph Enterprise license](LICENSE.enterprise).
All files in the `enterprise/` and `client/web/src/enterprise/` directories are subject to the [Sourcegraph Enterprise license](LICENSE.enterprise).
19 changes: 0 additions & 19 deletions browser/.github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

1 change: 0 additions & 1 deletion browser/node_modules/.bin

This file was deleted.

File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions browser/.eslintrc.js → client/browser/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const baseConfig = require('../.eslintrc')
const baseConfig = require('../../.eslintrc')
module.exports = {
extends: '../.eslintrc.js',
extends: '../../.eslintrc.js',
parserOptions: {
...baseConfig.parserOptions,
project: [__dirname + '/tsconfig.json', __dirname + '/src/end-to-end/tsconfig.json'],
Expand Down
1 change: 0 additions & 1 deletion browser/.gitignore → client/browser/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules
npm-debug.log
yarn-error.log
.DS_Store
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion browser/README.md → client/browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Install dependencies with `yarn` (install it globally with `npm i -g yarn` if ne

```sh
yarn
cd browser
cd client/browser
yarn build
```

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion shared/babel.config.js → client/browser/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/** @type {import('@babel/core').TransformOptions} */
const config = {
extends: '../babel.config.js',
extends: '../../babel.config.js',
}

module.exports = config
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion browser/jest.config.js → client/browser/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

/** @type {jest.InitialOptions} */
const config = require('../jest.config.base')
const config = require('../../jest.config.base')

/** @type {jest.InitialOptions} */
module.exports = { ...config, displayName: 'browser', rootDir: __dirname }
2 changes: 1 addition & 1 deletion browser/package.json → client/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dev": "yarn run build-inline-extensions && NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 TS_NODE_COMPILER_OPTIONS=\"{\\\"module\\\":\\\"commonjs\\\"}\" node -r ts-node/register scripts/development",
"dev:no-reload": "AUTO_RELOAD=false yarn run dev",
"dev:firefox": "if type web-ext 2>/dev/null; then web-ext run --source-dir ./build/firefox; else echo 'web-ext not found. Install it with: yarn global add web-ext'; exit 1; fi",
"build": "yarn --cwd .. generate && yarn run build-inline-extensions && NODE_ENV=production NODE_OPTIONS=--max_old_space_size=4096 TS_NODE_COMPILER_OPTIONS=\"{\\\"module\\\":\\\"commonjs\\\"}\" node -r ts-node/register scripts/build",
"build": "yarn --cwd ../.. generate && yarn run build-inline-extensions && NODE_ENV=production NODE_OPTIONS=--max_old_space_size=4096 TS_NODE_COMPILER_OPTIONS=\"{\\\"module\\\":\\\"commonjs\\\"}\" node -r ts-node/register scripts/build",
"release": "yarn release:chrome",
"release:chrome": "webstore upload --auto-publish --source build/bundles/chrome-bundle.zip --extension-id dgjhfomjieaadpoljlnidmbgkdffpack --client-id $GOOGLE_CLIENT_ID --client-secret $GOOGLE_CLIENT_SECRET --refresh-token $GOOGLE_REFRESH_TOKEN",
"release:ff": "./scripts/release-ff.sh",
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 45f9839

Please sign in to comment.