-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore(release): bump 4.1.1 — fix root exports, fallback handling, and release docs #26
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -495,4 +495,33 @@ describe('useVariables', () => { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| spy.mockRestore() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| it('should use live key when fallbackFile exists but parsedFallbackFile is invalid', () => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const spy = vi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .spyOn(useFigmaTokenContextModule, 'useFigmaTokenContext') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .mockReturnValue({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| token: 'test-token', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fileKey: 'test-key', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fallbackFile: '{invalid-json}', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| parsedFallbackFile: undefined, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| providerId: 'test-provider', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } as ReturnType<typeof useFigmaTokenContextModule.useFigmaTokenContext>) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mockedUseSWR.mockReturnValue({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data: undefined, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| error: undefined, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isLoading: false, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isValidating: false, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| renderHook(() => useVariables()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| expect(mockedUseSWR).toHaveBeenCalledWith( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ['https://api.figma.com/v1/files/test-key/variables/local', 'test-token'], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| expect.any(Function), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| undefined | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| spy.mockRestore() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+498
to
+526
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| it('should use live key when fallbackFile exists but parsedFallbackFile is invalid', () => { | |
| const spy = vi | |
| .spyOn(useFigmaTokenContextModule, 'useFigmaTokenContext') | |
| .mockReturnValue({ | |
| token: 'test-token', | |
| fileKey: 'test-key', | |
| fallbackFile: '{invalid-json}', | |
| parsedFallbackFile: undefined, | |
| providerId: 'test-provider', | |
| } as ReturnType<typeof useFigmaTokenContextModule.useFigmaTokenContext>) | |
| mockedUseSWR.mockReturnValue({ | |
| data: undefined, | |
| error: undefined, | |
| isLoading: false, | |
| isValidating: false, | |
| }) | |
| renderHook(() => useVariables()) | |
| expect(mockedUseSWR).toHaveBeenCalledWith( | |
| ['https://api.figma.com/v1/files/test-key/variables/local', 'test-token'], | |
| expect.any(Function), | |
| undefined | |
| ) | |
| spy.mockRestore() | |
| }) |
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.
The README shows instructions for backfilling tags for v4.1.0, but there is no 4.1.0 release documented in the CHANGELOG. The version jumps directly from 4.0.0 to 4.1.1. If v4.1.0 was actually released but not documented, the CHANGELOG should be updated to include it. If v4.1.0 was never released, the README examples should use v4.1.1 instead of v4.1.0 to avoid confusion.
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.
@copilot open a new pull request to apply changes based on this feedback