Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.

Commit 2a460a7

Browse files
committed
Update to TypeScript 2.1
1 parent 4a5de1b commit 2a460a7

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
"test-spec": "ts-node node_modules/blue-tape/bin/blue-tape.js \"src/**/*.spec.ts\" | tap-diff",
1616
"test-cov": "ts-node node_modules/istanbul/lib/cli.js cover -e .ts --print none -x \"*.d.ts\" -x \"*.spec.ts\" node_modules/blue-tape/bin/blue-tape.js -- \"src/**/*.spec.ts\" | tap-diff",
1717
"test": "npm run build && npm run dependency-check && npm run test-cov && npm run lint",
18-
"test-spec+lint": "npm run test-spec && npm run lint",
19-
"watch": "onchange -w -i \"src/**/*.ts\" -e \"**/__test__/**\" -- npm run test-spec+lint",
2018
"bootstrap": "npm install shelljs && node scripts/bootstrap.js",
2119
"prepublish": "node scripts/prepublish.js"
2220
},
@@ -74,7 +72,7 @@
7472
"thenify": "^3.1.0",
7573
"throat": "^3.0.0",
7674
"touch": "^1.0.0",
77-
"typescript": "^2.0.3",
75+
"typescript": "^2.1.4",
7876
"xtend": "^4.0.0",
7977
"zip-object": "^0.1.0"
8078
},
@@ -84,7 +82,6 @@
8482
"dependency-check": "^2.5.1",
8583
"istanbul": "1.0.0-alpha.2",
8684
"nock": "^9.0.0",
87-
"onchange": "3.0.2",
8885
"shelljs": "^0.7.0",
8986
"tap-diff": "^0.1.1",
9087
"ts-node": "^1.1.0",

src/lib/compile.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,10 @@ function stringifySourceFile (
517517
hasDefaultExport = hasDefaultExport || (node as ts.ExportSpecifier).name.getText() === 'default'
518518
}
519519

520-
hasExports = hasExports || !!(node.flags & ts.NodeFlags.Export)
521-
hasDefaultExport = hasDefaultExport || !!(node.flags & ts.NodeFlags.Default)
520+
const flags = ts.getCombinedModifierFlags(node)
521+
522+
hasExports = hasExports || !!(flags & ts.ModifierFlags.Export)
523+
hasDefaultExport = hasDefaultExport || !!(flags & ts.ModifierFlags.Default)
522524

523525
if (
524526
node.kind === ts.SyntaxKind.StringLiteral &&

0 commit comments

Comments
 (0)