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

feat: hook up ci to publish to npm #226

Merged
merged 40 commits into from
Jan 31, 2019
Merged

feat: hook up ci to publish to npm #226

merged 40 commits into from
Jan 31, 2019

Conversation

george-haddad
Copy link
Contributor

@george-haddad george-haddad commented Jan 28, 2019

This pull request will set up mercury for publishing to npm

Publishing manually

  1. cd to root directory of project
  2. run npm login
  3. run npm publish to publish package privately
  4. run npm publish --access public to publish the package publicly

The way it is setup is that Circle CI will listen for a git tag event that follows the naming convention of v0.0.0 and that will trigger an npm publish.

The current config is set to publish the package publicly, so merging the PR should be fine and not trigger a publish until a git tag is created.

package.json Outdated Show resolved Hide resolved
@george-haddad
Copy link
Contributor Author

What's bugging me about this test is that it should be doing everything at UTC timezone offset. Which for this date would be '2017-01-09T03:00:00.000Z' and not '2017-01-09T05:00:00.000Z' when using .toISOString() which by default it does not preserve the original timezone offset.

But if I preserve the timezone offset as an ISO string it will include +02:00 which is my timezone offset from UTC. Clearly this is not portable around so I had to change the test to just check the date without the time + zone offset.

https://github.com/postlight/mercury-parser/blob/ae81557b75a5f1c9cb2efd260be04ab4f49ee9d0/src/extractors/custom/www.fastcompany.com/index.test.js#L55-L63

I think we should create a task to re-code all the date_published tests to be in pure ISO8601 without any timezone offsets, that way it can work anywhere.

@george-haddad george-haddad changed the title chore: add missing fields to package.json feat: hook up ci to publish to npm Jan 30, 2019
@adampash
Copy link
Contributor

I think we should create a task to re-code all the date_published tests to be in pure ISO8601 without any timezone offsets, that way it can work anywhere.

@george-haddad I think that's completely sensible. Do you want to make an issue out of it?

"bundleDependencies": [
"jquery",
"moment-timezone"
],
Copy link
Contributor

Choose a reason for hiding this comment

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

I've not done this before, but wouldn't bundleDependencies include all of the browser dependencies below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I checked the node_modules directory of the package and it only included those 2 single packages. The test create-react-app won't start without them and this was the only way to get them bundled in the npm package.

It doesn't seem to impact the build, but technically it should be there
so for good measure, why not...
@george-haddad george-haddad merged commit 5c0325f into master Jan 31, 2019
@george-haddad george-haddad deleted the feat-deploy-to-npm branch January 31, 2019 07:33
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.

3 participants