Skip to content
This repository was archived by the owner on Nov 6, 2018. It is now read-only.

WIP: generate API docs #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ coverage/
dist
.cache/
/module/
/docs/
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@
"types": "lib/sourcegraph.d.ts",
"files": [
"lib",
"module"
"module",
"docs"
],
"scripts": {
"commitmsg": "commitlint -e $GIT_PARAMS",
"semantic-release": "semantic-release",
"prettier": "prettier '**/{*.{js?(on),ts,yml},.*.yml}' --write --list-different",
"tslint": "tslint -c tslint.json -p tsconfig.json './src/**/*.ts'",
"typecheck": "tsc -p tsconfig.json",
"typedoc": "typedoc --out docs --readme none --mode file --theme minimal --hideGenerator --includeDeclarations --exclude 'src/extension/**/*' --exclude 'src/client/**/*' --exclude 'src/protocol/**/*' src/sourcegraph.d.ts",
"build:assets": "mkdir -p lib/protocol && typescript-json-schema --id 'https://sourcegraph.com/v1/contribution.schema.json' --noExtraProps --required --include src/protocol/contribution.ts --out lib/protocol/contribution.schema.json tsconfig.dist.json Contributions && node -e \"/* Deletes the top-level additionalProperties property in the file. */ fs = require('fs');f = process.argv[1];o = JSON.parse(fs.readFileSync(f, 'utf8'));delete o.additionalProperties;fs.writeFileSync(f, JSON.stringify(o, null, 4))\" lib/protocol/contribution.schema.json",
"build:module": "tsc -p tsconfig.dist.json",
"build:api": "mkdir -p lib/extension && cpy src/sourcegraph.d.ts lib/ && cpy src/extension/index.js lib/extension",
Expand Down Expand Up @@ -84,6 +86,7 @@
"ts-node": "^7.0.1",
"tslint": "^5.10.0",
"tslint-language-service": "^0.9.9",
"typedoc": "^0.12.0",
"typescript": "^3.0.3",
"typescript-json-schema": "^0.32.0"
}
Expand Down
4 changes: 0 additions & 4 deletions src/extension/extensionHost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ const consoleLogger: Logger = {
export interface InitData {
/** The URL to the JavaScript source file (that exports an `activate` function) for the extension. */
bundleURL: string

/** @see {@link module:sourcegraph.internal.sourcegraphURL} */
sourcegraphURL: string
}

/**
Expand Down Expand Up @@ -140,7 +137,6 @@ function createExtensionHandle(initData: InitData, connection: Connection): type
internal: {
sync,
updateContext: updates => context.updateContext(updates),
sourcegraphURL: new URI(initData.sourcegraphURL),
},
}
}
5 changes: 1 addition & 4 deletions src/integration-test/helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ export async function integrationTestContext(): Promise<
// Ack all configuration updates.
clientController.configurationUpdates.subscribe(({ resolve }) => resolve(Promise.resolve()))

const extensionHost = createExtensionHost(
{ bundleURL: '', sourcegraphURL: 'https://example.com' },
serverTransports
)
const extensionHost = createExtensionHost({ bundleURL: '' }, serverTransports)

// Wait for client to be ready.
await clientController.clientEntries
Expand Down
8 changes: 0 additions & 8 deletions src/sourcegraph.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -829,14 +829,6 @@ declare module 'sourcegraph' {
* @param updates The updates to apply to the context. If a context property's value is null, it is deleted from the context.
*/
export function updateContext(updates: ContextValues): void

/**
* The URL to the Sourcegraph site that the user's session is associated with. This refers to
* Sourcegraph.com (`https://sourcegraph.com`) by default, or a self-hosted instance of Sourcegraph.
*
* @example `https://sourcegraph.com`
*/
export const sourcegraphURL: URI
}

/**
Expand Down
111 changes: 104 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -329,18 +329,59 @@
tslint-config-prettier "^1.6.0"
tslint-react "^3.2.0"

"@types/minimatch@^3.0.3":
"@types/events@*":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86"

"@types/fs-extra@^5.0.3":
version "5.0.4"
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.4.tgz#b971134d162cc0497d221adde3dbb67502225599"
dependencies:
"@types/node" "*"

"@types/glob@*":
version "5.0.35"
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.35.tgz#1ae151c802cece940443b5ac246925c85189f32a"
dependencies:
"@types/events" "*"
"@types/minimatch" "*"
"@types/node" "*"

"@types/handlebars@^4.0.38":
version "4.0.39"
resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.39.tgz#961fb54db68030890942e6aeffe9f93a957807bd"

"@types/highlight.js@^9.12.3":
version "9.12.3"
resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.3.tgz#b672cfaac25cbbc634a0fd92c515f66faa18dbca"

"@types/lodash@^4.14.110":
version "4.14.116"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.116.tgz#5ccf215653e3e8c786a58390751033a9adca0eb9"

"@types/marked@^0.4.0":
version "0.4.1"
resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.4.1.tgz#6595701c4d0dfde9d04894d3be04b8a97a49e0d7"

"@types/minimatch@*", "@types/[email protected]", "@types/minimatch@^3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"

"@types/mocha@^5.2.5":
version "5.2.5"
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.5.tgz#8a4accfc403c124a0bafe8a9fc61a05ec1032073"

"@types/node@^10.5.0":
"@types/node@*", "@types/node@^10.5.0":
version "10.9.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.9.4.tgz#0f4cb2dc7c1de6096055357f70179043c33e9897"

"@types/shelljs@^0.8.0":
version "0.8.0"
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.0.tgz#0caa56b68baae4f68f44e0dd666ab30b098e3632"
dependencies:
"@types/glob" "*"
"@types/node" "*"

JSONStream@^1.0.4, JSONStream@^1.3.4:
version "1.3.4"
resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.4.tgz#615bb2adb0cd34c8f4c447b5f6512fa1d8f16a2e"
Expand Down Expand Up @@ -1860,7 +1901,7 @@ [email protected]:
once "^1.3.0"
path-is-absolute "^1.0.0"

glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.2:
glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.2:
version "7.1.3"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
dependencies:
Expand Down Expand Up @@ -1917,7 +1958,7 @@ [email protected]:
version "1.10.5"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"

handlebars@^4.0.11, handlebars@^4.0.2:
handlebars@^4.0.11, handlebars@^4.0.2, handlebars@^4.0.6:
version "4.0.12"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.12.tgz#2c15c8a96d46da5e266700518ba8cb8d919d5bc5"
dependencies:
Expand Down Expand Up @@ -1987,6 +2028,10 @@ [email protected]:
version "1.1.1"
resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"

highlight.js@^9.0.0:
version "9.12.0"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.12.0.tgz#e6d9dbe57cbefe60751f02af336195870c90c01e"

hook-std@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/hook-std/-/hook-std-1.1.0.tgz#7f76b74b6f96d3cd4106afb50a66bdb0af2d2a2d"
Expand Down Expand Up @@ -2109,6 +2154,10 @@ init-package-json@^1.10.3:
validate-npm-package-license "^3.0.1"
validate-npm-package-name "^3.0.0"

interpret@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614"

into-stream@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6"
Expand Down Expand Up @@ -2826,6 +2875,10 @@ marked-terminal@^3.0.0:
lodash.assign "^4.2.0"
node-emoji "^1.4.1"

marked@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.4.0.tgz#9ad2c2a7a1791f10a852e0112f77b571dce10c66"

marked@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.5.0.tgz#9e590bad31584a48ff405b33ab1c0dd25172288e"
Expand Down Expand Up @@ -2932,7 +2985,7 @@ mimic-fn@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"

[email protected], minimatch@^3.0.2, minimatch@^3.0.4:
[email protected], minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
Expand Down Expand Up @@ -3775,6 +3828,10 @@ process-nextick-args@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"

progress@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f"

promise-inflight@^1.0.1, promise-inflight@~1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3"
Expand Down Expand Up @@ -4007,6 +4064,12 @@ readdirp@^2.0.0:
readable-stream "^2.0.2"
set-immediate-shim "^1.0.1"

rechoir@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
dependencies:
resolve "^1.1.6"

redent@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa"
Expand Down Expand Up @@ -4132,7 +4195,7 @@ resolve-url@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"

resolve@^1.3.2, resolve@^1.4.0:
resolve@^1.1.6, resolve@^1.3.2, resolve@^1.4.0:
version "1.8.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26"
dependencies:
Expand Down Expand Up @@ -4299,6 +4362,14 @@ shebang-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"

shelljs@^0.8.2:
version "0.8.2"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.2.tgz#345b7df7763f4c2340d584abb532c5f752ca9e35"
dependencies:
glob "^7.0.0"
interpret "^1.0.0"
rechoir "^0.6.2"

signal-exit@^3.0.0, signal-exit@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
Expand Down Expand Up @@ -4841,6 +4912,32 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"

typedoc-default-themes@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/typedoc-default-themes/-/typedoc-default-themes-0.5.0.tgz#6dc2433e78ed8bea8e887a3acde2f31785bd6227"

typedoc@^0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.12.0.tgz#c5d606f52af29d841658e18d9faa1a72acf0e270"
dependencies:
"@types/fs-extra" "^5.0.3"
"@types/handlebars" "^4.0.38"
"@types/highlight.js" "^9.12.3"
"@types/lodash" "^4.14.110"
"@types/marked" "^0.4.0"
"@types/minimatch" "3.0.3"
"@types/shelljs" "^0.8.0"
fs-extra "^7.0.0"
handlebars "^4.0.6"
highlight.js "^9.0.0"
lodash "^4.17.10"
marked "^0.4.0"
minimatch "^3.0.0"
progress "^2.0.0"
shelljs "^0.8.2"
typedoc-default-themes "^0.5.0"
typescript "3.0.x"

typescript-json-schema@^0.32.0:
version "0.32.0"
resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.32.0.tgz#d95af55eaf01be6d44b280fdc3f9b3a264435642"
Expand All @@ -4850,7 +4947,7 @@ typescript-json-schema@^0.32.0:
typescript "^3.0.1"
yargs "^12.0.1"

typescript@^3.0.1, typescript@^3.0.3:
typescript@3.0.x, typescript@^3.0.1, typescript@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8"

Expand Down