Skip to content

Commit

Permalink
bump typescript => 5.2.2 (#1979)
Browse files Browse the repository at this point in the history
## Checklist

- [-] I have added
[tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
- [-] I have updated the
[docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and
[cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet)
- [x] I have not broken the cheatsheet
- [x] Check source maps are working for extension
- [x] Check source maps are working in test files
- [x] Don't depend on esbuild in all packages?
- [x] Try running vsix from CI locally
- [-] Use two .. for update recorded tests script

---------

Co-authored-by: Andreas Arvidsson <[email protected]>
  • Loading branch information
pokey and AndreasArvidsson authored Nov 13, 2023
1 parent d981813 commit 7efcbfd
Show file tree
Hide file tree
Showing 64 changed files with 3,529 additions and 2,886 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "unused-imports", "import"],
"plugins": ["@typescript-eslint", "unused-imports", "import", "unicorn"],
"rules": {
"import/no-relative-packages": "error",
"@typescript-eslint/consistent-type-assertions": [
Expand Down Expand Up @@ -52,7 +52,8 @@
"MemberExpression[object.property.name='constructor'][property.name='name']"
],
"no-throw-literal": "warn",
"semi": "off"
"semi": "off",
"unicorn/prefer-module": "error"
},
"overrides": [
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,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
- run: pnpm --color compile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version: 16
node-version-file: package.json
cache: pnpm
- run: bash -x scripts/build-and-assemble-website.sh
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version: 16
node-version-file: package.json
cache: pnpm
- run: mkdir -p "${{ env.VSCODE_CRASH_DIR }}" "${{ env.VSCODE_LOGS_DIR }}"
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ repos:
name: format-recorded-tests
files: ^packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/.*/[^/]*\.yml$
language: system
entry: pnpm exec tsx --conditions=cursorless:bundler packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts
entry: pnpm exec ./packages/common/scripts/my-ts-node.js packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts
- repo: local
hooks:
- id: check-recorded-test-marks
name: check-recorded-test-marks
files: ^packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/.*/[^/]*\.yml$
language: system
entry: pnpm exec tsx --conditions=cursorless:bundler packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts --check-marks
entry: pnpm exec ./packages/common/scripts/my-ts-node.js packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts --check-marks
- repo: https://github.com/ikamensh/flynt/
rev: "0.78"
hooks:
Expand Down
16 changes: 8 additions & 8 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
"outFiles": ["${workspaceFolder}/**/out/**/*.js"],
"preLaunchTask": "${defaultBuildTask}",
Expand All @@ -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",
Expand All @@ -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}"
Expand All @@ -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",
Expand All @@ -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}"
Expand All @@ -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}",
Expand All @@ -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}",
Expand All @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@
],
"files.eol": "\n",
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"eslint.workingDirectories": [{ "pattern": "packages/*/" }]
}
41 changes: 36 additions & 5 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
"tasks": [
{
"label": "Build",
"dependsOn": ["Populate dist", "ESBuild", "TSBuild"],
"dependsOn": [
"Populate dist",
"ESBuild",
"TSBuild",
"Build test harness"
],
"group": {
"kind": "build",
"isDefault": true
Expand All @@ -22,7 +27,17 @@
"script": "esbuild",
"path": "packages/cursorless-vscode",
"presentation": {
"reveal": "never"
"reveal": "silent"
},
"group": "build"
},
{
"label": "Build test harness",
"type": "npm",
"script": "build",
"path": "packages/test-harness",
"presentation": {
"reveal": "silent"
},
"group": "build"
},
Expand All @@ -32,7 +47,7 @@
"script": "compile",
"problemMatcher": "$tsc",
"presentation": {
"reveal": "never"
"reveal": "silent"
},
"group": "build"
},
Expand All @@ -42,7 +57,7 @@
"script": "populate-dist",
"path": "packages/cursorless-vscode",
"presentation": {
"reveal": "never"
"reveal": "silent"
},
"group": "build"
},
Expand Down Expand Up @@ -73,9 +88,25 @@
"dependsOrder": "sequence",
"group": "test"
},
{
"label": "watch",
"dependsOn": ["Watch esbuild", "Watch typescript"],
"group": "build"
},
{
"type": "npm",
"script": "watch:esbuild",
"label": "Watch esbuild",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": "build"
},
{
"type": "npm",
"script": "watch",
"script": "watch:tsc",
"label": "Watch typescript",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
Expand Down
8 changes: 4 additions & 4 deletions docs/user/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

Clone repo into `~/.talon/user`

```insert code:
```bash
cd ~/.talon/user
git clone https://github.com/cursorless-dev/cursorless-talon.git cursorless-talon
```
Expand All @@ -24,7 +24,7 @@ Alternatively, access the directory by right clicking the Talon icon in taskbar,

The folder structure should look something like the below:

```insert code:
```
~/.talon/user/community
~/.talon/user/community/apps
~/.talon/user/community/code
Expand All @@ -40,7 +40,7 @@ Now, restart Talon.

Clone repo into `%AppData%\Talon\user`

```insert code:
```bash
cd %AppData%\Talon\user
git clone https://github.com/cursorless-dev/cursorless-talon.git cursorless-talon
```
Expand All @@ -49,7 +49,7 @@ Alternatively, access the directory by right clicking the Talon icon in taskbar,

The folder structure should look something like the below:

```insert code:
```
%AppData%\Talon\user\community
%AppData%\Talon\user\community\apps
%AppData%\Talon\user\community\code
Expand Down
25 changes: 16 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": [
Expand All @@ -53,5 +56,9 @@
}
}
},
"packageManager": "[email protected]"
"engines": {
"node": ">=18.18.2"
},
"packageManager": "[email protected]",
"type": "module"
}
21 changes: 14 additions & 7 deletions packages/cheatsheet-local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"scripts": {
"compile": "tsc --build",
"watch": "tsc --build --watch",
"webpack": "pnpm compile && webpack --config ./src/webpack.config.ts",
"webpack": "pnpm -w compile && env NODE_OPTIONS=--loader=ts-node/esm webpack --config ./src/webpack.config.ts",
"build": "pnpm build:prod",
"build:dev": "pnpm webpack --mode=development",
"build:prod": "pnpm webpack --mode=production --node-env=production",
"clean": "rm -rf ./out tsconfig.tsbuildinfo"
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build"
},
"keywords": [],
"author": "",
Expand All @@ -32,7 +32,7 @@
"@effortlessmotion/html-webpack-inline-source-plugin": "1.0.3",
"@testing-library/react": "14.0.0",
"@types/jest": "29.4.0",
"@types/node": "^16.11.3",
"@types/node": "^18.18.2",
"@types/react": "18.0.28",
"@types/react-dom": "18.0.11",
"@types/webpack": "5.28.0",
Expand All @@ -44,12 +44,19 @@
"postcss": "8.4.31",
"postcss-loader": "7.0.2",
"style-loader": "3.3.1",
"tailwindcss": "3.2.7",
"tailwindcss": "3.3.5",
"ts-loader": "9.4.2",
"ts-node": "10.9.1",
"typescript": "^5.1.6",
"webpack": "5.88.2",
"typescript": "^5.2.2",
"webpack": "5.89.0",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.11.1"
}
},
"postcss": {
"plugins": {
"tailwindcss": {},
"autoprefixer": {}
}
},
"type": "module"
}
3 changes: 0 additions & 3 deletions packages/cheatsheet-local/postcss.config.js

This file was deleted.

8 changes: 7 additions & 1 deletion packages/cheatsheet-local/src/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ const config: Configuration = {
test: /\.(ts|tsx)$/i,
loader: "ts-loader",
exclude: ["/node_modules/"],
options: {
compilerOptions: {
noEmit: false,
emitDeclarationOnly: false,
},
},
},
{
test: /\.css$/i,
Expand All @@ -54,4 +60,4 @@ const config: Configuration = {
},
};

module.exports = () => config;
export default () => config;
Loading

0 comments on commit 7efcbfd

Please sign in to comment.