-
Notifications
You must be signed in to change notification settings - Fork 691
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 & Convert to TS #3459
Upgrade & Convert to TS #3459
Conversation
|
I am reduce the scope of this, by remove adding |
We had many templates that were in pretty old states for TypeScript. This goes through a majority of them and updates their TSConfigs to be inline with most up to date TS configurations and Wrangler. Additionally, many templates were written in TypeScript and had many errors in their tests and a few in their workers code (caused by updates to Wrangler & the ecosystem) converting them to TypeScript helps to fix them and helps future maintaining when updating or making changes to the templates.
…ate TSConfigs and replaced them with a standard one.
34ea3ed
to
ea2981e
Compare
"transform": { | ||
"^.+\\.(t|j)sx?$": "ts-jest" | ||
}, | ||
"testRegex": "/test/.*\\.test\\.js$", | ||
"testRegex": "/test/.*\\.(test|spec)\\.(ts|tsx|js)$", | ||
"testEnvironment": "miniflare", | ||
"testEnvironmentOptions": { | ||
"scriptPath": "./src/index.js", |
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.
Ill be converting these all to Vitest soon, don't worry too much about them it was just to get it working.
ea2981e
to
8f70cd3
Compare
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5270776696/npm-package-wrangler-3459 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/3459/npm-package-wrangler-3459 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5270776696/npm-package-wrangler-3459 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5270776696/npm-package-cloudflare-pages-shared-3459 Note that these links will no longer work once the GitHub Actions artifact expires. |
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.
Added comments on creating projects with templates. I have a PR in progress with similar instructions in each template's subdirectory.
Co-authored-by: Adam Murray <admah@users.noreply.github.com>
Co-authored-by: Adam Murray <admah@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## main #3459 +/- ##
=======================================
Coverage 75.17% 75.17%
=======================================
Files 183 183
Lines 11055 11055
Branches 2904 2904
=======================================
Hits 8311 8311
Misses 2744 2744 |
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.
LGTM - I didn't try any of the templates out for real though...
* Upgrade & Convert to TS We had many templates that were in pretty old states for TypeScript. This goes through a majority of them and updates their TSConfigs to be inline with most up to date TS configurations and Wrangler. Additionally, many templates were written in TypeScript and had many errors in their tests and a few in their workers code (caused by updates to Wrangler & the ecosystem) converting them to TypeScript helps to fix them and helps future maintaining when updating or making changes to the templates. * Upgraded all the templates packages Worker Types and removed boilerplate TSConfigs and replaced them with a standard one. --------- Co-authored-by: Adam Murray <admah@users.noreply.github.com>
We had many templates that were in pretty old states for TypeScript. This goes through a majority of them and updates their TSConfigs to be inline with most up to date TS configurations and Wrangler.
Additionally, many templates were written in TypeScript and had many errors in their tests and a few in their workers code (caused by updates to Wrangler & the ecosystem) converting them to TypeScript helps to fix them and helps future maintaining when updating or making changes to the templates.
Part of #3441
Reviewer is to perform the following, as applicable: