Skip to content

Commit c86e07b

Browse files
committed
- fix for invisible declaration files, #95
1 parent 707c6fc commit c86e07b

File tree

5 files changed

+20
-19
lines changed

5 files changed

+20
-19
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,11 @@ The way typescript handles type-only imports and ambient types effectively hides
162162

163163
Otherwise the plugin should work in watch mode. Make sure to run a normal build after watch session to catch any type errors.
164164

165-
### Version
165+
### Requirements
166166

167-
This plugin currently requires TypeScript `2.4+`.
168-
169-
### Rollup version
170-
171-
This plugin currently requires rollup `0.50+`.
167+
TypeScript `2.4+`
168+
Rollup `0.50+`
169+
Node `6.4.0+` (basic es6 support)
172170

173171
### Reporting bugs
174172

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rollup-plugin-typescript2",
3-
"version": "0.15.2",
3+
"version": "0.16.0",
44
"description": "Seamless integration between Rollup and TypeScript. Now with errors.",
55
"main": "dist/rollup-plugin-typescript2.cjs.js",
66
"module": "dist/rollup-plugin-typescript2.es.js",
@@ -40,7 +40,7 @@
4040
"typescript": ">=2.4.0"
4141
},
4242
"devDependencies": {
43-
"typescript": "^2.9.1",
43+
"typescript": "^2.9.2",
4444
"object-hash": "^1.3.0",
4545
"colors": "^1.2.4",
4646
"graphlib": "^2.1.5",
@@ -53,7 +53,7 @@
5353
"@types/object-hash": "^1.2.0",
5454
"@types/resolve": "^0.0.8",
5555
"rimraf": "^2.6.2",
56-
"rollup": "^0.59.4",
56+
"rollup": "^0.62.0",
5757
"rollup-plugin-typescript2": "github:ezolenko/rollup-plugin-typescript2#master",
5858
"rollup-plugin-node-resolve": "^3.3.0",
5959
"rollup-plugin-commonjs": "^9.1.3",

src/host.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ export class LanguageServiceHost implements tsTypes.LanguageServiceHost
1111
private snapshots: { [fileName: string]: tsTypes.IScriptSnapshot } = {};
1212
private versions: { [fileName: string]: number } = {};
1313
private service?: tsTypes.LanguageService;
14+
private fileNames: Set<string>;
1415

1516
constructor(private parsedConfig: tsTypes.ParsedCommandLine, private transformers: TransformerFactoryCreator[])
1617
{
18+
this.fileNames = new Set(parsedConfig.fileNames);
1719
}
1820

1921
public reset()
@@ -34,6 +36,7 @@ export class LanguageServiceHost implements tsTypes.LanguageServiceHost
3436
const snapshot = tsModule.ScriptSnapshot.fromString(data);
3537
this.snapshots[fileName] = snapshot;
3638
this.versions[fileName] = (this.versions[fileName] || 0) + 1;
39+
this.fileNames.add(fileName);
3740
return snapshot;
3841
}
3942

@@ -68,7 +71,7 @@ export class LanguageServiceHost implements tsTypes.LanguageServiceHost
6871

6972
public getScriptFileNames()
7073
{
71-
return Object.keys(this.snapshots);
74+
return Array.from(this.fileNames.values());
7275
}
7376

7477
public getCompilationSettings(): tsTypes.CompilerOptions

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
3+
"target": "es6",
44
"noImplicitAny": true,
55
"sourceMap": true,
66
"noUnusedParameters": true,

0 commit comments

Comments
 (0)