-
Notifications
You must be signed in to change notification settings - Fork 86
#53 properly test next-on-netlify in onBuild #65
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
Conversation
7252626
to
4d765e5
Compare
4d765e5
to
7b17151
Compare
thought: we could maybe try to get a dist from /sample |
7c4be8c
to
dda8321
Compare
test/index.js
Outdated
@@ -32,12 +32,22 @@ const changeCwd = function (cwd) { | |||
return process.chdir.bind(process, originalCwd) | |||
} | |||
|
|||
// Move .next from sample project to current directory | |||
const moveNextDist = function () { | |||
// Use copySync because cpx doesn't copy hidden files |
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.
Do you mean dotfiles by "hidden files"?
If so, I believe cpx
does support it (see this issue). The problem might come from the globbing pattern instead. Most globbing libraries will ignore dotfiles with *
and **
unless some dotfile
option is passed. However, .*
will work (see this comment).
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.
oh huh i was going off this one but gotchu
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.
If that does not work, cpy
could also be used.
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.
ive tried several things to copy .next with cpx and none have worked for me, feel free to pull n try n prove me wrong !!!
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.
Did it work with cpy
instead?
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.
nope
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 following commit fixes it with cpy
: b099569
I haven't pushed it so you can review it first.
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.
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.
ahhhh i cherry-picked and your commit fails the tests. im gonna rebase it out for now; could you update your branch and make sure the tests pass there and PR it into this branch?
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.
8952673
to
37ec572
Compare
37ec572
to
e5b5980
Compare
re: the conversation around the |
5361528
to
89a8bad
Compare
89a8bad
to
9fff034
Compare
What you say makes sense. However, when it comes to having multiple
Separating which |
removing the package.json from the sample dir seems to interfere with testing the local plugin within the /sample project, which is and has been its primary purpose (see TESTING.md from original commit of the sample dir). we cant test with netlify cli without a package.json and the standard Next.js essentials. this is essential to plugin development and so unless you have a way to run |
25575cf
to
9fff034
Compare
separate issue: the plugin won't install as a local plugin with the tests, it seems. it complains about the jest keywords being undefined. unclear at this moment if this is just local plugin specific or an issue with installing the plugin in prod as well (that wouldn't make sense, though, since we have tests in |
Yes, that might be good (including build logs and steps to reproduce), thanks! |
c92daba
to
cb29ba6
Compare
i think this should be good now!!!!!!!!! @ehmicky |
@@ -0,0 +1,2 @@ | |||
const plugin = require('../../../..') | |||
module.exports = plugin |
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.
This file can be removed thanks to netlify.toml
using ../..
directly.
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.
🎉 🎉 🎉
(Note: one small comment about a file which can be removed)
Fixes #53