-
Notifications
You must be signed in to change notification settings - Fork 30
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
Reduce mode #221
Reduce mode #221
Conversation
bb7f2aa
to
9f219d9
Compare
👋 @tapasweni-pathak, it seems like some of the updates to the jest dependencies are malfunctioning. To fix:
I have tested that this works ^, and is the root cause. Let me know if it works for you! 🙂 |
9f219d9
to
b2f0938
Compare
👋@arunasank I have to delete package-lock.json and re run npm ci once as I added a package, can't keep the master one. Plus as I wrote I delete the directory, reclone and install and run update-jest-snapshots it still doesn't work. |
The reason the jest portion is not working is because when you're deleting the package-lock.json and running
While this will fix the issue of updating the snapshots, tests will still fail on Travis, because of the updated |
b2f0938
to
759b349
Compare
@arunasank We can voice on it, this is weird,
This is when I need to update package-lock.json. I used the updated package-lock.json and it passed. I plan to ticket in jest, just curious what exactly is happening. I have had this with jest before as well. I agree on dependencies updating, thanks for finding the time to write the notes. |
👍 Glad it's fixed! |
.eslintrc
Outdated
@@ -6,7 +6,7 @@ | |||
"jest": true | |||
}, | |||
"parserOptions": { | |||
"ecmaVersion": "2017" | |||
"ecmaVersion": 8 |
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.
Why the switch to ecmaVersion 8 here?
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.
I think ecmaVersion released in 2017 is 8th edition, so can be written as 2017 or 8.
lib/template.js
Outdated
notificationTopic: cf.ref(prefixed('NotificationTopic')) | ||
}; | ||
|
||
const reduce = (prefixed, Resources, options, ref) => { |
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.
What is your goal with making this section a function, rather than putting this code inside the if
statement on line 237?
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.
Can change it to be inside the if
statement on line 237, added it to be consistent with the other methods defined in the template like mount
e.t.c.
ecd4637
to
5f3f0f4
Compare
bin/watchbot-log.js
Outdated
/** | ||
* watchbot-log "something that you want logged" | ||
* - or - | ||
* echo "somehing that you want logged" | watchbot-log |
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.
We've removed watchbot-log from watchbot 4. Could you delete this file?
lib/template.js
Outdated
@@ -145,6 +155,39 @@ module.exports = (options = {}) => { | |||
); | |||
}; | |||
|
|||
const reduce = (prefixed, Resources, options, ref) => { |
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.
I still think the fact that this function is only used once and modifies Resources
, options
and ref
, we shouldn't have the code live in a function, but instead have it live inside of the if
statement at line 227. If we do want to keep it as a function, we should have that function live right next to the if statement at line 227 so we can easily reference the function code.
74644d7
to
36692a5
Compare
d80b833
to
7dd0e45
Compare
CannotLoadTemplateError: Failed to parse CloudFormation template. ReferenceError: ref is not defined
This looks good! |
Branch for #212 as
git rebase master
is....Updates in the linked PR.
cc @mapbox/platform-engine-room.
For some reason jest is not passing, I deleted the repo, cloned it and then again run
npn run update-jest-snapshots
, doesn't work. Tried with deleted package-lock.json andrm -rf node_modules/
and then againnpm ci
, this has worked before.