@doswiftly/storefront-operations 5.4.0 → 5.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +93 -0
- package/package.json +3 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 5.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7846bdb: Fix `doswiftly dev` port pre-flight on Windows (and any host where another
|
|
8
|
+
process binds the port on IPv6 `::` only): the probe now checks IPv4 and
|
|
9
|
+
IPv6 in parallel and requires BOTH free before marking a port as available.
|
|
10
|
+
Previously an IPv6-only conflict (common on Windows, where Next.js binds
|
|
11
|
+
`::` by default) slipped past the IPv4-only probe — the banner advertised
|
|
12
|
+
`http://localhost:3000` and the framework immediately crashed with
|
|
13
|
+
`EADDRINUSE :::3000`. With this fix `doswiftly dev` falls back to the next
|
|
14
|
+
free port (3001, 3002, …) as documented.
|
|
15
|
+
|
|
16
|
+
Also ship `CHANGELOG.md` inside the npm tarball. Previous releases packed
|
|
17
|
+
only `dist`/`bin`/`templates` (and `schema.graphql`/operations for
|
|
18
|
+
`storefront-operations`, `dist` for `storefront-sdk`), so consumers who
|
|
19
|
+
`npm install @doswiftly/cli` got a version number with no user-visible
|
|
20
|
+
release notes.
|
|
21
|
+
|
|
22
|
+
## 5.4.0
|
|
23
|
+
|
|
24
|
+
### Minor Changes
|
|
25
|
+
|
|
26
|
+
- 770fcd3: Added `Product.purchasable: Boolean!` to the storefront schema. The field mirrors `visibility === 'PUBLIC'` server-side and lets templates hide the "Add to cart" / "Buy now" path for component products that are only reachable through a parent product's configurator.
|
|
27
|
+
|
|
28
|
+
Templates can render a non-purchasable banner on the PDP instead of exposing a purchase action that the server will reject. Requesting the field is additive — operations that omit it keep working.
|
|
29
|
+
|
|
30
|
+
All notable changes to @doswiftly/storefront-operations will be documented in this file.
|
|
31
|
+
|
|
32
|
+
## [5.0.0] - 2026-04-12
|
|
33
|
+
|
|
34
|
+
### Breaking
|
|
35
|
+
|
|
36
|
+
- Removed `type InventoryLevel`, `fragment InventoryLevel`, `fragment VariantInventoryLevels`, and `query ProductInventory`.
|
|
37
|
+
- Removed `ProductVariant.inventoryLevels(locationType)` field — replaced by `ProductVariant.storeAvailability`.
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- Shopify-parity `StoreAvailability` surface on `ProductVariant`:
|
|
42
|
+
- `type StoreAvailability { available, quantityAvailable (token-gated), pickUpTime, location }`
|
|
43
|
+
- `type Location`, `LocationAddress`, `BusinessHours`, `BusinessHoursWindow` — full pickup-aware payload.
|
|
44
|
+
- `type StoreAvailabilityConnection` + `StoreAvailabilityEdge` — cursor-paginated, supports `near`, `locationType`, `@inContext(preferredLocationId)`.
|
|
45
|
+
- Root-level queries: `locations(first, after, near, hasPickupEnabled, locationType)` and `location(id)`.
|
|
46
|
+
- `directive @inContext(preferredLocationId: ID) on QUERY | MUTATION | SUBSCRIPTION` — Shopify operation directive for contextual hints (country / language / buyer to follow).
|
|
47
|
+
- Fragments: `StoreAvailability`, `StoreAvailabilityConnection`, `Location`, `LocationAddress`, `BusinessHours`, `BusinessHoursWindow`, `VariantStoreAvailability`.
|
|
48
|
+
- Queries: `ProductStoreAvailability`, `Locations`, `Location`.
|
|
49
|
+
|
|
50
|
+
### Migration
|
|
51
|
+
|
|
52
|
+
Replace:
|
|
53
|
+
|
|
54
|
+
```graphql
|
|
55
|
+
query ProductInventory($handle: String) {
|
|
56
|
+
product(handle: $handle) {
|
|
57
|
+
variants {
|
|
58
|
+
...VariantInventoryLevels
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
with:
|
|
65
|
+
|
|
66
|
+
```graphql
|
|
67
|
+
query ProductStoreAvailability($handle: String) {
|
|
68
|
+
product(handle: $handle) {
|
|
69
|
+
variants {
|
|
70
|
+
...VariantStoreAvailability
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`quantityAvailable` is now token-gated (null for anonymous, Int when `x-customer-access-token` is sent) — matches Shopify Storefront API.
|
|
77
|
+
|
|
78
|
+
## [1.0.0] - 2025-12-09
|
|
79
|
+
|
|
80
|
+
### Added
|
|
81
|
+
|
|
82
|
+
- Initial release of @doswiftly/storefront-operations package
|
|
83
|
+
- GraphQL operations synced from backend SSOT
|
|
84
|
+
- Queries: Shop, Product, Products, ProductSearch, Collection, Collections, Category, Categories, Cart, Customer
|
|
85
|
+
- Mutations: Cart operations, Customer auth, Profile management, Address management, Password recovery
|
|
86
|
+
- Fragments: All reusable fragments for products, collections, cart, customer, etc.
|
|
87
|
+
- Sync script to copy operations from backend
|
|
88
|
+
- Package exports for .graphql files
|
|
89
|
+
- README with usage instructions
|
|
90
|
+
|
|
91
|
+
### Purpose
|
|
92
|
+
|
|
93
|
+
Enable direct GraphQL codegen approach for Next.js storefronts while maintaining Single Source of Truth from backend.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doswiftly/storefront-operations",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.1",
|
|
4
4
|
"description": "GraphQL operations for DoSwiftly Storefront - SSOT from backend",
|
|
5
5
|
"homepage": "https://doswiftly.pl",
|
|
6
6
|
"publishConfig": {
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"queries.graphql",
|
|
29
29
|
"mutations.graphql",
|
|
30
30
|
"fragments.graphql",
|
|
31
|
-
"README.md"
|
|
31
|
+
"README.md",
|
|
32
|
+
"CHANGELOG.md"
|
|
32
33
|
],
|
|
33
34
|
"scripts": {
|
|
34
35
|
"sync": "node scripts/sync-operations.js",
|