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

FlightIcon pipeline - FigmaApi updates #2543

Merged
merged 7 commits into from
Nov 6, 2024
Merged

Conversation

didoo
Copy link
Contributor

@didoo didoo commented Nov 6, 2024

📌 Summary

Figma will soon retire the old OAuth endpoints for their Figma REST API (February 24, 2025).

This PR accounts for the changes to the underlying figma-api library (maintained by @didoo) and takes the opportunity to update also some related dependencies.

Notice:

  • while officially still in beta, the version 2.0 of the figma-api has been tested locally and it works as expected
  • in the process, I have tried to update also figma-export to the latest version, but the script compilation was throwing an error (related to require vs import) so I decided to skip this update.

🛠️ Detailed description

In this PR I have:

  • bumped typescript to 5.6.3 (latest) in both flight-icons and tokens pipelines (to keep them in sync)
  • bumped ts-node to 10.9.2 (latest) in flight-icons pipeline
  • bumped @types/node to 22.8.7 (latest) in both flight-icons and tokens pipelines (to keep them in sync)
  • bumped figma-api to 2.0.1-beta in flight-icons pipeline
  • updated the figma-api endpoint calls in our code to use the new format

🔗 External links

Jira ticket: https://hashicorp.atlassian.net/browse/HDS-4103


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

@didoo didoo requested review from alex-ju and a team November 6, 2024 12:28
Copy link

vercel bot commented Nov 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
hds-showcase ✅ Ready (Inspect) Visit Preview Nov 6, 2024 4:35pm
hds-website ✅ Ready (Inspect) Visit Preview Nov 6, 2024 4:35pm

Copy link
Member

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some issues in my testing.

tokens seems ok 👍

flight-icons not so much:

  • type checking fails (yarn run typecheck)
  • syncing (yarn run sync) fails with my local token (error below) resulting in removing all icons; this could be a 'me' issue
Removing "svg-original" output folder
Retrieving assets metadata via REST API
[AxiosError: Request failed with status code 403]

@didoo
Copy link
Contributor Author

didoo commented Nov 6, 2024

I found some issues in my testing.

  • type checking fails (yarn run typecheck)
  • syncing (yarn run sync) fails with my local token (error below) resulting in removing all icons; this could be a 'me' issue

@alex-ju I'll see what I can do (they were there also before this PR)
screenshot_4402

Removing "svg-original" output folder
Retrieving assets metadata via REST API
[AxiosError: Request failed with status code 403]

@alex-ju do you have a .env file in your local branch, with the personal token? (details here: https://github.com/hashicorp/design-system/blob/main/packages/flight-icons/CONTRIBUTING.md#figma-token)

@alex-ju
Copy link
Member

alex-ju commented Nov 6, 2024

I found some issues in my testing.

  • type checking fails (yarn run typecheck)
  • syncing (yarn run sync) fails with my local token (error below) resulting in removing all icons; this could be a 'me' issue

@alex-ju I'll see what I can do (they were there also before this PR) screenshot_4402

it works well for me in main 🤔

@alex-ju do you have a .env file in your local branch, with the personal token? (details here: https://github.com/hashicorp/design-system/blob/main/packages/flight-icons/CONTRIBUTING.md#figma-token)

yes, I have a local token setup, tested with it before, but maybe something changed in my permissions (my Figma account often gets downgraded to view only); if you tested sync and works well then I'm happy to approve

@didoo
Copy link
Contributor Author

didoo commented Nov 6, 2024

@alex-ju I'll see what I can do (they were there also before this PR) screenshot_4402
it works well for me in main 🤔

@alex-ju see fixes in 81551fe

yes, I have a local token setup, tested with it before, but maybe something changed in my permissions (my Figma account often gets downgraded to view only); if you tested sync and works well then I'm happy to approve

screenshot_4403 alternatively, we can run the associated GitHub Action using this branch, and see if it opens a PR (and then close it)

@didoo
Copy link
Contributor Author

didoo commented Nov 6, 2024

Currently investigating why the GH action failed (as in @alex-ju local env) but it works in my local environment 🤔

@didoo
Copy link
Contributor Author

didoo commented Nov 6, 2024

OK, mystery solved. All good, we can merge.

@didoo didoo merged commit 711c022 into main Nov 6, 2024
15 of 16 checks passed
@didoo didoo deleted the pipelines-figma-api-updates branch November 6, 2024 17:13
dchyun pushed a commit that referenced this pull request Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants