Skip to content

Commit 22a440a

Browse files
committed
Get entrypoints working
1 parent 7d9b69a commit 22a440a

36 files changed

+94
-125
lines changed

Diff for: Gulpfile.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -166,20 +166,20 @@ const buildServices = (() => {
166166
.pipe(rename("typescript.d.ts"))
167167
.pipe(dest("built/local"));
168168

169-
// create typescript_standalone.d.ts
170-
const createTypescriptStandaloneDts = () => src("built/local/typescriptServices.d.ts")
171-
.pipe(newer("built/local/typescript_standalone.d.ts"))
172-
.pipe(transform(content => content.replace(/declare (namespace|module) ts/g, 'declare module "typescript"')))
173-
.pipe(rename("typescript_standalone.d.ts"))
174-
.pipe(dest("built/local"));
169+
// // create typescript_standalone.d.ts
170+
// const createTypescriptStandaloneDts = () => src("built/local/typescriptServices.d.ts")
171+
// .pipe(newer("built/local/typescript_standalone.d.ts"))
172+
// .pipe(transform(content => content.replace(/declare (namespace|module) ts/g, 'declare module "typescript"')))
173+
// .pipe(rename("typescript_standalone.d.ts"))
174+
// .pipe(dest("built/local"));
175175

176176
return series(
177177
buildTypescriptServicesOut,
178178
createTypescriptServicesJs,
179179
createTypescriptServicesDts,
180180
createTypescriptJs,
181181
createTypescriptDts,
182-
createTypescriptStandaloneDts,
182+
// createTypescriptStandaloneDts,
183183
);
184184
})();
185185
task("services", series(preBuild, buildServices));

Diff for: src/cancellationToken/tsconfig.json

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
{
2-
"extends": "../tsconfig-noncomposite-base",
2+
"extends": "../tsconfig-base",
33
"compilerOptions": {
4-
"outDir": "../../built/local/",
5-
"rootDir": ".",
6-
"composite": false,
7-
"declaration": false,
8-
"declarationMap": false,
9-
"removeComments": true,
10-
"incremental": false,
4+
"outDir": "../../built/local/cancellationToken",
115
"module": "commonjs",
126
"types": [
137
"node"

Diff for: src/compiler/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../tsconfig-base",
33
"compilerOptions": {
4-
"outDir": "../../built/local",
4+
"outDir": "../../built/local/compiler",
55
"types": ["node"]
66
},
77

Diff for: src/compiler/tsconfig.release.json

-10
This file was deleted.

Diff for: src/debug/tsconfig.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
{
2-
"extends": "../tsconfig-library-base",
2+
"extends": "../tsconfig-base",
33
"compilerOptions": {
44
"target": "es2019",
55
"lib": ["es2019"],
6-
"outDir": "../../built/local",
7-
"declaration": false,
8-
"sourceMap": true
6+
"outDir": "../../built/local/debug"
97
},
108
"files": [
119
"dbg.ts",

Diff for: src/deprecatedCompat/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../tsconfig-base",
33
"compilerOptions": {
4-
"outDir": "../../built/local",
4+
"outDir": "../../built/local/deprecatedCompat",
55
"experimentalDecorators": true
66
},
77
"references": [
@@ -19,4 +19,4 @@
1919
"4.8/mergeDecoratorsAndModifiers.ts",
2020
"_namespaces/ts.ts"
2121
]
22-
}
22+
}

Diff for: src/dynamicImportCompat/tsconfig.json

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
{
2-
"extends": "../tsconfig-library-base",
2+
"extends": "../tsconfig-base",
33
"compilerOptions": {
4-
"outDir": "../../built/local",
4+
"outDir": "../../built/local/dynamicImportCompat",
55
"rootDir": ".",
66
"target": "esnext",
77
"module": "esnext",
8-
"lib": ["esnext"],
9-
"declaration": false,
10-
"sourceMap": true,
11-
"tsBuildInfoFile": "../../built/local/dynamicImportCompat.tsbuildinfo"
8+
"lib": ["esnext"]
129
},
1310
"files": [
1411
"dynamicImportCompat.ts",

Diff for: src/executeCommandLine/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../tsconfig-base",
33
"compilerOptions": {
4-
"outDir": "../../built/local"
4+
"outDir": "../../built/local/executeCommandLine"
55
},
66

77
"references": [

Diff for: src/executeCommandLine/tsconfig.release.json

-11
This file was deleted.

Diff for: src/harness/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../tsconfig-base",
33
"compilerOptions": {
4-
"outDir": "../../built/local",
4+
"outDir": "../../built/local/harness",
55
"types": [
66
"node", "mocha", "chai"
77
],

Diff for: src/instrumenter/tsconfig.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
"dom",
88
"scripthost"
99
],
10-
"outDir": "../../built/local",
11-
"sourceMap": true
10+
"outDir": "../../built/local/instrumenter"
1211
},
1312
"files": [
1413
"instrumenter.ts"
1514
]
16-
}
15+
}

Diff for: src/jsTyping/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../tsconfig-base",
33
"compilerOptions": {
4-
"outDir": "../../built/local",
4+
"outDir": "../../built/local/jsTyping",
55
"types": [
66
"node"
77
],

Diff for: src/loggedIO/tsconfig-tsc-instrumented.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2+
// TODO: ???
23
"extends": "../tsconfig-base",
34
"compilerOptions": {
4-
"outDir": "../../built/local",
5+
"outDir": "../../built/local/loggedIO",
56
"types": [
67
"node", "mocha", "chai"
78
],

Diff for: src/loggedIO/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../tsconfig-base",
33
"compilerOptions": {
4-
"outDir": "../../built/local",
4+
"outDir": "../../built/local/loggedIO",
55
"types": [
66
],
77
"lib": [

Diff for: src/server/tsconfig.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"extends": "../tsconfig-base",
33
"compilerOptions": {
4-
"removeComments": false,
5-
"outDir": "../../built/local",
6-
"preserveConstEnums": true,
4+
"outDir": "../../built/local/server",
75
"types": [
86
"node"
97
]

Diff for: src/services/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../tsconfig-base",
33
"compilerOptions": {
4-
"outDir": "../../built/local"
4+
"outDir": "../../built/local/services"
55
},
66
"references": [
77
{ "path": "../compiler" },

Diff for: src/testRunner/tsconfig.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
{
2-
"extends": "../tsconfig-noncomposite-base",
2+
"extends": "../tsconfig-base",
33
"compilerOptions": {
4-
"outDir": "../../built/local",
5-
"composite": false,
6-
"declaration": false,
7-
"declarationMap": false,
4+
"outDir": "../../built/local/testRunner",
85
"types": [
96
"node", "mocha", "chai"
107
],

Diff for: src/tsc/_namespaces/ts.ts

-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22

33
export * from "../../compiler/_namespaces/ts";
44
export * from "../../executeCommandLine/_namespaces/ts";
5-
export * from "../tsc";

Diff for: src/tsc/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"extends": "../tsconfig-noncomposite-base",
2+
"extends": "../tsconfig-base",
33
"compilerOptions": {
4-
"outDir": "../../built/local"
4+
"outDir": "../../built/local/tsc"
55
},
66
"files": [
77
"tsc.ts",

Diff for: src/tsc/tsconfig.release.json

-17
This file was deleted.

Diff for: src/tsconfig-base.json

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"lib": ["es2015.iterable", "es2015.generator", "es5"],
55
"target": "es5",
66
"moduleResolution": "node",
7-
"rootDir": ".",
87

98
"declaration": true,
109
"declarationMap": true,

Diff for: src/tsconfig-library-base.json

-10
This file was deleted.

Diff for: src/tsconfig-noncomposite-base.json

-9
This file was deleted.

Diff for: src/tsconfig.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
"references": [
55
{ "path": "./tsc" },
66
{ "path": "./tsserver" },
7+
{ "path": "./tsserverlibrary" },
8+
{ "path": "./typescript" },
79
{ "path": "./typingsInstaller" },
810
{ "path": "./watchGuard" },
911
{ "path": "./debug" },
1012
{ "path": "./cancellationToken" },
1113
{ "path": "./dynamicImportCompat" },
12-
{ "path": "./testRunner" }
14+
{ "path": "./testRunner" },
1315
]
1416
}

Diff for: src/tsserver/nodeServer.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,8 @@ function startNodeSession(options: StartSessionOptions, logger: Logger, cancella
525525
}
526526
}
527527

528-
this.installer = childProcess.fork(combinePaths(__dirname, "typingsInstaller.js"), args, { execArgv });
528+
// TODO(jakebailey): fix this for module transform
529+
this.installer = childProcess.fork(combinePaths(__dirname, "..", "typingsInstaller", "nodeTypingsInstaller.js"), args, { execArgv });
529530
this.installer.on("message", m => this.handleMessage(m));
530531

531532
// We have to schedule this event to the next tick

Diff for: src/tsserver/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"extends": "../tsconfig-noncomposite-base",
2+
"extends": "../tsconfig-base",
33

44
"compilerOptions": {
5-
"outDir": "../../built/local",
5+
"outDir": "../../built/local/tsserver",
66
"types": [
77
"node"
88
]

Diff for: src/tsserverlibrary/_namespaces/ts.server.ts

-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22

33
export * from "../../jsTyping/_namespaces/ts.server";
44
export * from "../../server/_namespaces/ts.server";
5-
export * from "../tsserverlibrary";

Diff for: src/tsserverlibrary/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"extends": "../tsconfig-library-base",
2+
"extends": "../tsconfig-base",
33
"compilerOptions": {
4-
"outDir": "../../built/local"
4+
"outDir": "../../built/local/tsserverlibrary"
55
},
66
"files": [
77
"tsserverlibrary.ts",

Diff for: src/tsserverlibrary/tsserverlibrary.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
export { };
1+
import * as ts from "./_namespaces/ts";
2+
3+
// TODO(jakebailey): replace const enum with enum in d.ts
4+
5+
export = ts;

Diff for: src/typescript/_namespaces/ts.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* Generated file to emulate the ts namespace. */
2+
3+
export * from "../../compiler/_namespaces/ts";
4+
export * from "../../jsTyping/_namespaces/ts";
5+
export * from "../../services/_namespaces/ts";
6+
export * from "../../deprecatedCompat/_namespaces/ts";

Diff for: src/typescript/tsconfig.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"extends": "../tsconfig-base",
3+
"compilerOptions": {
4+
"outDir": "../../built/local/typescript"
5+
},
6+
"files": [
7+
"typescript.ts",
8+
"_namespaces/ts.ts"
9+
],
10+
"references": [
11+
{ "path": "../compiler" },
12+
{ "path": "../jsTyping" },
13+
{ "path": "../services" },
14+
{ "path": "../deprecatedCompat" }
15+
]
16+
}

Diff for: src/typescript/typescript.ts

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import * as ts from "./_namespaces/ts";
2+
import { Debug, LogLevel } from "./_namespaces/ts";
3+
4+
// TODO(jakebailey): replace const enum with enum in d.ts
5+
6+
// enable deprecation logging
7+
declare const console: any;
8+
if (typeof console !== "undefined") {
9+
Debug.loggingHost = {
10+
log(level, s) {
11+
switch (level) {
12+
case LogLevel.Error: return console.error(s);
13+
case LogLevel.Warning: return console.warn(s);
14+
case LogLevel.Info: return console.log(s);
15+
case LogLevel.Verbose: return console.log(s);
16+
}
17+
}
18+
};
19+
}
20+
21+
export = ts;

Diff for: src/typingsInstaller/tsconfig.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
2-
"extends": "../tsconfig-noncomposite-base",
2+
"extends": "../tsconfig-base",
33
"compilerOptions": {
4-
"removeComments": true,
5-
"outDir": "../../built/local",
4+
"outDir": "../../built/local/typingsInstaller",
65
"types": [
76
"node"
87
],

0 commit comments

Comments
 (0)