Skip to content

Commit

Permalink
Updating back from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdarrylnorris committed Jan 8, 2019
1 parent fdd6f3d commit 5c761a3
Show file tree
Hide file tree
Showing 90 changed files with 34,850 additions and 10,673 deletions.
2 changes: 2 additions & 0 deletions .github/probots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
enabled:
- cla
34 changes: 31 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,36 @@
# Changelog

### v2.0.0 (January 3, 2019)
- Fetch `collections`, `products`, `collectionByHandle` and `productByHandle` from the QueryRoot instead of from the Shop object.
- Return `checkoutUserErrors` instead of `userErrors` when present. This will add an extra field called code.
- Expose `checkoutLineItemsReplace` mutation (to replace deprecated `checkoutLineItemsAdd`, `checkoutLineItemsRemove`, and `checkoutLineItemsUpdate` mutations).
- Remove unused fixtures

### v1.11.0 (November 27, 2018)
- Added availableForSale field to Product query fragment
- Removed tags field from Product query fragment
- Add field aliasing to deprecated fields in affected query fragments:
- availableForSale on VariantFragment
- countryCode on CheckoutFragment
- src on CollectionFragment and VariantFragment

### v1.10.0 (November 7, 2018)
- Updates deprecated Storefront API methods used for some checkout mutations.

### v1.9.1 (October 24, 2018)
- Specifies pageInfo for discountApplications connection

### [UNSAFE] v1.9.0 (October 23, 2018)
- Updates schema.json
- Support checkoutDiscountCodeRemove mutation
- Exposes discounts on the checkout Object
- Allows a null checkout response from CheckoutResource.fetch (#563)

### v1.8.0 (August 30, 2018)
- Support checkoutEmailUpdate mutation

### v0.1.3 (March 30, 2016)
- Adds IE9 support for `atob` and `btoa` using polyfills via #52
- Cleans up some deployment noise (#54). Thanks @tessalt
- Adds IE9 support for `atob` and `btoa` using polyfills via #52
- Cleans up some deployment noise (#54). Thanks @tessalt

### v0.1.0 (March 22, 2016)

9 changes: 5 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ The following documents the folder structure for this project and what the purpo
See [here](https://github.com/Shopify/js-buy-sdk/blob/master/examples) for our examples.

## Documentation
If your change affects how people use the project (i.e. adding or
changing arguments to a function, adding a new function, changing the
return value, etc), please ensure the documentation is also updated to
reflect this. The docs live inside the `docs/` folder and are hosted
Please do not update documentation, as this may cause
merge conflicts. After a pull request has been merged, the
maintainers will update documentation and release a new version.

The docs live inside the `docs/` folder and are hosted
at `http://shopify.github.io/js-buy-sdk`.

To generate docs run the following:
Expand Down
20 changes: 17 additions & 3 deletions DEPLOYING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@
* write new version to package.json
* create a commit with a commit message matching the version number
* create a new tag matching the version number
3. Push the new commit and tags to master with `git push origin master --tags`
4. Create a release on Github. Include changelog in description
5. Deploy built scripts to s3 via [shipit](https://shipit.shopify.io/shopify/js-buy-sdk/production)
3. Push the new commit and tags to master with `git push && git push --tags`
4. Deploy built scripts to s3 via [shipit](https://shipit.shopify.io/shopify/js-buy-sdk/production)

# Updating Documentation

If your change affects how people use the project (i.e. adding or
changing arguments to a function, adding a new function, changing the
return value, etc), please ensure the documentation is also updated to
reflect this. The docs live inside the `docs/` folder and are hosted
at `http://shopify.github.io/js-buy-sdk`.

Please update the docs in a separate PR from the code change. When the two are
updated together, the diff will be huge and it will be difficult to review.

1. Generate documentation using `npm run doc:build` or `yarn doc:build`
2. Update the [Changelog](https://github.com/Shopify/js-buy-sdk/CHANGELOG.md) with details about the release.
3. Merge your branch into master
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ and provides the ability to retrieve products and collections from your shop, ad

[Full API docs are available here](https://shopify.github.io/js-buy-sdk).

## Changelog

View our [Changelog](https://github.com/Shopify/js-buy-sdk/blob/master/CHANGELOG.md) for details about our releases.

## Table Of Contents

- [Installation](#installation)
Expand Down Expand Up @@ -43,10 +47,16 @@ $ npm install shopify-buy

**CDN:**

There is a minified UMD build available via CDN:
There is a minified UMD build available via CDN (see the [Changelog](https://github.com/Shopify/js-buy-sdk/blob/master/CHANGELOG.md) for details about the latest release):

```html
<script src="http://sdks.shopifycdn.com/js-buy-sdk/v2/latest/index.umd.min.js"></script>
```

You can also use a specific release version:

```html
<script src="http://sdks.shopifycdn.com/js-buy-sdk/v1/latest/index.umd.min.js"></script>
<script src="https://sdks.shopifycdn.com/js-buy-sdk/1.11.0/index.umd.min.js"></script>
```

## Builds
Expand Down Expand Up @@ -197,10 +207,19 @@ client.checkout.addDiscount(checkoutId, discountCode).then(checkout => {

### Removing a Discount
```javascript
<<<<<<< HEAD
const checkoutId = 'Z2lkOi8vc2hvcGlmeS9DaGVja291dC9kMTZmM2EzMDM4Yjc4N=';

client.checkout.removeDiscount(checkoutId).then((checkout) => {
// Do something with the updated checkout
=======
const checkoutId = 'Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0SW1hZ2UvMTgyMTc3ODc1OTI='; // ID of an existing checkout

// Removes the applied discount from an existing checkout.
client.checkout.removeDiscount(checkoutId).then(checkout => {
// Do something with the updated checkout
console.log(checkout);
>>>>>>> upstream/master
});
```
Expand Down
Loading

0 comments on commit 5c761a3

Please sign in to comment.