-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bump typescript => 5.2.2; migrate to ESM #1979
Merged
Merged
Changes from 102 commits
Commits
Show all changes
103 commits
Select commit
Hold shift + click to select a range
31878b6
bump typescript => 5.2.2
pokey 729472d
Fixes to satisfy new typescript
pokey 8797571
more flailing
pokey 6317473
More bumps
pokey 8cfcaa7
Switch to moduleResolution bundler
pokey 5b106ce
Prettier cleanup
pokey 39da3e2
try adding type module to package json
pokey 2ffa7fa
tweak webpack
pokey bb8a2d7
more fix
pokey ce519ae
more flailing
pokey 6503a82
revert type module
pokey 7364473
fix meta-updater
pokey ef98d34
remove extraneous config
pokey 6a20279
cleanup
pokey c8b009a
whoops
pokey a458c7f
don't run on generated code
pokey fccda9a
Merge branch 'main' into pokey/bump-typescript-greater-522
pokey 57fed2f
Merge branch 'main' into pokey/bump-typescript-greater-522
pokey abe10d1
Revert to last passing commit 8797571
pokey 804a9b1
Attempt to simplify
pokey a69157f
Attempt to use bundler and esm again
pokey 8c7a5b4
Failed attempt to bundle extensionTests
pokey 424e0ce
Attempt to fix things
pokey d55da1d
Some progress
pokey c364c05
Passing tests locally
pokey 9402136
working my-ts-node without source maps
pokey 638dca4
generate tmp file instead of using process substitution
pokey b5d70f1
my-ts-node with working source maps
pokey f557ebe
Get all scripts working using my-ts-node
pokey 995fe9d
try to fix ci
pokey c3b554b
Start trying to get website to build
pokey 271462d
get web build working locally
pokey 214d4ea
Fix unit tests launch config
pokey efdb686
More launch config fixes
pokey 3a78e40
Merge branch 'main' into pokey/bump-typescript-greater-522
pokey 94bcc59
Reset .npmrc
pokey 5526545
Re-add sourcemaps to go with removing `noEmit`
pokey 9b5ec4d
Attempt to get docusaurus working
pokey 501eb3b
try ts docusaurus
pokey 4dc90a3
more tweaks
pokey 3060c80
Maybe working docs
pokey 85d1250
Attempt to fix docs build by bumping node version
pokey 1c9b46e
Downgrade node
pokey 8a20d66
More stuff
pokey f60e522
Basically working cheatsheet config
pokey 27a2d0f
Maybe working
pokey 193bcda
Fix watch
pokey 1d52287
Fix undefined in meta-updater
pokey 7f7b342
Fix local cheatsheet
pokey e859282
more esm
pokey 37c64c8
More tweaks
pokey 2cdaeee
More fix
pokey ced4b3d
Attempt to fix windows
pokey d614db2
tweak
pokey acc8287
Switch from cross-env to env
pokey 8e15054
Simplify
pokey 31213eb
Fix launch configs
pokey c8dc5df
Remove unnecessary esbuild deps
pokey 4e9b175
more cleanup
pokey 369f283
tweaks
pokey c3bc0c7
Be stricter
pokey 39662fd
Fix watch
pokey cd381e4
cleanup
pokey 9ca3737
cleanup
pokey 1dbdf3b
more cleanup
pokey df5e782
more cleanup
pokey fabfa0c
cleanup
pokey a072466
cleanup
pokey c752994
Add comment
pokey d8634cf
more cleanup
pokey 6d85bcd
Attempt to fix windows
pokey cd7b64c
Cleanup
pokey 2fd1eed
Try to fix windows again
pokey 2b2315a
fix script
pokey 0264723
Another attempt to fix windows
pokey 2191878
Revert "Another attempt to fix windows"
pokey 8af373f
Try switching my-ts-node to js
pokey b1edf25
improve error message
pokey 214213f
try fix
pokey 565298e
miore fix attempt
pokey 673e7cd
fix
pokey 602a89a
get some type checking
pokey ac91b87
More stuff
pokey 0564f48
remove esbuild
pokey 6e4950d
more debugging
pokey 8d1b773
again
pokey 9b71b10
one more time
pokey bf252c9
Cleanup
pokey 9ce24ad
comments
pokey e342216
inherit exit code
pokey df90915
Enable source maps
pokey 5b43466
more windows fix try
pokey f8bdae8
Revert "more windows fix try"
pokey 2f42a41
try bumping test-electron
pokey c52c2bc
Support absolute paths
AndreasArvidsson f3d78a6
Added CURSORLESS_REPO_ROOT env
AndreasArvidsson c49c289
Check for windows
AndreasArvidsson 6b86ab1
Rollback andreas commits
pokey d9452bf
use cross-spawn
pokey bf4fbfb
Set CURSORLESS_REPO_ROOT in my-ts-node
pokey b0192ac
fix meta-updater
pokey d947dad
add unicorn module eslint rule
pokey 5a0596b
Merge branch 'main' into pokey/bump-typescript-greater-522
pokey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
- uses: pnpm/action-setup@v2 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
node-version-file: package.json | ||
cache: pnpm | ||
- run: pnpm --color install | ||
- uses: pre-commit/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ | |
"args": [ | ||
"--profile=cursorlessDevelopment", | ||
"--extensionDevelopmentPath=${workspaceFolder}/packages/cursorless-vscode/dist", | ||
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/out/runners/extensionTests" | ||
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/dist/extensionTests.cjs" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These get bundled up now to ensure that all of our code is only ever read by a bundler. We need the .cjs extension because our package.json says that we're a module now. |
||
], | ||
"outFiles": ["${workspaceFolder}/**/out/**/*.js"], | ||
"preLaunchTask": "${defaultBuildTask}", | ||
|
@@ -55,7 +55,7 @@ | |
"args": [ | ||
"--profile=cursorlessDevelopment", | ||
"--extensionDevelopmentPath=${workspaceFolder}/packages/cursorless-vscode/dist", | ||
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/out/runners/extensionTests" | ||
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/dist/extensionTests.cjs" | ||
], | ||
"outFiles": ["${workspaceFolder}/**/out/**/*.js"], | ||
"preLaunchTask": "Prepare test subset", | ||
|
@@ -68,7 +68,7 @@ | |
"name": "Talon tests", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/packages/test-harness/out/scripts/runTalonTests", | ||
"program": "${workspaceFolder}/packages/test-harness/dist/runTalonTests.cjs", | ||
"env": { | ||
"CURSORLESS_TEST": "true", | ||
"CURSORLESS_REPO_ROOT": "${workspaceFolder}" | ||
|
@@ -84,7 +84,7 @@ | |
"name": "Talon tests subset", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/packages/test-harness/out/scripts/runTalonTests", | ||
"program": "${workspaceFolder}/packages/test-harness/dist/runTalonTests.cjs", | ||
"env": { | ||
"CURSORLESS_TEST": "true", | ||
"CURSORLESS_RUN_TEST_SUBSET": "true", | ||
|
@@ -101,7 +101,7 @@ | |
"name": "Unit tests only", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/packages/test-harness/out/scripts/runUnitTestsOnly", | ||
"program": "${workspaceFolder}/packages/test-harness/dist/runUnitTestsOnly.cjs", | ||
"env": { | ||
"CURSORLESS_TEST": "true", | ||
"CURSORLESS_REPO_ROOT": "${workspaceFolder}" | ||
|
@@ -125,7 +125,7 @@ | |
"args": [ | ||
"--profile=cursorlessDevelopment", | ||
"--extensionDevelopmentPath=${workspaceFolder}/packages/cursorless-vscode/dist", | ||
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/out/runners/extensionTests" | ||
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/dist/extensionTests.cjs" | ||
], | ||
"outFiles": ["${workspaceFolder}/**/out/**/*.js"], | ||
"preLaunchTask": "${defaultBuildTask}", | ||
|
@@ -147,7 +147,7 @@ | |
"args": [ | ||
"--profile=cursorlessDevelopment", | ||
"--extensionDevelopmentPath=${workspaceFolder}/packages/cursorless-vscode/dist", | ||
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/out/runners/extensionTests" | ||
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/dist/extensionTests.cjs" | ||
], | ||
"outFiles": ["${workspaceFolder}/**/out/**/*.js"], | ||
"preLaunchTask": "${defaultBuildTask}", | ||
|
@@ -160,7 +160,7 @@ | |
"name": "Update fixtures, unit tests only", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/packages/test-harness/out/scripts/runUnitTestsOnly", | ||
"program": "${workspaceFolder}/packages/test-harness/dist/runUnitTestsOnly.cjs", | ||
"env": { | ||
"CURSORLESS_TEST": "true", | ||
"CURSORLESS_TEST_UPDATE_FIXTURES": "true", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
"scripts": { | ||
"build": "pnpm -r build", | ||
"clean": "pnpm -r clean", | ||
"compile": "tsc --build", | ||
"compile": "tsc --build && pnpm -r --if-present compile:esbuild", | ||
"fix:eslint": "pnpm lint:ts --fix", | ||
"fix:meta": "pnpm run meta-updater:base && pnpm -r exec prettier --write tsconfig.json package.json", | ||
"fix:syncpack": "pnpm syncpack fix-mismatches", | ||
|
@@ -18,30 +18,33 @@ | |
"preinstall": "npx only-allow pnpm", | ||
"test-compile": "tsc --build", | ||
"test": "pnpm compile && pnpm lint && pnpm -F '!test-harness' test && pnpm -F test-harness test", | ||
"transform-recorded-tests": "tsx --conditions=cursorless:bundler packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts", | ||
"watch": "tsc --build --watch" | ||
"transform-recorded-tests": "./packages/common/scripts/my-ts-node.js packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts", | ||
"watch": "pnpm run -w --parallel '/^watch:.*/'", | ||
"watch:esbuild": "pnpm run -r --parallel --if-present watch:esbuild", | ||
"watch:tsc": "tsc --build --watch" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@pnpm/meta-updater": "1.0.0", | ||
"@types/node": "^16.11.3", | ||
"@types/node": "^18.18.2", | ||
"@typescript-eslint/eslint-plugin": "^6.9.0", | ||
"@typescript-eslint/parser": "^6.9.0", | ||
"eslint": "^8.38.0", | ||
"esbuild": "^0.17.11", | ||
"eslint": "^8.53.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-import-resolver-typescript": "3.5.5", | ||
"eslint-plugin-import": "2.28.1", | ||
"eslint-plugin-unicorn": "49.0.0", | ||
"eslint-plugin-unused-imports": "^3.0.0", | ||
"prettier": "3.0.3", | ||
"syncpack": "9.8.4", | ||
"tsx": "3.12.3", | ||
"typescript": "^5.1.6" | ||
"typescript": "^5.2.2" | ||
}, | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"@docusaurus/[email protected]-alpha.0": "patches/@[email protected]" | ||
"@docusaurus/[email protected]": "patches/@[email protected]" | ||
}, | ||
"peerDependencyRules": { | ||
"ignoreMissing": [ | ||
|
@@ -53,5 +56,9 @@ | |
} | ||
} | ||
}, | ||
"packageManager": "[email protected]" | ||
"engines": { | ||
"node": ">=18.18.2" | ||
}, | ||
"packageManager": "[email protected]", | ||
"type": "module" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way we have a single source of truth for our node version.