diff --git a/packages/cspell-tools/.travis.yml b/packages/cspell-tools/.travis.yml index 28efe9faab3..22557810b4e 100644 --- a/packages/cspell-tools/.travis.yml +++ b/packages/cspell-tools/.travis.yml @@ -1,7 +1,7 @@ language: node_js node_js: - "node" - - "6" + - "8" script: - npm install - npm run build diff --git a/packages/cspell-tools/CHANGELOG.md b/packages/cspell-tools/CHANGELOG.md index 8fa0fa54cae..e937914d42c 100644 --- a/packages/cspell-tools/CHANGELOG.md +++ b/packages/cspell-tools/CHANGELOG.md @@ -1,5 +1,7 @@ # Release Notes +## 2.0 +* Update to rxjs 6 ## 1.4.1 * Update packages diff --git a/packages/cspell-tools/package-lock.json b/packages/cspell-tools/package-lock.json index a86d6564300..2d4f8df9b21 100644 --- a/packages/cspell-tools/package-lock.json +++ b/packages/cspell-tools/package-lock.json @@ -5,20 +5,11 @@ "requires": true, "dependencies": { "@types/chai": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.2.tgz", - "integrity": "sha512-D8uQwKYUw2KESkorZ27ykzXgvkDJYXVEihGklgfp5I4HUP8D6IxtcdLTMB1emjQiWzV7WZ5ihm1cxIzVwjoleQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.3.tgz", + "integrity": "sha512-f5dXGzOJycyzSMdaXVhiBhauL4dYydXwVpavfQ1mVCaGjR56a9QfklXObUxlIY9bGTmCPHEEZ04I16BZ/8w5ww==", "dev": true }, - "@types/commander": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/@types/commander/-/commander-2.12.2.tgz", - "integrity": "sha512-0QEFiR8ljcHp9bAbWxecjVRuAMr16ivPiGOw6KFQBVrVd0RQIcM3xKdRisH2EDWgVWujiYtHwhSkSUoAAGzH7Q==", - "dev": true, - "requires": { - "commander": "2.14.1" - } - }, "@types/events": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@types/events/-/events-1.1.0.tgz", @@ -26,12 +17,12 @@ "dev": true }, "@types/fs-extra": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-4.0.7.tgz", - "integrity": "sha512-BN48b/2F3kL0Ual7tjcHjj0Fl+nuYKtHa0G/xT3Q43HuCpN7rQD5vIx6Aqnl9x10oBI5xMJh8Ly+FQpP205JlA==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.0.2.tgz", + "integrity": "sha512-Q3FWsbdmkQd1ib11A4XNWQvRD//5KpPoGawA8aB2DR7pWKoW9XQv3+dGxD/Z1eVFze23Okdo27ZQytVFlweKvQ==", "dev": true, "requires": { - "@types/node": "8.9.4" + "@types/node": "8.10.10" } }, "@types/glob": { @@ -42,7 +33,7 @@ "requires": { "@types/events": "1.1.0", "@types/minimatch": "3.0.3", - "@types/node": "8.9.4" + "@types/node": "8.10.10" } }, "@types/lorem-ipsum": { @@ -58,27 +49,15 @@ "dev": true }, "@types/mocha": { - "version": "2.2.48", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.48.tgz", - "integrity": "sha512-nlK/iyETgafGli8Zh9zJVCTicvU3iajSkRwOh3Hhiva598CMqNJ4NcVCGMTGKpGpTYj/9R8RLzS9NAykSSCqGw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-YeDiSEzznwZwwp766SJ6QlrTyBYUGPSIwmREHVTmktUYiT/WADdWtpt9iH0KuUSf8lZLdI4lP0X6PBzPo5//JQ==", "dev": true }, "@types/node": { - "version": "8.9.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.4.tgz", - "integrity": "sha512-dSvD36qnQs78G1BPsrZFdPpvLgMW/dnvr5+nTW2csMs5TiP9MOXrjUbnMZOEwnIuBklXtn7b6TPA2Cuq07bDHA==", - "dev": true - }, - "@types/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-FKjsOVbC6B7bdSB5CuzyHCkK69I=", - "dev": true - }, - "@types/strip-json-comments": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz", - "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==", + "version": "8.10.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.10.tgz", + "integrity": "sha512-p3W/hFzQs76RlYRIZsZc5a9bht6m0TspmWYYbKhRswmLnwj9fsE40EbuGifeu/XWR/c0UJQ1DDbvTxIsm/OOAA==", "dev": true }, "@types/xregexp": { @@ -153,9 +132,15 @@ } }, "browser-stdout": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", - "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "buffer-from": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", + "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==", "dev": true }, "builtin-modules": { @@ -179,20 +164,20 @@ } }, "chalk": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", - "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "3.2.0", + "ansi-styles": "3.2.1", "escape-string-regexp": "1.0.5", - "supports-color": "5.2.0" + "supports-color": "5.4.0" }, "dependencies": { "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "1.9.0" @@ -205,9 +190,9 @@ "dev": true }, "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { "has-flag": "3.0.0" @@ -237,62 +222,31 @@ "dev": true }, "commander": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz", - "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==" + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==" }, "cspell-lib": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-1.0.2.tgz", - "integrity": "sha1-KFq8pjVq4AP6XNcPjXZuAPxOuK8=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-3.0.1.tgz", + "integrity": "sha512-2HZ+ojVKkF28bbx+qio7krnXfACpuRZ+67VIpFMuZs/5KZk8o0R7V+nar5AFdkUIkx8dy2zO0eHWyOeapvMv/Q==", "requires": { - "iconv-lite": "0.4.19", - "rxjs": "5.5.6", - "rxjs-stream": "1.1.0" + "iconv-lite": "0.4.21", + "rxjs-stream": "2.0.3" } }, "cspell-trie": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/cspell-trie/-/cspell-trie-2.0.3.tgz", - "integrity": "sha512-5jJiOPbKWzHNoJAwOQ/fkBXJ2xs+P5zfQmj2OEqq1k4Ck5/88KLEkXJmNOPDG8nDP1va5kaLz3vUtAxABo1bwg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/cspell-trie/-/cspell-trie-3.0.2.tgz", + "integrity": "sha512-0gET4Dd+POUq7d8T3PmhsXTZDaQxgwHwSS63lHMGMx5hfV/Ns5SbQ7fpWFNOE4dTnLNJDCWEf+KvWl5lDKajHQ==", "requires": { - "commander": "2.14.1", - "cspell-lib": "2.0.1", - "fs-extra": "4.0.3", + "commander": "2.15.1", + "cspell-lib": "3.0.1", + "fs-extra": "5.0.0", "gensequence": "2.1.1", - "rxjs": "5.5.6", - "rxjs-from-iterable": "1.0.5", - "rxjs-stream": "1.1.0" - }, - "dependencies": { - "cspell-lib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-2.0.1.tgz", - "integrity": "sha512-lq6DXiPnMYd+KWQ6N8L4FJ71JCJD1ot8q6ztSkqAMJUDb26dWYE2DvN0Hq35eg5RCsozUOI2AB4EBaVNmQdDUg==", - "requires": { - "iconv-lite": "0.4.19", - "rxjs": "5.5.6", - "rxjs-stream": "1.1.0" - } - }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "requires": { - "graceful-fs": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "jsonfile": "4.0.0", - "universalify": "https://registry.npmjs.org/universalify/-/universalify-0.1.0.tgz" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" - } - } + "hunspell-reader": "2.0.1", + "rxjs": "6.0.0", + "rxjs-stream": "2.0.3" } }, "debug": { @@ -338,33 +292,13 @@ "dev": true }, "fs-extra": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", - "integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", "requires": { "graceful-fs": "4.1.11", - "jsonfile": "3.0.1", + "jsonfile": "4.0.0", "universalify": "0.1.1" - }, - "dependencies": { - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "jsonfile": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", - "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", - "requires": { - "graceful-fs": "4.1.11" - } - }, - "universalify": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", - "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=" - } } }, "gensequence": { @@ -431,7 +365,8 @@ } }, "graceful-fs": { - "version": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, "growl": { @@ -461,33 +396,26 @@ "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, - "homedir-polyfill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", - "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", - "dev": true, - "requires": { - "parse-passwd": "1.0.0" - } - }, "hunspell-reader": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/hunspell-reader/-/hunspell-reader-1.2.1.tgz", - "integrity": "sha1-sm14hmMep8kwKBxdqkXYkpuN9WY=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hunspell-reader/-/hunspell-reader-2.0.1.tgz", + "integrity": "sha512-DEJm6Lt/1+nwyqZGo61w2LcdhaNiZGvvIEuMDZfn4Jo9/tTqUWOQuBriRihWntWMmByronZisvNhi5y3vqpNmg==", "requires": { - "commander": "2.14.1", - "cspell-lib": "1.0.2", - "fs-extra": "3.0.1", + "commander": "2.15.1", + "cspell-lib": "3.0.1", + "fs-extra": "5.0.0", "gensequence": "2.1.1", - "rxjs": "5.5.6", - "rxjs-from-iterable": "1.0.5", - "rxjs-stream": "1.1.0" + "rxjs": "6.0.0", + "rxjs-stream": "2.0.3" } }, "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz", + "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", + "requires": { + "safer-buffer": "2.1.2" + } }, "js-tokens": { "version": "3.0.2", @@ -505,6 +433,22 @@ "esprima": "4.0.0" } }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "4.1.11" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "optional": true + } + } + }, "lorem-ipsum": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/lorem-ipsum/-/lorem-ipsum-1.0.4.tgz", @@ -582,19 +526,20 @@ } }, "mocha": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.0.1.tgz", - "integrity": "sha512-SpwyojlnE/WRBNGtvJSNfllfm5PqEDFxcWluSIgLeSBJtXG4DmoX2NNAeEA7rP5kK+79VgtVq8nG6HskaL1ykg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.1.1.tgz", + "integrity": "sha512-kKKs/H1KrMMQIEsWNxGmb4/BGsmj0dkeyotEvbrAuQ01FcWRLssUNXCEUZk6SZtyJBi6EE7SL0zDDtItw1rGhw==", "dev": true, "requires": { - "browser-stdout": "1.3.0", + "browser-stdout": "1.3.1", "commander": "2.11.0", "debug": "3.1.0", - "diff": "3.3.1", + "diff": "3.5.0", "escape-string-regexp": "1.0.5", "glob": "7.1.2", "growl": "1.10.3", "he": "1.1.1", + "minimatch": "3.0.4", "mkdirp": "0.5.1", "supports-color": "4.4.0" }, @@ -606,9 +551,9 @@ "dev": true }, "diff": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", - "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true } } @@ -619,12 +564,6 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", - "dev": true - }, "path-parse": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", @@ -656,22 +595,22 @@ } }, "rxjs": { - "version": "5.5.6", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.6.tgz", - "integrity": "sha512-v4Q5HDC0FHAQ7zcBX7T2IL6O5ltl1a2GX4ENjPXg6SjDY69Cmx9v4113C99a4wGF16ClPv5Z8mghuYorVkg/kg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.0.0.tgz", + "integrity": "sha512-2MgLQr1zvks8+Kip4T6hcJdiBhV+SIvxguoWjhwtSpNPTp/5e09HJbgclCwR/nW0yWzhubM+6Q0prl8G5RuoBA==", "requires": { - "symbol-observable": "1.0.1" + "tslib": "1.9.0" } }, - "rxjs-from-iterable": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/rxjs-from-iterable/-/rxjs-from-iterable-1.0.5.tgz", - "integrity": "sha1-zqsVcAVLO7Bf0m15iBSCx9sbc9c=" - }, "rxjs-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/rxjs-stream/-/rxjs-stream-1.1.0.tgz", - "integrity": "sha512-2PBNImkyA+vf516dBSifK8EIQZWiSsEBIHBvwHeQgdJSsjkI58fHBY46ZKogg95Kuy99fSMXL34htYyn0e1l4w==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/rxjs-stream/-/rxjs-stream-2.0.3.tgz", + "integrity": "sha512-i8sN1i6hld1n0gK8pJEtJIERwz5MgpRvVx3US9tPG1ynJSonFq/VlRx2DFSx0zTyhE4Vl96/rIYSZ6lJdP810g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "semver": { "version": "5.5.0", @@ -686,11 +625,12 @@ "dev": true }, "source-map-support": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.3.tgz", - "integrity": "sha512-eKkTgWYeBOQqFGXRfKabMFdnWepo51vWqEdoeikaEPFiJC7MCU5j2h4+6Q8npkZTeLGbSyecZvRxiSoWl3rh+w==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.5.tgz", + "integrity": "sha512-mR7/Nd5l1z6g99010shcXJiNEaf3fEtmLhRB/sBcQVJGodcHCULPp2y4Sfa43Kv2zq7T+Izmfp/WHCR6dYkQCA==", "dev": true, "requires": { + "buffer-from": "1.0.0", "source-map": "0.6.1" } }, @@ -709,18 +649,6 @@ "ansi-regex": "2.1.1" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, "supports-color": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", @@ -730,26 +658,19 @@ "has-flag": "2.0.0" } }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" - }, "ts-node": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-4.1.0.tgz", - "integrity": "sha512-xcZH12oVg9PShKhy3UHyDmuDLV3y7iKwX25aMVPt1SIXSuAfWkFiGPEkg+th8R4YKW/QCxDoW7lJdb15lx6QWg==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-6.0.1.tgz", + "integrity": "sha512-LDS8WJRTEztvQEXbRK/0l/apWE0BNR/USGUhVcJDe2/hbNiB/v/lCqk6YJzgwKjScgdWOAhPQsfur7hmQ1Y1jA==", "dev": true, "requires": { "arrify": "1.0.1", - "chalk": "2.3.1", + "chalk": "2.4.1", "diff": "3.2.0", "make-error": "1.3.4", "minimist": "1.2.0", "mkdirp": "0.5.1", - "source-map-support": "0.5.3", - "tsconfig": "7.0.0", - "v8flags": "3.0.1", + "source-map-support": "0.5.5", "yn": "2.0.0" }, "dependencies": { @@ -761,23 +682,10 @@ } } }, - "tsconfig": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz", - "integrity": "sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==", - "dev": true, - "requires": { - "@types/strip-bom": "3.0.0", - "@types/strip-json-comments": "0.0.30", - "strip-bom": "3.0.0", - "strip-json-comments": "2.0.1" - } - }, "tslib": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", - "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==", - "dev": true + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" }, "tslint": { "version": "5.9.1", @@ -788,7 +696,7 @@ "babel-code-frame": "6.26.0", "builtin-modules": "1.1.1", "chalk": "2.3.1", - "commander": "2.14.1", + "commander": "2.15.1", "diff": "3.2.0", "glob": "7.1.2", "js-yaml": "3.10.0", @@ -836,21 +744,6 @@ } } }, - "tsmerge": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/tsmerge/-/tsmerge-1.0.4.tgz", - "integrity": "sha1-XbDYHIVu7N+1K8UsaK1Qrz3apRs=", - "requires": { - "object-assign": "4.1.1" - }, - "dependencies": { - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - } - } - }, "tsutils": { "version": "2.21.1", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.21.1.tgz", @@ -867,28 +760,20 @@ "dev": true }, "typescript": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.5.3.tgz", - "integrity": "sha512-ptLSQs2S4QuS6/OD1eAKG+S5G8QQtrU5RT32JULdZQtM1L3WTi34Wsu48Yndzi8xsObRAB9RPt/KhA9wlpEF6w==", + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.8.3.tgz", + "integrity": "sha512-K7g15Bb6Ra4lKf7Iq2l/I5/En+hLIHmxWZGq3D4DIRNFxMNV6j2SHSvDOqs2tGd4UvD/fJvrwopzQXjLrT7Itw==", "dev": true }, "universalify": { - "version": "https://registry.npmjs.org/universalify/-/universalify-0.1.0.tgz", - "integrity": "sha1-nrHEZR3rzGcMyU8adXYjMruWd3g=" - }, - "v8flags": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.0.1.tgz", - "integrity": "sha1-3Oj8N5wX2fLJ6e142JzgAFKxt2s=", - "dev": true, - "requires": { - "homedir-polyfill": "1.0.1" - } + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", + "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=" }, "xregexp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-3.2.0.tgz", - "integrity": "sha1-yzYBmHv+JpW1hAAMGPHEqMMih44=" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.1.1.tgz", + "integrity": "sha512-QJ1gfSUV7kEOLfpKFCjBJRnfPErUzkNKFMso4kDSmGpp3x6ZgkyKf74inxI7PnnQCFYq5TqYJCd7DrgDN8Q05A==" }, "yn": { "version": "2.0.0", diff --git a/packages/cspell-tools/package.json b/packages/cspell-tools/package.json index c51cb85188d..6fa41484cf5 100644 --- a/packages/cspell-tools/package.json +++ b/packages/cspell-tools/package.json @@ -33,38 +33,35 @@ }, "homepage": "https://github.com/Jason3S/cSpell-Tools#readme", "devDependencies": { - "@types/chai": "^4.1.2", - "@types/commander": "^2.12.2", - "@types/fs-extra": "^4.0.7", + "@types/chai": "^4.1.3", + "@types/fs-extra": "^5.0.2", "@types/glob": "^5.0.35", "@types/lorem-ipsum": "^1.0.2", "@types/minimatch": "^3.0.3", - "@types/mocha": "^2.2.48", - "@types/node": "^8.9.4", + "@types/mocha": "^5.2.0", + "@types/node": "^8.10.10", "@types/xregexp": "^3.0.29", "chai": "^4.1.2", "lorem-ipsum": "^1.0.4", - "mocha": "^5.0.1", + "mocha": "^5.1.1", "rimraf": "^2.6.2", - "ts-node": "^4.1.0", + "ts-node": "^6.0.1", "tslint": "^5.9.1", - "typescript": "2.5.3" + "typescript": "^2.8.3" }, "dependencies": { - "commander": "^2.14.1", - "cspell-lib": "^1.0.2", - "cspell-trie": "^2.0.3", - "fs-extra": "^3.0.1", + "commander": "^2.15.1", + "cspell-lib": "^3.0.1", + "cspell-trie": "^3.0.2", + "fs-extra": "^5.0.0", "gensequence": "^2.1.1", "glob": "^7.1.1", - "hunspell-reader": "^1.2.0", - "iconv-lite": "^0.4.19", + "hunspell-reader": "^2.0.1", + "iconv-lite": "^0.4.21", "minimatch": "^3.0.4", - "rxjs": "^5.5.6", - "rxjs-from-iterable": "^1.0.5", - "rxjs-stream": "^1.1.0", - "tsmerge": "^1.0.4", - "xregexp": "^3.2.0" + "rxjs": "^6.0.0", + "rxjs-stream": "^2.0.3", + "xregexp": "^4.1.1" }, "engines": { "node": ">=8.0.0" diff --git a/packages/cspell-tools/src/app.ts b/packages/cspell-tools/src/app.ts index 9ec34465f70..d0ed5831c50 100644 --- a/packages/cspell-tools/src/app.ts +++ b/packages/cspell-tools/src/app.ts @@ -7,13 +7,14 @@ import { compileWordList, compileTrie } from './compiler'; import * as path from 'path'; import * as program from 'commander'; -import * as Rx from 'rxjs/Rx'; +import { Observable, bindNodeCallback, from } from 'rxjs'; +import { flatMap, map, concatMap } from 'rxjs/operators'; import * as glob from 'glob'; import * as minimatch from 'minimatch'; const npmPackage = require(path.join(__dirname, '..', 'package.json')); -type GlobRx = (filename: string, options?: minimatch.IOptions) => Rx.Observable; -const globRx: GlobRx = Rx.Observable.bindNodeCallback(glob); +type GlobRx = (filename: string, options?: minimatch.IOptions) => Observable; +const globRx: GlobRx = bindNodeCallback(glob); program .version(npmPackage.version); @@ -31,19 +32,20 @@ program const ext = '.txt' + (options.compress ? '.gz' : ''); - Rx.Observable.from(src) - .flatMap(src => globRx(src)) - .flatMap(s => s) - .map(s => { + from(src).pipe( + flatMap(src => globRx(src)), + flatMap(s => s), + map(s => { const outFilename = path.basename(s).replace(/(\.txt|\.dic|\.aff)?$/, ext); const dir = options.output ? options.output : path.dirname(s); return [s, path.join(dir, outFilename)]; - }) - .concatMap(([src, dst]) => { + }), + concatMap(([src, dst]) => { console.log('Process "%s" to "%s"', src, dst); return compileWordList(src, dst).then(() => src); - }) - .forEach(name => console.log(`Complete.`)); + }), + ) + .forEach(name => console.log(`Complete.`)); }); program @@ -59,19 +61,20 @@ program const ext = '.trie' + (options.compress ? '.gz' : ''); - Rx.Observable.from(src) - .flatMap(src => globRx(src)) - .flatMap(s => s) - .map(s => { + from(src).pipe( + flatMap(src => globRx(src)), + flatMap(s => s), + map(s => { const outFilename = path.basename(s).replace(/(\.txt|\.dic|\.aff)?$/, ext); const dir = options.output ? options.output : path.dirname(s); return [s, path.join(dir, outFilename)]; - }) - .concatMap(([src, dst]) => { + }), + concatMap(([src, dst]) => { console.log('Process "%s" to "%s"', src, dst); return compileTrie(src, dst).then(() => src); }) - .forEach(name => console.log(`Complete.`)); + ) + .forEach(name => console.log(`Complete.`)); }); program.parse(process.argv); diff --git a/packages/cspell-tools/src/compiler/fileReader.test.ts b/packages/cspell-tools/src/compiler/fileReader.test.ts index afdcaf65b56..a64cb318d1d 100644 --- a/packages/cspell-tools/src/compiler/fileReader.test.ts +++ b/packages/cspell-tools/src/compiler/fileReader.test.ts @@ -1,26 +1,27 @@ import { expect } from 'chai'; import * as fReader from './fileReader'; -import * as Rx from 'rxjs/Rx'; +import { of } from 'rxjs'; +import { toArray } from 'rxjs/operators'; import * as fs from 'fs'; describe('Validate the fileReader', () => { it('tests stringsToLines', () => { - const strings = Rx.Observable.of('a1\n2\n3\n4', '5\n6'); - return fReader.stringsToLinesRx(strings).toArray().toPromise().then((a) => { + const strings = of('a1\n2\n3\n4', '5\n6'); + return fReader.stringsToLinesRx(strings).pipe(toArray()).toPromise().then((a) => { expect(a).to.be.deep.equal(['a1', '2', '3', '45', '6']); }); }); it('tests stringsToLines trailing new line', () => { - const strings = Rx.Observable.of('a1\n2\n3\n4', '5\n6\n'); - return fReader.stringsToLinesRx(strings).toArray().toPromise().then((a) => { + const strings = of('a1\n2\n3\n4', '5\n6\n'); + return fReader.stringsToLinesRx(strings).pipe(toArray()).toPromise().then((a) => { expect(a).to.be.deep.equal(['a1', '2', '3', '45', '6', '']); }); }); it('test the file reader', () => { return fReader.stringsToLinesRx(fReader.textFileStreamRx(__filename)) - .toArray() + .pipe(toArray()) .toPromise() .then(lines => { const actual = lines.join('\n'); @@ -31,7 +32,7 @@ describe('Validate the fileReader', () => { it('test the lineReaderRx', () => { return fReader.lineReaderRx(__filename) - .toArray() + .pipe(toArray()) .toPromise() .then(lines => { const expected = fs.readFileSync(__filename, 'UTF-8').split('\n'); @@ -41,7 +42,7 @@ describe('Validate the fileReader', () => { it('test missing file', () => { return fReader.lineReaderRx(__filename + 'not.found') - .toArray() + .pipe(toArray()) .toPromise() .then( () => { diff --git a/packages/cspell-tools/src/compiler/fileWriter.test.ts b/packages/cspell-tools/src/compiler/fileWriter.test.ts index f915295ba02..305d190cbe5 100644 --- a/packages/cspell-tools/src/compiler/fileWriter.test.ts +++ b/packages/cspell-tools/src/compiler/fileWriter.test.ts @@ -1,7 +1,8 @@ import { expect } from 'chai'; import * as fileWriter from './fileWriter'; import * as fileReader from './fileReader'; -import * as Rx from 'rxjs/Rx'; +import { from } from 'rxjs'; +import { flatMap, concatMap, reduce } from 'rxjs/operators'; import * as loremIpsum from 'lorem-ipsum'; import * as path from 'path'; import { mkdirp } from 'fs-extra'; @@ -12,12 +13,13 @@ describe('Validate the writer', () => { const data = text.split(/\b/); const filename = path.join(__dirname, '..', '..', 'temp', 'tests-writing-an-observable.txt'); - return Rx.Observable.from(mkdirp(path.dirname(filename))) - .flatMap(() => { - return fileWriter.writeToFileRxP(filename, Rx.Observable.from(data)); - }) - .concatMap(() => fileReader.textFileStreamRx(filename)) - .reduce((a, b) => a + b) + return from(mkdirp(path.dirname(filename))).pipe( + flatMap(() => { + return fileWriter.writeToFileRxP(filename, from(data)); + }), + concatMap(() => fileReader.textFileStreamRx(filename)), + reduce((a, b) => a + b), + ) .toPromise() .then(result => { expect(result).to.equal(text); diff --git a/packages/cspell-tools/src/compiler/rxStreams.test.ts b/packages/cspell-tools/src/compiler/rxStreams.test.ts index 850942ddc72..e354c46bdf3 100644 --- a/packages/cspell-tools/src/compiler/rxStreams.test.ts +++ b/packages/cspell-tools/src/compiler/rxStreams.test.ts @@ -1,7 +1,8 @@ import { expect } from 'chai'; import * as rxStream from './rxStreams'; import * as stream from 'stream'; -import * as Rx from 'rxjs/Rx'; +import { from } from 'rxjs'; +import { reduce } from 'rxjs/operators'; describe('Validate the rxStreams', () => { @@ -10,7 +11,7 @@ describe('Validate the rxStreams', () => { const bufferStream = new stream.PassThrough(); bufferStream.end(data); return rxStream.streamToStringRx(bufferStream) - .reduce((a, b) => a + b) + .pipe(reduce((a, b) => a + b)) .toPromise() .then(result => { expect(result).to.equal(data); @@ -19,11 +20,11 @@ describe('Validate the rxStreams', () => { it('tests Rx to stream', () => { const data: string = 'This is a bit of text to have some fun with'; - const rxObs = Rx.Observable.from(data.split(' ')); + const rxObs = from(data.split(' ')); const stream = rxStream.observableToStream(rxObs); return rxStream.streamToStringRx(stream) - .reduce((a, b) => a + ' ' + b) + .pipe(reduce((a, b) => a + ' ' + b)) .toPromise() .then(result => { expect(result).to.equal(data); diff --git a/packages/cspell-tools/src/compiler/text.ts b/packages/cspell-tools/src/compiler/text.ts index e1666527ab1..f355a5b0b1b 100644 --- a/packages/cspell-tools/src/compiler/text.ts +++ b/packages/cspell-tools/src/compiler/text.ts @@ -2,7 +2,6 @@ // cSpell:words xregexp import * as XRegExp from 'xregexp'; -import {merge} from 'tsmerge'; import {genSequence, scanMap, Sequence, sequenceFromRegExpMatch } from 'gensequence'; export interface WordOffset { @@ -194,8 +193,10 @@ export function toTextOffset(text: string | WordOffset | TextOffset): TextOffset return { text: text.word, offset: text.offset }; } + + function offsetMap(offset: number) { - return (xo: T) => merge(xo, { offset: xo.offset + offset }); + return (xo: T) => Object.assign({}, xo, {offset: xo.offset + offset }); } export function stringToRegExp(pattern: string | RegExp, defaultFlags = 'gim', forceFlags = 'g') { diff --git a/packages/cspell-tools/src/compiler/wordListCompiler.test.ts b/packages/cspell-tools/src/compiler/wordListCompiler.test.ts index 162db422f12..1cc751d1a7b 100644 --- a/packages/cspell-tools/src/compiler/wordListCompiler.test.ts +++ b/packages/cspell-tools/src/compiler/wordListCompiler.test.ts @@ -8,7 +8,8 @@ import { normalizeWords, normalizeWordsToTrie } from './wordListCompiler'; import * as fsp from 'fs-extra'; import * as Trie from 'cspell-trie'; import * as path from 'path'; -import * as Rx from 'rxjs/Rx'; +import { from } from 'rxjs'; +import { flatMap, take, toArray } from 'rxjs/operators'; describe('Validate the wordListCompiler', function() { it('tests splitting lines', () => { @@ -53,16 +54,16 @@ describe('Validate the wordListCompiler', function() { it('test reading and normalizing a file', () => { const sourceName = path.join(__dirname, '..', '..', 'Samples', 'cities.txt'); const destName = path.join(__dirname, '..', '..', 'temp', 'cities.txt'); - return Rx.Observable.fromPromise(compileWordList(sourceName, destName)) - .flatMap(s => { - expect(s).to.be.not.empty; - return new Promise((resolve, reject) => { - s.on('finish', () => resolve()); - s.on('error', () => reject()); - }); - }) - .take(1) - .toPromise() + return from(compileWordList(sourceName, destName)).pipe( + flatMap(s => { + expect(s).to.be.not.empty; + return new Promise((resolve, reject) => { + s.on('finish', () => resolve()); + s.on('error', () => reject()); + }); + }), + take(1), + ).toPromise() .then(() => fsp.readFile(destName, 'utf8')) .then(output => { expect(output).to.be.equal(citiesResult); @@ -71,8 +72,8 @@ describe('Validate the wordListCompiler', function() { it('tests normalized to a trie', () => { const words = citiesResult.split('\n'); - const nWords = normalizeWords(Rx.Observable.from(words)).toArray().toPromise(); - const tWords = normalizeWordsToTrie(Rx.Observable.from(words)) + const nWords = normalizeWords(from(words)).pipe(toArray()).toPromise(); + const tWords = normalizeWordsToTrie(from(words)) .then(node => Trie.iteratorTrieWords(node)) .then(seq => [...seq]); return Promise.all([nWords, tWords]) @@ -88,7 +89,7 @@ describe('Validate the wordListCompiler', function() { .then(() => fsp.readFile(destName, 'UTF-8')) .then(output => output.split('\n')) .then(words => { - return Trie.importTrieRx(Rx.Observable.from(words)).take(1).toPromise() + return Trie.importTrieRx(from(words)).pipe(take(1)).toPromise() .then(node => { expect([...Trie.iteratorTrieWords(node)].sort()).to.be.deep .equal(citiesResult.split('\n').filter(a => !!a).sort()); diff --git a/packages/cspell-tools/src/compiler/wordListCompiler.ts b/packages/cspell-tools/src/compiler/wordListCompiler.ts index e89a81fdb4c..146a7c21922 100644 --- a/packages/cspell-tools/src/compiler/wordListCompiler.ts +++ b/packages/cspell-tools/src/compiler/wordListCompiler.ts @@ -1,14 +1,13 @@ -import * as Rx from 'rxjs/Rx'; import * as fs from 'fs'; import * as XRegExp from 'xregexp'; import { genSequence, Sequence } from 'gensequence'; import * as Text from './text'; import { lineReaderRx } from './fileReader'; import { writeToFile, writeToFileRxP} from 'cspell-lib'; -import { Observable } from 'rxjs/Rx'; +import { Observable, zip, from } from 'rxjs'; +import { flatMap, reduce, map, bufferCount } from 'rxjs/operators'; import * as path from 'path'; import { mkdirp } from 'fs-extra'; -import { observableFromIterable } from 'rxjs-from-iterable'; import * as Trie from 'cspell-trie'; import * as HR from 'hunspell-reader'; @@ -17,7 +16,7 @@ const regExpSpaceOrDash = /(?:\s+)|(?:-+)/g; const regExpRepeatChars = /(.)\1{3,}/i; export function normalizeWords(lines: Observable) { - return lines.flatMap(line => lineToWords(line).toArray()); + return lines.pipe(flatMap(line => lineToWords(line).toArray())); } export function lineToWords(line: string): Sequence { @@ -46,9 +45,9 @@ function splitCamelCase(word: string): Sequence | string[] { return splitWords; } -export function compileSetOfWords(lines: Rx.Observable): Promise> { +export function compileSetOfWords(lines: Observable): Promise> { const set = normalizeWords(lines) - .reduce((s, w) => s.add(w), new Set()) + .pipe(reduce((s: Set, w: string) => s.add(w), new Set())) .toPromise(); return Promise.all([set]).then(a => a[0]); @@ -71,36 +70,38 @@ export function compileWordList(filename: string, destFilename: string): Promise } -export function normalizeWordsToTrie(words: Rx.Observable): Promise { +export function normalizeWordsToTrie(words: Observable): Promise { const result = normalizeWords(words) - .reduce((node, word) => Trie.insert(word, node), {} as Trie.TrieNode) + .pipe(reduce((node: Trie.TrieNode, word: string) => Trie.insert(word, node), {} as Trie.TrieNode)) .toPromise(); return result; } -export function compileWordListToTrieFile(words: Rx.Observable, destFilename: string): Promise { +export function compileWordListToTrieFile(words: Observable, destFilename: string): Promise { const destDir = path.dirname(destFilename); const dir = mkdirp(destDir); const root = normalizeWordsToTrie(words); - const data = Rx.Observable.zip(dir, root, (_: void, b: Trie.TrieNode) => b) - .map(node => Trie.serializeTrie(node, { base: 32, comment: 'Built by cspell-tools.' })) - .flatMap(seq => observableFromIterable(seq)); + const data = zip(dir, root, (_: void, b: Trie.TrieNode) => b).pipe( + map(node => Trie.serializeTrie(node, { base: 32, comment: 'Built by cspell-tools.' })), + flatMap(seq => from(seq)), + ); - return writeToFileRxP(destFilename, data.bufferCount(1024).map(a => a.join(''))); + return writeToFileRxP(destFilename, data.pipe(bufferCount(1024), map(a => a.join('')))); } const regHunspellFile = /\.(dic|aff)$/i; -function readHunspellFiles(filename: string): Rx.Observable { +function readHunspellFiles(filename: string): Observable { const dicFile = filename.replace(regHunspellFile, '.dic'); const affFile = filename.replace(regHunspellFile, '.aff'); const reader = HR.HunspellReader.createFromFiles(affFile, dicFile); - const r = Rx.Observable.fromPromise(reader) - .flatMap(reader => reader.readWordsRx()) - .map(aff => aff.word); + const r = from(reader).pipe( + flatMap(reader => reader.readWordsRx()), + map(aff => aff.word), + ); return r; }