8000 Use byots and update all references to ntypescript · code-tree/atom-typescript@8f78401 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8f78401

Browse files
committed
Use byots and update all references to ntypescript
1 parent ff8b0d7 commit 8f78401

File tree

11 files changed

+17
-19
lines changed

11 files changed

+17
-19
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ And use `Shift+Delete` to delete files if simple `delete` doesn't work.
4040

4141
# Various
4242

43-
## NTypeScript
44-
We use a slightly modified (functionally equivalent) build of TypeScript called NTypeScript. The main motivation behind it is easier debugging and development workflow when consuming it as an NPM package. See [readme for details](https://github.com/TypeStrong/ntypescript#ntypescript).
45-
46-
Update the version used by Atom-TypeScript using `npm install ntypescript@latest --save --save-exact` and then do some manual testing, and then rebuild the whole project.
47-
4843
## Publishing
4944

5045
* If you have only fixed bugs in a backward-compatible way (or consider your changes very minimal), run `apm publish patch`.

dist/main/lang/core/languageServiceHost2.js

Lines changed: 1 addition & 1 deletion
< 8000 div data-testid="neutral diffstat" class="DiffSquares-module__diffSquare--h5kjy DiffSquares-module__neutral--VlyoP">
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function getTypescriptLocation() {
124124
return path.dirname(typescriptServices_1.typescriptServices);
125125
}
126126
else {
127-
return path.dirname(require.resolve('ntypescript'));
127+
return path.dirname(require.resolve('typescript'));
128128
}
129129
}
130130
exports.getDefaultLibFilePath = function (options) {

dist/main/tsconfig/tsconfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ var typescriptEnumMap = {
120120
target: {
121121
'es3': ts.ScriptTarget.ES3,
122122
'es5': ts.ScriptTarget.ES5,
123-
'es6': ts.ScriptTarget.ES6,
123+
'es6': ts.ScriptTarget.ES2015,
124124
'latest': ts.ScriptTarget. 8000 Latest
125125
},
126126
module: {
@@ -129,7 +129,7 @@ var typescriptEnumMap = {
129129
'amd': ts.ModuleKind.AMD,
130130
'umd': ts.ModuleKind.UMD,
131131
'system': ts.ModuleKind.System,
132-
'es6': ts.ModuleKind.ES6,
132+
'es6': ts.ModuleKind.ES2015,
133133
'es2015': ts.ModuleKind.ES2015,
134134
},
135135
moduleResolution: {

dist/typescript/makeTypeScriptGlobal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function makeTsGlobal(typescriptServices) {
1818
vm.runInContext(fs.readFileSync(typescriptServices).toString(), sandbox);
1919
}
2020
else {
21-
sandbox.ts = require('ntypescript');
21+
sandbox.ts = require('typescript');
2222
}
2323
global.ts = sandbox.ts;
2424
}

docs/faq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ If you have `tsconfig.json` in a folder that contains `node_modules`, atom-types
3232
Set `compileOnSave : false` in your tsconfig.json (https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#compileonsave). Then you've got all the intellisense / refactoring goodness of atom-typescript but no generated JavaScript. Why is this useful? Well you might be using something else for your build such as [ts-loader](https://github.com/TypeStrong/ts-loader) or [tsify](https://github.com/TypeStrong/tsify) or [gulp-typescript](https://github.com/ivogabe/gulp-typescript).
3333

3434
## Which version of TypeScript does atom-typescript use?
35-
It uses [ntypescript](https://github.com/TypeStrong/ntypescript) which is just a build of Microsoft/Master. This means it's the latest and greatest of the TypeScript goodness (You can see the last date it was updated in our [`package.json`](https://github.com/TypeStrong/atom-typescript/blob/master/package.json) e.g. `"ntypescript": "1.201603290104.1",` means `2016-03-29`). There is a possibility that in the future it will move to TypeScript nightlies but our current automation is working well.
35+
You can see the date `typescript` dependency was updated in our [`package.json`](https://github.com/TypeStrong/atom-typescript/blob/master/package.json) e.g. `"typescript": "2.1.0-dev.20161023"` means it's using the nightly build published on `2016-10-23`).
3636

3737
## Can I use a custom TypeScript compiler?
38-
If it conforms the latest TypeScript services API then yes! Just set the path to `typescriptServices.js` in the package options.
38+
If it conforms the latest TypeScript services API then yes! Just set the path to `typescriptServices.js` in the package options.
3939

4040
## Can I use an alternate transpiler?
4141
Atom-typescript supports using Babel as an alternate ES5 transpiler in coordination with the TypeScript language service. This may be useful if TypeScript does not yet support transpiling a certain feature correctly (for example [scope per for loop iteration with let](https://github.com/Microsoft/TypeScript/issues/3915)).

lib/globals.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// <reference path="../node_modules/ntypescript/bin/ntypescript.d.ts"/>
21
/// <reference path="../node_modules/tsconfig/dist/tsconfig.d.ts"/>
32
/// <reference path="./typings/tsd.d.ts"/>
43

lib/main/lang/core/languageServiceHost2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ function getTypescriptLocation() {
209209
return path.dirname(typescriptServices);
210210
}
211211
else {
212-
return path.dirname(require.resolve('ntypescript'));
212+
return path.dirname(require.resolve('typescript'));
213213
}
214214
}
215215

lib/main/tsconfig/tsconfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ var typescriptEnumMap = {
291291
target: {
292292
'es3': ts.ScriptTarget.ES3,
293293
'es5': ts.ScriptTarget.ES5,
294-
'es6': ts.ScriptTarget.ES6,
294+
'es6': ts.ScriptTarget.ES2015,
295295
'latest': ts.ScriptTarget.Latest
296296
},
297297
module: {
@@ -300,7 +300,7 @@ var typescriptEnumMap = {
300300
'amd': ts.ModuleKind.AMD,
301301
'umd': ts.ModuleKind.UMD,
302302
'system': ts.ModuleKind.System,
303-
'es6': ts.ModuleKind.ES6,
303+
'es6': ts.ModuleKind.ES2015,
304304
'es2015': ts.ModuleKind.ES2015,
305305
},
306306
moduleResolution: {

lib/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
"preserveConstEnums": true,
1010
"outDir": "../dist",
1111
"sourceMap": false,
12-
"jsx": "react"
12+
"jsx": "react",
13+
"types": [
14+
"byots"
15+
]
1316
},
1417
"dts": {
1518
"name": "atom-typescript"

lib/typescript/makeTypeScriptGlobal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function makeTsGlobal(typescriptServices?: string) {
2525
vm.runInContext(fs.readFileSync(typescriptServices).toString(), sandbox);
2626
}
2727
else {
28-
sandbox.ts = require('ntypescript');
28+
sandbox.ts = require('typescript');
2929
}
3030

3131
// Finally export ts to the local global namespace

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"preferGlobal": "true",
99
"description": "The only TypeScript plugin you will ever need.",
1010
"scripts": {
11-
"test": "ntsc -p ./lib",
11+
"test": "tsc -p ./lib",
1212
"build": "node scripts/grammar.js",
1313
"prepublish": "typings install"
1414
},
@@ -54,6 +54,7 @@
5454
"atom-space-pen-views": "^2.0.4",
5555
"babel": "^5.6.23",
5656
"basarat-text-buffer": "6.0.0",
57+
"byots": "2.1.0-dev.20161022.0.26",
5758
"d3": "^3.5.5",
5859
"detect-indent": "^4.0.0",
5960
"detect-newline": "^2.1.0",
@@ -66,10 +67,10 @@
6667
"immutable": "^3.7.3",
6768
"json2dts": "0.0.1",
6869
"mkdirp": "^0.5.0",
69-
"ntypescript": "1.201609302242.1",
7070
"react": "^0.13.3",
7171
"season": "^5.1.4",
7272
"tsconfig": "^2.2.0",
73+
"typescript": "2.1.0-dev.20161023",
7374
"xtend": "^4.0.0"
7475
},
7576
"devDependencies": {

0 commit comments

Comments
 (0)
0