Skip to content

Feat/migrations typescript support#132

Merged
armaniferrante merged 7 commits into
otter-sec:masterfrom
Standaa:feat/migrations-typescript-support
Mar 31, 2021
Merged

Feat/migrations typescript support#132
armaniferrante merged 7 commits into
otter-sec:masterfrom
Standaa:feat/migrations-typescript-support

Conversation

@Standaa

@Standaa Standaa commented Mar 29, 2021

Copy link
Copy Markdown

Below code adds support for Ts migration files.
Things to know:
• The script will transpile the deploy.ts file using tsc to the migrations dir. The resulting deploy.js will be deleted upon successful script completion.

• There are some conflicts when using import * as anchor from "..." with a 3rd party lib. Hence the script sticking with commonjs require. Intellisense raises a missing @types/node.

• I added a different template in ts_deploy_script with an example ts async function although it was not absolutely necessary. I thought this template was bound to evolve in the future and that it provided clearer intent to readers.

@armaniferrante

armaniferrante commented Mar 30, 2021

Copy link
Copy Markdown
Contributor

The build is failing due to solana-labs/solana#16207. It also fails on master, so it's not caused by these changes.

@armaniferrante armaniferrante merged commit 7f2ef23 into otter-sec:master Mar 31, 2021
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
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