Skip to content
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

upgrade plugin-typescript to TypeScript 5.x #1136

Closed
Tracked by #1120
thescientist13 opened this issue Aug 6, 2023 · 0 comments · Fixed by #1164 or #1120
Closed
Tracked by #1120

upgrade plugin-typescript to TypeScript 5.x #1136

thescientist13 opened this issue Aug 6, 2023 · 0 comments · Fixed by #1164 or #1120
Assignees
Labels
alpha.5 breaking chore unit testing, maintenance, etc feature New feature or request Plugins Greenwood Plugins v0.29.0
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Aug 6, 2023

Type of Change

Feature

Summary

Coming out of #1128 , pulling in the Netlify CLI brings in the latest version of TypeScript which causes a couple issues

LS Lint fails
https://github.com/ProjectEvergreen/greenwood/actions/runs/5773816186/job/15650163532

Run yarn lint
yarn run v1.22.19
$ ls-lint && yarn lint:js && yarn lint:ts && yarn lint:css
2023/08/0[6](https://github.com/ProjectEvergreen/greenwood/actions/runs/5773816186/job/15650163532#step:6:7) 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/cancellationToken.js failed for rules: lowercase
2023/08/06 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/cs/diagnosticMessages.generated.json failed for rules: lowercase
2023/0[8](https://github.com/ProjectEvergreen/greenwood/actions/runs/5773816186/job/15650163532#step:6:9)/06 01:1[9](https://github.com/ProjectEvergreen/greenwood/actions/runs/5773816186/job/15650163532#step:6:10):08 ./packages/plugin-typescript/node_modules/typescript/lib/de/diagnosticMessages.generated.json failed for rules: lowercase
2023/08/06 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/es/diagnosticMessages.generated.json failed for rules: lowercase
2023/08/06 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/fr/diagnosticMessages.generated.json failed for rules: lowercase
2023/08/06 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/it/diagnosticMessages.generated.json failed for rules: lowercase
2023/08/06 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/ja/diagnosticMessages.generated.json failed for rules: lowercase
2023/08/06 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/ko/diagnosticMessages.generated.json failed for rules: lowercase
2023/08/06 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/pl/diagnosticMessages.generated.json failed for rules: lowercase
2023/08/06 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json failed for rules: lowercase
2023/08/06 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/ru/diagnosticMessages.generated.json failed for rules: lowercase
2023/08/06 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/tr/diagnosticMessages.generated.json failed for rules: lowercase
2023/08/06 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/typesMap.json failed for rules: lowercase
2023/08/06 01:[19](https://github.com/ProjectEvergreen/greenwood/actions/runs/5773816186/job/15650163532#step:6:20):08 ./packages/plugin-typescript/node_modules/typescript/lib/typescriptServices.js failed for rules: lowercase
[20](https://github.com/ProjectEvergreen/greenwood/actions/runs/5773816186/job/15650163532#step:6:21)23/08/06 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/typingsInstaller.js failed for rules: lowercase
2023/08/06 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/watchGuard.js failed for rules: lowercase
2023/08/06 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json failed for rules: lowercase
20[23](https://github.com/ProjectEvergreen/greenwood/actions/runs/5773816186/job/15650163532#step:6:24)/08/06 01:19:08 ./packages/plugin-typescript/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json failed for rules: lowercase
error Command failed with exit code 1.

ESLint fails

% yarn lint
yarn run v1.22.5
$ yarn lint:js && yarn lint:ts && yarn lint:css
$ eslint "*.{js,md}" "./packages/**/**/*.{js,md}" "./test/*.js" "./www/**/**/*.{js,md}"
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <4.4.0

YOUR TYPESCRIPT VERSION: 5.1.6

Please only submit bug reports when using the officially supported version.

=============
DeprecationWarning: 'originalKeywordKind' has been deprecated since v5.0.0 and will no longer be usable after v5.2.0. Use 'identifierToKeywordKind(identifier)' instead.

...

/Users/owenbuckley/Workspace/project-evergreen/repos/greenwood/packages/plugin-typescript/test/cases/options.extend-config/src/scripts/main.ts
  1:33  error  'customElement' is defined but never used      no-unused-vars
  1:48  error  'property' is defined but never used           no-unused-vars
  4:14  error  'GreetingComponent' is defined but never used  no-unused-vars


Wonder if there are any other features we should update for here? Probably test out ESM .ts files extension support too?

Details

Looks like we need to get everything on the same page

% yarn why typescript
yarn why v1.22.5
[1/4] 🤔  Why do we have the module "typescript"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "typescript@5.1.6"
info Has been hoisted to "typescript"
info Reasons this module exists
   - "workspace-aggregator-dcdcae02-b603-4cf8-8d36-a6868d0598fb" depends on it
   - Hoisted from "_project_#@greenwood#plugin-adapter-netlify#netlify-cli#@netlify#build#typescript"
   - Hoisted from "_project_#@greenwood#plugin-adapter-netlify#netlify-cli#@netlify#zip-it-and-ship-it#precinct#detective-typescript#typescript"
info Disk size without dependencies: "38.55MB"
info Disk size with unique dependencies: "38.55MB"
info Disk size with transitive dependencies: "38.55MB"
info Number of shared dependencies: 0
=> Found "@greenwood/plugin-typescript#typescript@4.3.5"
info This module exists because "_project_#@greenwood#plugin-typescript" depends on it.
info Disk size without dependencies: "58.62MB"
info Disk size with unique dependencies: "58.62MB"
info Disk size with transitive dependencies: "58.62MB"
info Number of shared dependencies: 0
✨  Done in 1.24s.

So basically it looks like we should

  1. Upgrade TypeScript plugin to 5.x
  2. Upgrade TypeScript ESLint
  3. Upgrade LS Lint for glob ignore support
@thescientist13 thescientist13 added chore unit testing, maintenance, etc Plugins Greenwood Plugins alpha.2 feature New feature or request v0.29.0 labels Aug 6, 2023
@thescientist13 thescientist13 added this to the 1.0 milestone Aug 6, 2023
@thescientist13 thescientist13 self-assigned this Aug 6, 2023
@thescientist13 thescientist13 changed the title upgrade to Typescript 5.x upgrade to TypeScript 5.x Aug 6, 2023
@thescientist13 thescientist13 changed the title upgrade to TypeScript 5.x upgrade plugin-typescript to TypeScript 5.x Oct 10, 2023
@thescientist13 thescientist13 moved this from 🏗 In progress to 👀 In review in [Greenwood] Phase 9 - Standards and Conventions Oct 10, 2023
@thescientist13 thescientist13 linked a pull request Oct 14, 2023 that will close this issue
25 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha.5 breaking chore unit testing, maintenance, etc feature New feature or request Plugins Greenwood Plugins v0.29.0
Projects
No open projects
1 participant