chore(deps): update dependency typescript to v7 - #3772
Conversation
✅ Deploy Preview for fakerjs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ea0629e to
364e625
Compare
|
Now there are some TS errors, will check them later claude wants to remove the faker/src/modules/helpers/index.ts Line 767 in 3565626 and faker/src/modules/helpers/index.ts Line 1077 in 3565626 so that e.g. this faker/test/modules/helpers.spec-d.ts Line 50 in fa19801 somehow this feels wrong to me |
da67031 to
8c03210
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #3772 +/- ##
=======================================
Coverage 98.88% 98.88%
=======================================
Files 886 886
Lines 3061 3061
Branches 556 556
=======================================
Hits 3027 3027
Misses 30 30
Partials 4 4
🚀 New features to boost your workflow:
|
|
Line 3 in 819105b enough for today |
278615b to
552cab3
Compare
|
maybe we should switch to playwright 👀 |
If I remember correctly - playwrite is owned by microslop. I know that is not a strong statement when I'm writing a comment in Github on my Windows machine using VSCode to maintain this project while chatting with Copilot, BUUUUUUUT it still an argument xD |
TBH, this is not "an argument" but reads more like personal preferences. I have some experience with Playwright and Cypress, and for me it felt like an X-Graph one day, where Cypress treated its community poorly and imposed some strange quirks, while Playwright feels more natural and native to the TypeScript ecosystem, especially with its async-await syntax. Also Playwright at least feels a bit faster, but I don't have benchmarks for that, so this might also just be personal preference. I will now go checkout if the webpack preprocessor is still necessary or if that was just something weird. |
1c7c38d to
f918042
Compare
Yes, indeed, I'm not 💯% sure what's going on, but the preprocessor is invoked and without it it does not work 😕 I could have a look later if switching to Playwright would result in any benefits as an experiment. The other thing in this PR is the removal of |
|
We used them to express the following: arrayElement(['foo','bar']): 'foo' | 'bar' For factory functions (maybe/multiple) this didnt really work like expected. faker/test/modules/helpers.spec-d.ts Lines 47 to 57 in ed36f5c |
Ah thanks for the context when I bring back the Details⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Tests 3 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
FAIL test/modules/helpers.spec-d.ts > helpers > maybe > generic single element
TypeCheckError: Type 'number | undefined' does not satisfy the constraint '"Expected number, Actual never" | "Expected undefined, Actual never"'.
Type 'undefined' is not assignable to type '"Expected number, Actual never" | "Expected undefined, Actual never"'.
❯ test/modules/helpers.spec-d.ts:50:42
48| it('generic single element', () => {
49| const actual = faker.helpers.maybe(() => 1);
50| expectTypeOf(actual).toEqualTypeOf<number | undefined>();
| ^
51| });
52|
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/3]⎯
FAIL test/modules/helpers.spec-d.ts > helpers > multiple > const generic single element
TypeCheckError: Type 'number[]' does not satisfy the constraint '"Expected number, Actual never"[]'.
Type 'number' is not assignable to type '"Expected number, Actual never"'.
❯ test/modules/helpers.spec-d.ts:123:42
121| it('const generic single element', () => {
122| const actual = faker.helpers.multiple(() => 1);
123| expectTypeOf(actual).toEqualTypeOf<number[]>();
| ^
124| });
125|
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/3]⎯
FAIL test/modules/helpers.spec-d.ts > helpers > multiple > const generic multiple elements
TypeCheckError: Type 'number[]' does not satisfy the constraint '"Expected number, Actual never"[]'.
Type 'number' is not assignable to type '"Expected number, Actual never"'.
❯ test/modules/helpers.spec-d.ts:128:42
126| it('const generic multiple elements', () => {
127| const actual = faker.helpers.multiple(() => 1, { count: 3 });
128| expectTypeOf(actual).toEqualTypeOf<number[]>();
| ^
129| });
130| });
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/3]⎯however, I think these |
The text doesnt mention that at all AFAICT.
Yes, they are. It being detected as never feels like a bug to me. Faker TS5/6 × Playground TS 5/6 If Faker TS5 in a TS6 playground causes the same issues as in the tests here then maybe we should consider splitting the const removal into a different fix PR for better visibility in the changelog. We should add a playground/test that explicitly tests TS5 downstream compatibility though (at least for some of the generic stuff). |
That's why I wrote "assume"
I think you are right with all of that |
|
Maybe we should delay this to v11 as a potentially "breaking change". |
f918042 to
196cb4b
Compare
196cb4b to
34986c7
Compare
34986c7 to
42ffbd6
Compare
b51ab48 to
dc898a2
Compare
121ce67 to
637a8ff
Compare
637a8ff to
eb72cba
Compare
This PR contains the following updates:
6.0.3→7.0.2Release Notes
microsoft/TypeScript (typescript)
v7.0.2Compare Source
Configuration
📅 Schedule: (UTC)
* 0-3 1 * *)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.