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

migrate schemas API to an npm package #4149

Merged
merged 7 commits into from Apr 12, 2018
Merged

migrate schemas API to an npm package #4149

merged 7 commits into from Apr 12, 2018

Conversation

jshimko
Copy link
Contributor

@jshimko jshimko commented Apr 4, 2018

Impact: minor
Type: refactor

Issue

We're currently working on migrating as many plugins/API's to npm as possible.

Solution

Move entire Schemas API to an npm package and update imports to use it.

Breaking changes

None expected.

Testing

Start Reaction and note that everything still works.

Available imports...

import Schemas { Validation } from "@reactioncommerce/schemas";

// formerly...
// import { getSchemas, Validation } from "@reactioncommerce/reaction-collections";

Also note that there's nothing Reaction-specific about the new package, so you could literally use it in any Node/javascript app.

@jshimko jshimko requested a review from spencern April 4, 2018 21:06
* release-1.11.0: (102 commits)
  chore: fix dependency issue
  chore(CircleCI): refresh node_modules cache on package-lock changes
  feat(Security): update some packages to get security fixes
  feat(Security): update some packages to get security fixes
  fix(GraphQL): currency type improvements
  fix: keep setProfileCurrency method args backwards compatible
  tests(GraphQL): finish remaining tags tests
  fix(GraphQL): handle both cursor types
  tests(GraphQL): add tests for tags queries
  fix(GraphQL): no auth necessary for tags query
  feat(GraphQL): initial tags resolvers
  feat(GraphQL): initial Tag schema
  (fix) Remove _sleepForMs from tests
  docs(GraphQL): add some missing schema docs
  chore: ignore snyk warnings with no fix
  chore: update changelog for v1.11
  chore: update package-lock.json
  feat: non-meteor version of hasPermission
  feat: created a networks config in docker-compose, added new networks to the devserver and reaction services
  Bug Fix: s/`in`/`.indexOf`
  ...

# Conflicts:
#	package-lock.json
@aldeed aldeed requested review from aldeed and removed request for spencern April 10, 2018 22:08
aldeed
aldeed previously requested changes Apr 11, 2018
Copy link
Contributor

@aldeed aldeed left a comment

Choose a reason for hiding this comment

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

@jshimko There are three shopify files that have this line in them:

import { registerSchema } from "/imports/plugins/core/collections";

Those should be changed to import from the package.

Also you should delete the plugins/core/collections folder, or change it to have just the index.js and re-export the package imports.

* release-1.11.0:
  refactor(GraphQL): move Group resolvers to account section
  tests(GraphQL): fix tests
  refactor(GraphQL): transform types using resolvers
  update Hooks imports
  migrate Hooks API to an npm package

# Conflicts:
#	package.json
* release-1.11.0:
  chore: resolve snyk warnings
  chore: fix Dockerfile lint
  chore: always npm install before starting docker services
  refactor(GraphQL): switch to .graphql files for schema
  package lock update
  update snyk for node-loggly-bulk
  fix failing test in graphql package
  update Logger package name
  restore Logger for jest test
  extract Logger API into new npm package
@jshimko jshimko dismissed aldeed’s stale review April 12, 2018 16:05

All requested changes made

@jshimko
Copy link
Contributor Author

jshimko commented Apr 12, 2018

@aldeed Requested changes have been made. Let me know if you see anything else. Thanks!

@aldeed aldeed merged commit 40f9313 into release-1.11.0 Apr 12, 2018
@aldeed aldeed deleted the schemas-to-npm branch April 12, 2018 16:51
@spencern spencern mentioned this pull request Apr 19, 2018
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.

None yet

2 participants