Skip to content
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

Replace hash-obj w object-hash #85

Merged
merged 10 commits into from
Jul 30, 2019
Merged

Replace hash-obj w object-hash #85

merged 10 commits into from
Jul 30, 2019

Conversation

landonreed
Copy link
Member

@landonreed landonreed commented Jul 23, 2019

Fix #84 by replacing hash-obj with object-hash (which is transpiled).

This also updates the example app and makes it IE compatible, which now makes it useful for quickly deploying to test whether the library itself is transpiled/polyfilled correctly (deployed at https://trimet-mod-staging.ibi-transit.com right now), rather than having to bundle through the TriMet app.

Note: this is also waiting on changes from conveyal/mastarm#273 conveyal/mastarm#277

package.json Outdated
"cover": "mastarm test --coverage",
"jest": "mastarm test",
"lint": "mastarm lint lib --quiet",
"lint-docs": "documentation lint lib/**/*.js",
"prepublish": "mastarm prepublish --config configurations/prepublish",
"prestart": "yarn",
"test": "yarn run lint && yarn run lint-docs && yarn run jest",
"start": "mastarm build --serve example.js"
"start": "mastarm build --serve example.js",
"zip": "zip -r dist.zip index.html example.css dist"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure the zip command won't work on windows. What is the purpose of this script?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this. I just wanted to preserve how to deploy the example. Thoughts on an alternative approach?

Copy link
Contributor

@evansiroky evansiroky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awaiting feedback on #85 (comment).

@evansiroky evansiroky assigned landonreed and unassigned evansiroky Jul 23, 2019
@landonreed landonreed assigned evansiroky and unassigned landonreed Jul 24, 2019
Copy link
Contributor

@evansiroky evansiroky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving now that zip package.json script is removed.

.gitignore Outdated
@@ -14,6 +14,7 @@ coverage

# built example app
dist
dist.zip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can probably be removed too.

@codecov-io
Copy link

codecov-io commented Jul 29, 2019

Codecov Report

Merging #85 into dev will decrease coverage by <.01%.
The diff coverage is 25%.

Impacted file tree graph

@@           Coverage Diff            @@
##             dev     #85      +/-   ##
========================================
- Coverage   6.37%   6.36%   -0.01%     
========================================
  Files        134     134              
  Lines       5996    5997       +1     
  Branches    1750    1750              
========================================
  Hits         382     382              
- Misses      4746    4747       +1     
  Partials     868     868
Impacted Files Coverage Δ
lib/reducers/create-otp-reducer.js 0% <0%> (ø) ⬆️
lib/actions/api.js 42.1% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 77952d7...a7d0801. Read the comment docs.

@evansiroky
Copy link
Contributor

These changes now make otp-rr work on IE 11. This PR is dependent on conveyal/mastarm#279 and references a commit in mastarm in order for things to work temporarily. Unfortunately, this solution requires the import of es6-math in the root js file to polyfill the needed math functions.

@evansiroky evansiroky assigned landonreed and unassigned evansiroky Jul 30, 2019
@evansiroky
Copy link
Contributor

Assigning back to you, @landonreed. Let me know if you think this'll work for now.

@landonreed
Copy link
Member Author

What about building the library dist for publication on npm? Does that contain the math polyfill or would we also need to import es6-math into trimet-mod-otp?

@landonreed landonreed assigned evansiroky and unassigned landonreed Jul 30, 2019
@evansiroky
Copy link
Contributor

We'd also need to add es6-math into trimet-mod-otp. The import order of things would matter, so it's best to require the polyfill from the root file.

@landonreed
Copy link
Member Author

Gotcha. Ideally mastarm would just work out of the box, but for now this should be good enough. Let's just keep a ticket open in mastarm referencing this solution until we come up with something better.

@landonreed landonreed merged commit 8a21a8e into dev Jul 30, 2019
@landonreed landonreed deleted the fix-IE-compatibility branch July 30, 2019 19:32
@landonreed landonreed mentioned this pull request Jul 30, 2019
@evansiroky
Copy link
Contributor

🎉 This PR is included in version 0.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hash-obj is not compatible with IE 11
3 participants