Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

Commit 78cfbfe

Browse files
committed
Upgrade rollup and fix windows paths issue
1 parent 695a0d7 commit 78cfbfe

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
"typescript": "^1.8.9"
3636
},
3737
"devDependencies": {
38-
"mocha": "^2.3.3",
38+
"mocha": "^3.0.0",
3939
"rimraf": "^2.5.4",
40-
"rollup": "^0.25.7",
40+
"rollup": "^0.34.3",
4141
"rollup-plugin-buble": "^0.12.1"
4242
},
4343
"repository": {

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ export default function typescript ( options ) {
159159

160160
var result;
161161

162+
importer = importer.split('\\').join('/');
163+
162164
if ( compareVersions( typescript.version, '1.8.0' ) < 0 ) {
163165
// Suppress TypeScript warnings for function call.
164166
result = typescript.nodeModuleNameResolver( importee, importer, resolveHost );
@@ -208,7 +210,7 @@ export default function typescript ( options ) {
208210
});
209211

210212
if ( fatalError ) {
211-
throw new Error( `There were TypeScript errors transpiling "${id}"` );
213+
throw new Error( `There were TypeScript errors transpiling` );
212214
}
213215

214216
return {

test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ describe( 'rollup-plugin-typescript', function () {
8282

8383
it( 'reports diagnostics and throws if errors occur during transpilation', function () {
8484
return bundle( 'sample/syntax-error/missing-type.ts' ).catch( function ( error ) {
85-
assert.ok( error.message.indexOf( 'There were TypeScript errors' ) === 0, 'Should reject erroneous code.' );
85+
assert.ok( error.message.indexOf( 'There were TypeScript errors transpiling' ) !== -1, 'Should reject erroneous code.' );
8686
});
8787
});
8888

0 commit comments

Comments
 (0)