Skip to content

Commit d8f4228

Browse files
committed
chore(tsconfig) remove the version option as it has causes confusion. People expect it to be *used in a meaningful way* and we need to respect that 🌹
closes #617
1 parent dff8e9c commit d8f4228

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

dist/main/tsconfig/tsconfig.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ var defaultFilesGlob = [
7171
"!./node_modules/**/*",
7272
];
7373
var invisibleFilesGlob = ["./**/*.ts", "./**/*.tsx"];
74-
var typeScriptVersion = '1.5.0-beta';
7574
exports.defaults = {
7675
target: ts.ScriptTarget.ES5,
7776
module: ts.ModuleKind.CommonJS,
@@ -289,7 +288,6 @@ function createProjectRootSync(srcFile, defaultOptions) {
289288
if (fs.existsSync(projectFilePath))
290289
throw new Error(exports.errors.CREATE_PROJECT_ALREADY_EXISTS);
291290
var projectSpec = {};
292-
projectSpec.version = typeScriptVersion;
293291
projectSpec.compilerOptions = tsToRawCompilerOptions(defaultOptions || exports.defaults);
294292
projectSpec.filesGlob = defaultFilesGlob;
295293
fs.writeFileSync(projectFilePath, prettyJSON(projectSpec));

docs/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ We only plan to *strictly* document the breaking changes. The rest is optional.
55
# Planned
66
(No breaking changes staged)
77

8+
# v7.0.0
9+
* Removed the (already ignored in any significant way) `version` option from tsconfig. [More](https://github.com/TypeStrong/atom-typescript/issues/617)
10+
811
# v6.0.0
912
* Bring back `dts-generator` as using the other mechanism has a few gotchas that might surprise new users. We will remove this feature once [https://github.com/Microsoft/TypeScript/issues/2338] is officially supported.
1013

docs/faq.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ This is probably because of us keeping `files` updated with the `filesGlob` opti
77
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 [gulp-typescript](https://github.com/ivogabe/gulp-typescript) or [tsify](https://github.com/smrq/tsify).
88

99
## Which version of TypeScript does atom-typescript use?
10-
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. There is a possibility that in the future it will move to TypeScript nightlies which is something that the TypeScript team is planning.
10+
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. There is a possibility that in the future it will move to TypeScript nightlies but our current automation is working well.
1111

1212
## Can I use a custom TypeScript compiler?
1313
If it conforms the latest TypeScript services API then yes! Just set the path to `typescriptServices.js` in the package options.
1414

15-
However, please note that the [version](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#version) in `tsconfig.json` does not indicate the compiler atom is using. That's strictly an aide-mémoire - it's to remind you which version of the TypeScript this project is intended to work with.
16-
1715
## Can I use an alternate transpiler?
1816
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)).
1917

docs/tsconfig.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ i.e. an empty JSON file at the *root* of your project :heart: This will be suffi
1919
* [`compileOnSave`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#compileonsave) : Should AtomTS compile on save
2020
* [`buildOnSave`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#buildonsave) : Should AtomTS build on save
2121
* [`scripts`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#scripts) : Sometimes its useful to have post build scripts
22-
* [`version`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#version) : The TypeScript version
2322

2423

2524
## Examples
@@ -100,8 +99,5 @@ Build means *compile all files*. Useful if for some reason you are using `--out`
10099
}
101100
```
102101

103-
### version
104-
This exists simply to make it easier for the future you to know which TypeScript version was used when this project file was created. You can read more here [Microsoft/TypeScript#2113](https://github.com/Microsoft/TypeScript/issues/2133)
105-
106102
## Additional Notes
107103
FWIW [a json schema is also available](http://json.schemastore.org/tsconfig)

lib/main/tsconfig/tsconfig.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ interface UsefulFromPackageJson {
117117
* This is the JSON.parse result of a tsconfig.json
118118
*/
119119
interface TypeScriptProjectRawSpecification {
120-
version?: string;
121120
compilerOptions?: CompilerOptions;
122121
files?: string[]; // optional: paths to files
123122
filesGlob?: string[]; // optional: An array of 'glob / minimatch / RegExp' patterns to specify source files
@@ -211,7 +210,6 @@ var defaultFilesGlob = [
211210
* This is what we use when the user doens't specify a files / filesGlob
212211
*/
213212
var invisibleFilesGlob = ["./**/*.ts", "./**/*.tsx"];
214-
var typeScriptVersion = '1.5.0-beta';
215213

216214
export var defaults: ts.CompilerOptions = {
217215
target: ts.ScriptTarget.ES5,
@@ -491,7 +489,6 @@ export function createProjectRootSync(srcFile: string, defaultOptions?: ts.Compi
491489

492490
// We need to write the raw spec
493491
var projectSpec: TypeScriptProjectRawSpecification = {};
494-
projectSpec.version = typeScriptVersion;
495492
projectSpec.compilerOptions = tsToRawCompilerOptions(defaultOptions || defaults);
496493
projectSpec.filesGlob = defaultFilesGlob;
497494

0 commit comments

Comments
 (0)