Skip to content

Upgrade to latest @figma/plugin-api via a series of other changes #66

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

applmak
Copy link
Contributor

@applmak applmak commented Jul 26, 2023

  • Upgrade to latest deps.
  • Remove rxjs
    See commit descriptions for details.

applmak added 4 commits July 26, 2023 11:03
- Fix error related to stricter types around Promise.
- Fix globalThis.parent no longer being set.
- This is the latest version of the npm (and the version we currently use in our monorepo).
- To do this, I needed to change the transformer from babel-js to default-esm.
- That change required using a formal import for the `jest` global in postmessage.test.ts.
- Also, 'constructor' is now returned from Object.getOwnPropertyNames, which seems to align with the es standard. This breaks the applyMixins module, so I rewrote that to use more modern JS syntax and exclude the 'constructor' key.
- Replace usage with EventTarget, which is certainly simpler than rxjs here.
- There is potentially a way to have a single global EventTarget for all event types, but this is not yet implemented in this PR.
- Required adding useless stubs for a few new APIs.
@applmak applmak changed the title Upgrade to latest jest & typescript Upgrade to latest @figma/plugin-api via a series of other changes Jul 26, 2023
@svallory

This comment was marked as off-topic.

@applmak
Copy link
Contributor Author

applmak commented Aug 15, 2023

No problem with me!

svallory added a commit to cva-design/figma-api-stub that referenced this pull request Aug 18, 2023
…inal PR: react-figma#66) (#1)

* Upgrade to latest jest & typescript
- Fix error related to stricter types around Promise.
- Fix globalThis.parent no longer being set.

* Upgrade nanoid to 4.x
- This is the latest version of the npm (and the version we currently use in our monorepo).
- To do this, I needed to change the transformer from babel-js to default-esm.
- That change required using a formal import for the `jest` global in postmessage.test.ts.
- Also, 'constructor' is now returned from Object.getOwnPropertyNames, which seems to align with the es standard. This breaks the applyMixins module, so I rewrote that to use more modern JS syntax and exclude the 'constructor' key.

* Remove use of rxjs
- Replace usage with EventTarget, which is certainly simpler than rxjs here.
- There is potentially a way to have a single global EventTarget for all event types, but this is not yet implemented in this PR.

* Upgrade to latest @figma/plugin-api:
- Required adding useless stubs for a few new APIs.

---------

Co-authored-by: Matt Handley <applmak@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants