-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Allow configuration of allowed_extensions for the migrations (fixes #1361) #1380
Allow configuration of allowed_extensions for the migrations (fixes #1361) #1380
Conversation
roderik
commented
Oct 25, 2018
- I added a separate config function to truffle-config, same naming and signature scheme as the test regexp
- I added the new config regexp as second choice to truffle-migrate. While there are no usages of the option version, I did not wan to inadvertently break any code depending on this option.
- separate commits because my editor wanted to reformat every line of code, yay prettier :)
…on_regexp, still prefer the direct option for any potential unknown use
@roderik after fixing what I mentioned in my comments I'm still getting errors due to TypeScript syntax. Here one of my files:
I get the following error when migrating:
If I remove the
To solve this my file needs to look like:
Like an ES6 file... Do you know why the parser is not using TypeScript? Thanks, |
@sneko, you are probably missing the require("ts-node/register"); line mentioned in the setup at https://github.com/ethereum-ts/truffle-typechain-example. Thanks for catching the missing require, forgot to copy paste that line in the commit :) |
@roderik I’m actually requiring the tsnode/register... hmmm I don’t understand what could be the problem. I’m using Truffle 5 and my settings are stored in the « truffle-config.js ». I will try to figure out tomorrow morning what’s going on. (Including cloning and testing the example) |
@roderik the But if I add this line in the I get the same error than in my project:
😢 |
Thanks again for doing this @roderik. @sneko I did some playing around with replicating your error and I believe it is a configuration issue on the ts side (typechain, tsconfig, possibly truffle-typings). Since this is a simple enough feature addition, I think we're going to move ahead with supporting this after I add some tests to ensure coverage. |
@sneko did a little more replication using the truffle-typechain-example repo. I was able to get the example working using their current setup (package.json, tsconfig, etc). I was also able to get things working using Roderik's current workaround here. |
@CruzMolina yeah the workaround is working. But did you succeed in replicating the issue I get? Building Truffle with this pull request and injecting it inside the |
Ah, I see what you mean @sneko. After reviewing the codebase, it looks like |
So after diving into this, it looks like this change doesn't immediately further .ts integration or ethereum-ts support (although #1385 should help a teeny bit towards that end). However, it does make an aspect of |
+1 Looks good to me! |