Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: test code must run in older node.js
We must disable eslint rules that require new javascript features in test files, because test files are not currently compiled by `tsc`. TODO: doesn't look like babel is configured to run on the "neovim" package. I tried this: M packages/neovim/package.json @@ -72,7 +72,7 @@ "test-staged": "npm test --bail --no-cache --findRelatedTests", "test-missing-apis": "npm run build && node scripts/findMissingApi", "precommit": "lint-staged", - "build": "tsc --pretty", + "build": "tsc --pretty && babel lib --out-dir lib", "dev": "npm run build --watch true" }, "jest": { M packages/neovim/src/utils/getNvimFromEnv.ts @@ -149,6 +149,8 @@ export function getNvimFromEnv( const paths = process.env.PATH.split(delimiter); const pathLength = paths.length; const matches = new Array<NvimVersion>(); + const foo = matches.at(-1); + console.log(foo); // test const unmatchedVersions = new Array<NvimVersion>(); const errors = new Array<GetNvimFromEnvError>(); for (let i = 0; i !== pathLength; i = i + 1) { Babel didn't translate the file to the desired node.js 8 compatible syntax (it should replace `matches.at()` with `matches[…]`).
- Loading branch information