Repository: decaffeinate/decaffeinate
Pull request #2463 (2022-06-09 14:01:43)

fix(deps): use fixed `coffee-lex`
See https://github.com/decaffeinate/coffee-lex/pull/636


Patch:
diff --git a/package.json b/package.json
index d5dd98d0..bd69f02f 100644
--- a/package.json
+++ b/package.json
@@ -65,10 +65,10 @@
     "@resugar/codemod-strings-template": "^1.0.1",
     "add-variable-declarations": "^4.0.7",
     "automatic-semicolon-insertion": "^3.0.2",
-    "coffee-lex": "^9.1.5",
+    "coffee-lex": "^9.2.1",
     "decaffeinate-coffeescript": "1.12.7-patch.3",
     "decaffeinate-coffeescript2": "2.2.1-patch.5",
-    "decaffeinate-parser": "^22.5.17",
+    "decaffeinate-parser": "^22.5.18",
     "detect-indent": "^4.0.0",
     "is-ci-cli": "^2.2.0",
     "lines-and-columns": "^2.0.3",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 268c4ad5..0f23e1df 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -26,10 +26,10 @@ specifiers:
   '@typescript-eslint/parser': ^5.27.0
   add-variable-declarations: ^4.0.7
   automatic-semicolon-insertion: ^3.0.2
-  coffee-lex: ^9.1.5
+  coffee-lex: ^9.2.1
   decaffeinate-coffeescript: 1.12.7-patch.3
   decaffeinate-coffeescript2: 2.2.1-patch.5
-  decaffeinate-parser: ^22.5.17
+  decaffeinate-parser: ^22.5.18
   detect-indent: ^4.0.0
   esbuild: ^0.14.42
   esbuild-runner: ^2.2.1
@@ -66,10 +66,10 @@ dependencies:
   '@resugar/codemod-strings-template': 1.0.1
   add-variable-declarations: 4.0.7
   automatic-semicolon-insertion: 3.0.6
-  coffee-lex: 9.1.5
+  coffee-lex: 9.2.1
   decaffeinate-coffeescript: 1.12.7-patch.3
   decaffeinate-coffeescript2: 2.2.1-patch.5
-  decaffeinate-parser: 22.5.17
+  decaffeinate-parser: 22.5.18
   detect-indent: 4.0.0
   is-ci-cli: 2.2.0
   lines-and-columns: 2.0.3
@@ -2304,8 +2304,8 @@ packages:
     engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'}
     dev: true
 
-  /coffee-lex/9.1.5:
-    resolution: {integrity: sha512-94lUMjs1vhlV86vnbCCnnIYzR4oszuO4qJzKUuKOLidiksh/UyQFOzPusjmLJt6vy5CNB0d/KtaceqV84zr46g==}
+  /coffee-lex/9.2.1:
+    resolution: {integrity: sha512-uvylajBdHBDF4szw3O2NKNOkk3vPq37CPWyJNvXJmQzQ33Z3h8mPXYQ+ToMy+PL92gUbZ8g8MBOxMXNTvGxxjQ==}
     dev: false
 
   /collect-v8-coverage/1.0.1:
@@ -2391,13 +2391,13 @@ packages:
     hasBin: true
     dev: false
 
-  /decaffeinate-parser/22.5.17:
-    resolution: {integrity: sha512-LilxxRs4QgshiUkcSZhbw+0WkaOBRRpyRS2pWRLN6ut/PoqDTxjVV/MCGt0JMlmi0eFppvxgt1g4b1XptZ5wBA==}
+  /decaffeinate-parser/22.5.18:
+    resolution: {integrity: sha512-K59cEOC1QfjX/jTMj3MCy/PaH/yK+ku/wlGr6pfm+Q9MHSmSusK/H9Ub2YzxnoGIw8TWb1mKxyps/Ep/+SR6gg==}
     engines: {node: '>=6'}
     dependencies:
       '@babel/types': 7.18.4
       '@codemod/parser': 1.2.1
-      coffee-lex: 9.1.5
+      coffee-lex: 9.2.1
       decaffeinate-coffeescript: 1.12.7-patch.3
       decaffeinate-coffeescript2: 2.2.1-patch.5
       lines-and-columns: 2.0.3
diff --git a/src/index.ts b/src/index.ts
index 2e35ae1f..31b132c2 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,4 +1,4 @@
-import lex from 'coffee-lex';
+import { lex } from 'coffee-lex';
 import { nodes as getCoffee1Nodes, tokens as getCoffee1Tokens } from 'decaffeinate-coffeescript';
 import { nodes as getCoffee2Nodes, tokens as getCoffee2Tokens } from 'decaffeinate-coffeescript2';
 import { parse as decaffeinateParse } from 'decaffeinate-parser';
diff --git a/src/patchers/NodePatcher.ts b/src/patchers/NodePatcher.ts
index 65ffe113..7fdff6ce 100644
--- a/src/patchers/NodePatcher.ts
+++ b/src/patchers/NodePatcher.ts
@@ -1,8 +1,8 @@
 import assert from 'assert';
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
-import SourceTokenList from 'coffee-lex/dist/SourceTokenList';
-import SourceTokenListIndex from 'coffee-lex/dist/SourceTokenListIndex';
+import { SourceToken } from 'coffee-lex';
+import { SourceTokenList } from 'coffee-lex';
+import { SourceTokenListIndex } from 'coffee-lex';
 import { FunctionApplication, NewOp, Node, SoakedFunctionApplication } from 'decaffeinate-parser/dist/nodes';
 import MagicString from 'magic-string';
 import { Options } from '../options';
diff --git a/src/stages/main/patchers/BinaryOpPatcher.ts b/src/stages/main/patchers/BinaryOpPatcher.ts
index 1e938ff6..7dab1722 100644
--- a/src/stages/main/patchers/BinaryOpPatcher.ts
+++ b/src/stages/main/patchers/BinaryOpPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import { PatcherContext, PatchOptions } from '../../../patchers/types';
 import notNull from '../../../utils/notNull';
 import NodePatcher from './../../../patchers/NodePatcher';
diff --git a/src/stages/main/patchers/BlockPatcher.ts b/src/stages/main/patchers/BlockPatcher.ts
index 6dbcb092..d5deb796 100644
--- a/src/stages/main/patchers/BlockPatcher.ts
+++ b/src/stages/main/patchers/BlockPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceTokenListIndex from 'coffee-lex/dist/SourceTokenListIndex';
+import { SourceTokenListIndex } from 'coffee-lex';
 import { traverse } from 'decaffeinate-parser';
 import NodePatcher from '../../../patchers/NodePatcher';
 import SharedBlockPatcher from '../../../patchers/SharedBlockPatcher';
diff --git a/src/stages/main/patchers/CSXElementPatcher.ts b/src/stages/main/patchers/CSXElementPatcher.ts
index e48a3d2c..c235fb2a 100644
--- a/src/stages/main/patchers/CSXElementPatcher.ts
+++ b/src/stages/main/patchers/CSXElementPatcher.ts
@@ -1,4 +1,4 @@
-import SourceType from 'coffee-lex/dist/SourceType';
+import { SourceType } from 'coffee-lex';
 import NodePatcher from '../../../patchers/NodePatcher';
 import { PatcherContext } from '../../../patchers/types';
 import StringPatcher from './StringPatcher';
diff --git a/src/stages/main/patchers/ClassPatcher.ts b/src/stages/main/patchers/ClassPatcher.ts
index a5786d85..93cfd774 100644
--- a/src/stages/main/patchers/ClassPatcher.ts
+++ b/src/stages/main/patchers/ClassPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import { Node } from 'decaffeinate-parser/dist/nodes';
 import { PatcherContext, PatchOptions } from '../../../patchers/types';
 import { isForbiddenJsName } from '../../../utils/isReservedWord';
diff --git a/src/stages/main/patchers/CompoundAssignOpPatcher.ts b/src/stages/main/patchers/CompoundAssignOpPatcher.ts
index d9addf76..82746474 100644
--- a/src/stages/main/patchers/CompoundAssignOpPatcher.ts
+++ b/src/stages/main/patchers/CompoundAssignOpPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import nodeContainsSoakOperation from '../../../utils/nodeContainsSoakOperation';
 import notNull from '../../../utils/notNull';
 import AssignOpPatcher from './AssignOpPatcher';
diff --git a/src/stages/main/patchers/ConditionalPatcher.ts b/src/stages/main/patchers/ConditionalPatcher.ts
index beb5293c..5661969f 100644
--- a/src/stages/main/patchers/ConditionalPatcher.ts
+++ b/src/stages/main/patchers/ConditionalPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceTokenListIndex from 'coffee-lex/dist/SourceTokenListIndex';
+import { SourceTokenListIndex } from 'coffee-lex';
 import { Conditional } from 'decaffeinate-parser/dist/nodes';
 import { PatcherContext, PatchOptions } from '../../../patchers/types';
 import getEnclosingScopeBlock from '../../../utils/getEnclosingScopeBlock';
diff --git a/src/stages/main/patchers/DoOpPatcher.ts b/src/stages/main/patchers/DoOpPatcher.ts
index a71b7c0a..f0283978 100644
--- a/src/stages/main/patchers/DoOpPatcher.ts
+++ b/src/stages/main/patchers/DoOpPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceTokenListIndex from 'coffee-lex/dist/SourceTokenListIndex';
+import { SourceTokenListIndex } from 'coffee-lex';
 import NodePatcher from '../../../patchers/NodePatcher';
 import { PatcherContext } from '../../../patchers/types';
 import notNull from '../../../utils/notNull';
diff --git a/src/stages/main/patchers/EqualityPatcher.ts b/src/stages/main/patchers/EqualityPatcher.ts
index e50825dd..a2cf9044 100644
--- a/src/stages/main/patchers/EqualityPatcher.ts
+++ b/src/stages/main/patchers/EqualityPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import getCompareOperator from '../../../utils/getCompareOperator';
 import isCompareOpNegationUnsafe from '../../../utils/isCompareOpNegationUnsafe';
 import notNull from '../../../utils/notNull';
diff --git a/src/stages/main/patchers/ExtendsOpPatcher.ts b/src/stages/main/patchers/ExtendsOpPatcher.ts
index 2f66b2f3..b4384a66 100644
--- a/src/stages/main/patchers/ExtendsOpPatcher.ts
+++ b/src/stages/main/patchers/ExtendsOpPatcher.ts
@@ -1,6 +1,6 @@
 import { SourceType } from 'coffee-lex';
 
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import BinaryOpPatcher from './BinaryOpPatcher';
 
 const EXTENDS_HELPER = `
diff --git a/src/stages/main/patchers/ForPatcher.ts b/src/stages/main/patchers/ForPatcher.ts
index ccd9ae8b..13612817 100644
--- a/src/stages/main/patchers/ForPatcher.ts
+++ b/src/stages/main/patchers/ForPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import { PatcherContext } from '../../../patchers/types';
 import getAssigneeBindings from '../../../utils/getAssigneeBindings';
 import notNull from '../../../utils/notNull';
diff --git a/src/stages/main/patchers/FunctionPatcher.ts b/src/stages/main/patchers/FunctionPatcher.ts
index 2e157b05..a5941b86 100644
--- a/src/stages/main/patchers/FunctionPatcher.ts
+++ b/src/stages/main/patchers/FunctionPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import { PatcherContext, PatchOptions } from '../../../patchers/types';
 import notNull from '../../../utils/notNull';
 import NodePatcher from './../../../patchers/NodePatcher';
diff --git a/src/stages/main/patchers/InOpPatcher.ts b/src/stages/main/patchers/InOpPatcher.ts
index dea4eeaa..bef30689 100644
--- a/src/stages/main/patchers/InOpPatcher.ts
+++ b/src/stages/main/patchers/InOpPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import { InOp } from 'decaffeinate-parser/dist/nodes';
 import NodePatcher from '../../../patchers/NodePatcher';
 import { PatcherContext } from '../../../patchers/types';
diff --git a/src/stages/main/patchers/InterpolatedPatcher.ts b/src/stages/main/patchers/InterpolatedPatcher.ts
index e2040a52..196046cb 100644
--- a/src/stages/main/patchers/InterpolatedPatcher.ts
+++ b/src/stages/main/patchers/InterpolatedPatcher.ts
@@ -1,6 +1,6 @@
 import { SourceType } from 'coffee-lex';
 
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import { PatcherContext } from '../../../patchers/types';
 import downgradeUnicodeCodePointEscapesInRange from '../../../utils/downgradeUnicodeCodePointEscapesInRange';
 import escape from '../../../utils/escape';
diff --git a/src/stages/main/patchers/JavaScriptPatcher.ts b/src/stages/main/patchers/JavaScriptPatcher.ts
index bfc736e0..34464af1 100644
--- a/src/stages/main/patchers/JavaScriptPatcher.ts
+++ b/src/stages/main/patchers/JavaScriptPatcher.ts
@@ -1,4 +1,4 @@
-import SourceType from 'coffee-lex/dist/SourceType';
+import { SourceType } from 'coffee-lex';
 import NodePatcher from './../../../patchers/NodePatcher';
 import FunctionApplicationPatcher from './FunctionApplicationPatcher';
 
diff --git a/src/stages/main/patchers/MemberAccessOpPatcher.ts b/src/stages/main/patchers/MemberAccessOpPatcher.ts
index fc4c39d8..111c7d9e 100644
--- a/src/stages/main/patchers/MemberAccessOpPatcher.ts
+++ b/src/stages/main/patchers/MemberAccessOpPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import { MemberAccessOp } from 'decaffeinate-parser/dist/nodes';
 import { PatcherContext, PatchOptions, RepeatableOptions } from '../../../patchers/types';
 import notNull from '../../../utils/notNull';
diff --git a/src/stages/main/patchers/ObjectInitialiserMemberPatcher.ts b/src/stages/main/patchers/ObjectInitialiserMemberPatcher.ts
index 7f9e9cac..6b0e0e02 100644
--- a/src/stages/main/patchers/ObjectInitialiserMemberPatcher.ts
+++ b/src/stages/main/patchers/ObjectInitialiserMemberPatcher.ts
@@ -1,4 +1,4 @@
-import SourceType from 'coffee-lex/dist/SourceType';
+import { SourceType } from 'coffee-lex';
 import { Identifier, ObjectInitialiserMember } from 'decaffeinate-parser/dist/nodes';
 import MemberAccessOpPatcher from './MemberAccessOpPatcher';
 import ObjectBodyMemberPatcher from './ObjectBodyMemberPatcher';
diff --git a/src/stages/main/patchers/ObjectInitialiserPatcher.ts b/src/stages/main/patchers/ObjectInitialiserPatcher.ts
index 6a67b638..40e78544 100644
--- a/src/stages/main/patchers/ObjectInitialiserPatcher.ts
+++ b/src/stages/main/patchers/ObjectInitialiserPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceTokenListIndex from 'coffee-lex/dist/SourceTokenListIndex';
+import { SourceTokenListIndex } from 'coffee-lex';
 import { PatcherContext } from '../../../patchers/types';
 import notNull from '../../../utils/notNull';
 import { isSemanticToken } from '../../../utils/types';
diff --git a/src/stages/main/patchers/OfOpPatcher.ts b/src/stages/main/patchers/OfOpPatcher.ts
index 1dbc7336..635f14ae 100644
--- a/src/stages/main/patchers/OfOpPatcher.ts
+++ b/src/stages/main/patchers/OfOpPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import NegatableBinaryOpPatcher from './NegatableBinaryOpPatcher';
 
 /**
diff --git a/src/stages/main/patchers/ProgramPatcher.ts b/src/stages/main/patchers/ProgramPatcher.ts
index 48d5be80..4136181e 100644
--- a/src/stages/main/patchers/ProgramPatcher.ts
+++ b/src/stages/main/patchers/ProgramPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import SharedProgramPatcher from '../../../patchers/SharedProgramPatcher';
 import getIndent from '../../../utils/getIndent';
 import notNull from '../../../utils/notNull';
diff --git a/src/stages/main/patchers/RangePatcher.ts b/src/stages/main/patchers/RangePatcher.ts
index 5e5270fe..55ffc44d 100644
--- a/src/stages/main/patchers/RangePatcher.ts
+++ b/src/stages/main/patchers/RangePatcher.ts
@@ -1,6 +1,6 @@
 import { SourceType } from 'coffee-lex';
 
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import { Int, Range } from 'decaffeinate-parser/dist/nodes';
 import BinaryOpPatcher from './BinaryOpPatcher';
 
diff --git a/src/stages/main/patchers/SeqOpPatcher.ts b/src/stages/main/patchers/SeqOpPatcher.ts
index 8c066f12..9d4a4078 100644
--- a/src/stages/main/patchers/SeqOpPatcher.ts
+++ b/src/stages/main/patchers/SeqOpPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import { PatcherContext } from '../../../patchers/types';
 import notNull from '../../../utils/notNull';
 import NodePatcher from './../../../patchers/NodePatcher';
diff --git a/src/stages/main/patchers/SlicePatcher.ts b/src/stages/main/patchers/SlicePatcher.ts
index 955eef7c..154e9212 100644
--- a/src/stages/main/patchers/SlicePatcher.ts
+++ b/src/stages/main/patchers/SlicePatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import { Int } from 'decaffeinate-parser/dist/nodes';
 import { PatcherContext } from '../../../patchers/types';
 import notNull from '../../../utils/notNull';
diff --git a/src/stages/main/patchers/SoakedFunctionApplicationPatcher.ts b/src/stages/main/patchers/SoakedFunctionApplicationPatcher.ts
index 8f52b166..3b656a77 100644
--- a/src/stages/main/patchers/SoakedFunctionApplicationPatcher.ts
+++ b/src/stages/main/patchers/SoakedFunctionApplicationPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import { REMOVE_GUARD } from '../../../suggestions';
 import findSoakContainer from '../../../utils/findSoakContainer';
 import nodeContainsSoakOperation from '../../../utils/nodeContainsSoakOperation';
diff --git a/src/stages/main/patchers/SpreadPatcher.ts b/src/stages/main/patchers/SpreadPatcher.ts
index a0dfdec7..c0f7dae4 100644
--- a/src/stages/main/patchers/SpreadPatcher.ts
+++ b/src/stages/main/patchers/SpreadPatcher.ts
@@ -1,4 +1,4 @@
-import SourceType from 'coffee-lex/dist/SourceType';
+import { SourceType } from 'coffee-lex';
 import { Identifier } from 'decaffeinate-parser/dist/nodes';
 import { PatcherContext } from '../../../patchers/types';
 import { REMOVE_ARRAY_FROM } from '../../../suggestions';
diff --git a/src/stages/main/patchers/SuperPatcher.ts b/src/stages/main/patchers/SuperPatcher.ts
index 29c58fed..5a9385e3 100644
--- a/src/stages/main/patchers/SuperPatcher.ts
+++ b/src/stages/main/patchers/SuperPatcher.ts
@@ -1,6 +1,6 @@
 import { SourceType } from 'coffee-lex';
 
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import extractPrototypeAssignPatchers from '../../../utils/extractPrototypeAssignPatchers';
 import notNull from '../../../utils/notNull';
 import NodePatcher from './../../../patchers/NodePatcher';
diff --git a/src/stages/main/patchers/SwitchCasePatcher.ts b/src/stages/main/patchers/SwitchCasePatcher.ts
index f58c3459..29c7ab9b 100644
--- a/src/stages/main/patchers/SwitchCasePatcher.ts
+++ b/src/stages/main/patchers/SwitchCasePatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import NodePatcher from '../../../patchers/NodePatcher';
 import { PatcherContext } from '../../../patchers/types';
 import notNull from '../../../utils/notNull';
diff --git a/src/stages/main/patchers/SwitchPatcher.ts b/src/stages/main/patchers/SwitchPatcher.ts
index 0fd1e224..00a99e8f 100644
--- a/src/stages/main/patchers/SwitchPatcher.ts
+++ b/src/stages/main/patchers/SwitchPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import NodePatcher from '../../../patchers/NodePatcher';
 import { PatcherContext } from '../../../patchers/types';
 import getEnclosingScopeBlock from '../../../utils/getEnclosingScopeBlock';
diff --git a/src/stages/main/patchers/TryPatcher.ts b/src/stages/main/patchers/TryPatcher.ts
index 1fd93a10..2cb54faa 100644
--- a/src/stages/main/patchers/TryPatcher.ts
+++ b/src/stages/main/patchers/TryPatcher.ts
@@ -1,6 +1,6 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
-import SourceTokenListIndex from 'coffee-lex/dist/SourceTokenListIndex';
+import { SourceToken } from 'coffee-lex';
+import { SourceTokenListIndex } from 'coffee-lex';
 import NodePatcher from '../../../patchers/NodePatcher';
 import { PatcherContext } from '../../../patchers/types';
 import getEnclosingScopeBlock from '../../../utils/getEnclosingScopeBlock';
diff --git a/src/stages/main/patchers/WhilePatcher.ts b/src/stages/main/patchers/WhilePatcher.ts
index 9d338b35..bd9d4e02 100644
--- a/src/stages/main/patchers/WhilePatcher.ts
+++ b/src/stages/main/patchers/WhilePatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceTokenListIndex from 'coffee-lex/dist/SourceTokenListIndex';
+import { SourceTokenListIndex } from 'coffee-lex';
 import { While } from 'decaffeinate-parser/dist/nodes';
 import { PatcherContext } from '../../../patchers/types';
 import notNull from '../../../utils/notNull';
diff --git a/src/stages/normalize/patchers/ConditionalPatcher.ts b/src/stages/normalize/patchers/ConditionalPatcher.ts
index 9fe4ed0c..a7c3aeb3 100644
--- a/src/stages/normalize/patchers/ConditionalPatcher.ts
+++ b/src/stages/normalize/patchers/ConditionalPatcher.ts
@@ -1,6 +1,6 @@
 import { SourceType } from 'coffee-lex';
 
-import SourceTokenListIndex from 'coffee-lex/dist/SourceTokenListIndex';
+import { SourceTokenListIndex } from 'coffee-lex';
 import NodePatcher from '../../../patchers/NodePatcher';
 import { PatcherContext } from '../../../patchers/types';
 import notNull from '../../../utils/notNull';
diff --git a/src/stages/normalize/patchers/ForPatcher.ts b/src/stages/normalize/patchers/ForPatcher.ts
index 7194e2cd..97abd33c 100644
--- a/src/stages/normalize/patchers/ForPatcher.ts
+++ b/src/stages/normalize/patchers/ForPatcher.ts
@@ -1,6 +1,6 @@
 import { SourceType } from 'coffee-lex';
 
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import NodePatcher from '../../../patchers/NodePatcher';
 import { PatcherContext } from '../../../patchers/types';
 import canPatchAssigneeToJavaScript from '../../../utils/canPatchAssigneeToJavaScript';
diff --git a/src/stages/normalize/patchers/FunctionApplicationPatcher.ts b/src/stages/normalize/patchers/FunctionApplicationPatcher.ts
index 757b788b..cd0870c0 100644
--- a/src/stages/normalize/patchers/FunctionApplicationPatcher.ts
+++ b/src/stages/normalize/patchers/FunctionApplicationPatcher.ts
@@ -1,6 +1,6 @@
 import { SourceType } from 'coffee-lex';
 
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import { CSXElement } from 'decaffeinate-parser/dist/nodes';
 import { PatcherContext } from '../../../patchers/types';
 import normalizeListItem from '../../../utils/normalizeListItem';
diff --git a/src/stages/normalize/patchers/ObjectInitialiserPatcher.ts b/src/stages/normalize/patchers/ObjectInitialiserPatcher.ts
index 59e5ca54..fb9eeb29 100644
--- a/src/stages/normalize/patchers/ObjectInitialiserPatcher.ts
+++ b/src/stages/normalize/patchers/ObjectInitialiserPatcher.ts
@@ -1,4 +1,4 @@
-import SourceType from 'coffee-lex/dist/SourceType';
+import { SourceType } from 'coffee-lex';
 import { PatcherContext } from '../../../patchers/types';
 import normalizeListItem from '../../../utils/normalizeListItem';
 import NodePatcher from './../../../patchers/NodePatcher';
diff --git a/src/stages/normalize/patchers/ProtoMemberAccessOpPatcher.ts b/src/stages/normalize/patchers/ProtoMemberAccessOpPatcher.ts
index 1476098c..0aa722bb 100644
--- a/src/stages/normalize/patchers/ProtoMemberAccessOpPatcher.ts
+++ b/src/stages/normalize/patchers/ProtoMemberAccessOpPatcher.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import NodePatcher from '../../../patchers/NodePatcher';
 import { PatcherContext } from '../../../patchers/types';
 import MemberAccessOpPatcher from './MemberAccessOpPatcher';
diff --git a/src/stages/normalize/patchers/SuperPatcher.ts b/src/stages/normalize/patchers/SuperPatcher.ts
index 6be6c0b8..12d52369 100644
--- a/src/stages/normalize/patchers/SuperPatcher.ts
+++ b/src/stages/normalize/patchers/SuperPatcher.ts
@@ -1,6 +1,6 @@
 import { SourceType } from 'coffee-lex';
 
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import notNull from '../../../utils/notNull';
 import NodePatcher from './../../../patchers/NodePatcher';
 import AssignOpPatcher, { EarlySuperTransformInfo } from './AssignOpPatcher';
diff --git a/src/utils/DecaffeinateContext.ts b/src/utils/DecaffeinateContext.ts
index aacdecc0..b0338654 100644
--- a/src/utils/DecaffeinateContext.ts
+++ b/src/utils/DecaffeinateContext.ts
@@ -1,4 +1,4 @@
-import SourceTokenList from 'coffee-lex/dist/SourceTokenList';
+import { SourceTokenList } from 'coffee-lex';
 import { Block } from 'decaffeinate-coffeescript2/lib/coffeescript/nodes';
 import { parse as decaffeinateParse, traverse } from 'decaffeinate-parser';
 import { Node, Program } from 'decaffeinate-parser/dist/nodes';
diff --git a/src/utils/formatCoffeeLexTokens.ts b/src/utils/formatCoffeeLexTokens.ts
index 05a53c32..ea0a28b1 100644
--- a/src/utils/formatCoffeeLexTokens.ts
+++ b/src/utils/formatCoffeeLexTokens.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceTokenList from 'coffee-lex/dist/SourceTokenList';
+import { SourceTokenList } from 'coffee-lex';
 
 import CodeContext from './CodeContext';
 
diff --git a/src/utils/types.ts b/src/utils/types.ts
index 49f0852d..aa7b01cb 100644
--- a/src/utils/types.ts
+++ b/src/utils/types.ts
@@ -1,5 +1,5 @@
 import { SourceType } from 'coffee-lex';
-import SourceToken from 'coffee-lex/dist/SourceToken';
+import { SourceToken } from 'coffee-lex';
 import { Node } from 'decaffeinate-parser/dist/nodes';
 
 /**


Test patch:
diff --git a/test/utils/formatCoffeeLexTokens_test.ts b/test/utils/formatCoffeeLexTokens_test.ts
index 1d5e9539..0e24f8ab 100644
--- a/test/utils/formatCoffeeLexTokens_test.ts
+++ b/test/utils/formatCoffeeLexTokens_test.ts
@@ -1,5 +1,5 @@
 import { strictEqual } from 'assert';
-import lex from 'coffee-lex';
+import { lex } from 'coffee-lex';
 import CodeContext from '../../src/utils/CodeContext';
 import formatCoffeeLexTokens from '../../src/utils/formatCoffeeLexTokens';
 import stripSharedIndent from '../../src/utils/stripSharedIndent';