shopify-upgrade-guard 0.2.2 → 0.2.4
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/README.md +41 -13
- package/action.yml +4 -1
- package/data/versions.json +55 -9
- package/dist/index.js +1 -1
- package/package.json +14 -7
- package/src/action.js +6 -4
- package/src/baseline.js +5 -3
- package/src/cli.js +12 -4
- package/src/discovery.js +10 -8
- package/src/git.js +2 -2
- package/src/graphql.js +52 -0
- package/src/output.js +3 -2
- package/src/rules.js +14 -4
- package/src/safe-file.js +16 -0
- package/src/scan.js +15 -11
- package/src/version-data.js +61 -0
- package/src/version.js +2 -0
- package/src/versions.js +1 -1
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/shopify-upgrade-guard)
|
|
6
6
|
[](https://www.npmjs.com/package/shopify-upgrade-guard)
|
|
7
|
-
[](https://github.com/RexCode-Digital/shopify-upgrade-guard/actions/workflows/ci.yml)
|
|
8
|
+
[](https://github.com/RexCode-Digital/shopify-upgrade-guard/actions/workflows/codeql.yml)
|
|
9
|
+
[](LICENSE)
|
|
10
10
|
|
|
11
11
|
Shopify Upgrade Guard is an offline, evidence-backed CLI and GitHub Action for Shopify developers. It scans a repository for documented upgrade and deprecation risks, evaluates them against a target Shopify API version, and gives you migration guidance backed by official Shopify sources.
|
|
12
12
|
|
|
@@ -14,6 +14,10 @@ Shopify Upgrade Guard is an offline, evidence-backed CLI and GitHub Action for S
|
|
|
14
14
|
|
|
15
15
|
> Unofficial open-source developer tooling. Not affiliated with, endorsed by, or certified by Shopify.
|
|
16
16
|
|
|
17
|
+
Maintained by RexCode Digital Ltd.
|
|
18
|
+
|
|
19
|
+
Part of the **RexCode Shopify developer tools** suite. Requires Node.js 20 or later for the CLI. [Releases](https://github.com/RexCode-Digital/shopify-upgrade-guard/releases) · [npm](https://www.npmjs.com/package/shopify-upgrade-guard) · [Marketplace](https://github.com/marketplace/actions/shopify-upgrade-guard)
|
|
20
|
+
|
|
17
21
|
## Quick start
|
|
18
22
|
|
|
19
23
|
Run it without installing anything globally:
|
|
@@ -58,16 +62,19 @@ jobs:
|
|
|
58
62
|
upgrade-guard:
|
|
59
63
|
runs-on: ubuntu-latest
|
|
60
64
|
steps:
|
|
61
|
-
- uses: actions/checkout@
|
|
65
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
66
|
+
with:
|
|
67
|
+
fetch-depth: 0
|
|
68
|
+
persist-credentials: false
|
|
62
69
|
|
|
63
|
-
- uses:
|
|
70
|
+
- uses: RexCode-Digital/shopify-upgrade-guard@4e288cbc58a3186a7304785615f7255c0e3d0155 # v0.2.3
|
|
64
71
|
with:
|
|
65
72
|
target: 2026-10
|
|
66
73
|
fail-on: warning
|
|
67
74
|
fail-on-new: 'true'
|
|
68
75
|
```
|
|
69
76
|
|
|
70
|
-
|
|
77
|
+
Use the immutable patch release tag or a reviewed full commit SHA. Existing minor aliases are retained for compatibility and are not moved by future releases.
|
|
71
78
|
|
|
72
79
|
### Action inputs
|
|
73
80
|
|
|
@@ -77,6 +84,7 @@ For convenience, workflows may use the movable minor release alias `efegokdemir/
|
|
|
77
84
|
| `fail-on` | Policy threshold: `never`, `error`, `warning`, or `info` |
|
|
78
85
|
| `fail-on-new` | Apply the failure threshold only to findings introduced by the PR |
|
|
79
86
|
| `path` | Repository path to scan |
|
|
87
|
+
| `base-ref` | Explicit Git base for comparison; defaults to origin/PR-base for new-only pull-request checks |
|
|
80
88
|
|
|
81
89
|
### Action outputs
|
|
82
90
|
|
|
@@ -86,7 +94,7 @@ The Action is bundled and runs on the current GitHub `node24` JavaScript Action
|
|
|
86
94
|
|
|
87
95
|
## What it catches today
|
|
88
96
|
|
|
89
|
-
The rule pack is intentionally
|
|
97
|
+
The rule pack is intentionally focused. Existing lexical checks report review signals; the `automaticDiscounts` removal check parses literal GraphQL root selections.
|
|
90
98
|
|
|
91
99
|
| Rule | Detects | Evidence |
|
|
92
100
|
| --- | --- | --- |
|
|
@@ -98,7 +106,8 @@ The rule pack is intentionally small and high-precision.
|
|
|
98
106
|
| `UG-CUSTOMER-001` | Customer Account checkout removals relevant to 2026-10 | [Shopify changelog](https://shopify.dev/changelog/customer-account-api-last-incomplete-checkout-and-checkout-types-removed) |
|
|
99
107
|
| `UG-POS-001` | Removed POS `session.currentSession.staffMemberId` usage | [Shopify changelog](https://shopify.dev/changelog/removed-session-currentsession-staffmemberid-from-pos-ui-extensions-2026-10) |
|
|
100
108
|
| `UG-ADMIN-001` | Legacy Admin GraphQL `priceRule` usage | [2026-10 release notes](https://shopify.dev/release-notes/2026-10) |
|
|
101
|
-
| `UG-
|
|
109
|
+
| `UG-ADMIN-002` | Literal GraphQL root `automaticDiscounts` removed in 2027-01 | [Official removal](https://shopify.dev/changelog/posts/automaticdiscounts-query-is-removed-in-api-version-2027-01) |
|
|
110
|
+
| `UG-SCRIPT-001` | Cross-version Script Tag write restrictions; REST resource references require method review | [Script Tag deprecation](https://shopify.dev/changelog/online-store-script-tags-deprecation) |
|
|
102
111
|
|
|
103
112
|
Supported inventory surfaces include Admin REST, Admin GraphQL, Checkout UI extensions, Customer Account UI extensions, POS UI extensions, Functions, Shopify app TOML, and recognized Shopify client configuration.
|
|
104
113
|
|
|
@@ -125,7 +134,7 @@ npx shopify-upgrade-guard scan --target 2026-10 --format json
|
|
|
125
134
|
npx shopify-upgrade-guard scan --target 2026-10 --format sarif
|
|
126
135
|
|
|
127
136
|
# Fail only when the PR introduces new warning-or-higher findings
|
|
128
|
-
npx shopify-upgrade-guard scan --target 2026-10 --fail-on warning --fail-on-new
|
|
137
|
+
npx shopify-upgrade-guard scan --target 2026-10 --fail-on warning --fail-on-new --base-ref origin/main
|
|
129
138
|
```
|
|
130
139
|
|
|
131
140
|
Exit codes: `0` means the scan completed and policy passed; `1` means active findings exceeded the configured policy; `2` means the scanner could not complete.
|
|
@@ -141,6 +150,10 @@ npx shopify-upgrade-guard baseline check
|
|
|
141
150
|
|
|
142
151
|
Baselined findings remain reviewable while new fingerprints stay actionable.
|
|
143
152
|
|
|
153
|
+
`--fail-on-new` requires a valid Git base comparison. Fetch full history and provide `--base-ref`, or use the pull-request Action. Missing refs/history exit 2 instead of passing an incomplete comparison.
|
|
154
|
+
|
|
155
|
+
The bundled snapshot, verified 4 October 2026, lists `2026-10` as latest stable and `2027-01` as release candidate. The RC is for testing. Shopify lists `2025-10` as unsupported while its accessibility table runs until 16 October 2026; support status and accessibility are distinct. Future version names do not imply verified rule coverage.
|
|
156
|
+
|
|
144
157
|
## Configuration
|
|
145
158
|
|
|
146
159
|
Commit `.upgradeguard.json` to set repository defaults:
|
|
@@ -176,10 +189,13 @@ See [SECURITY.md](SECURITY.md) and the [threat model](docs/threat-model.md).
|
|
|
176
189
|
|
|
177
190
|
Building or maintaining Shopify apps?
|
|
178
191
|
|
|
179
|
-
- **[ChangeGuard](https://github.com/
|
|
180
|
-
- **[Shopify Scope Guard](https://github.com/
|
|
192
|
+
- **[ChangeGuard](https://github.com/RexCode-Digital/shopify-app-changeguard)** — Review meaningful `shopify.app*.toml` configuration changes before they reach production.
|
|
193
|
+
- **[Shopify Scope Guard](https://github.com/RexCode-Digital/shopify-scope-guard)** — Audit whether declared Shopify permissions are supported by offline code evidence.
|
|
194
|
+
- **[Shopify App Review Guard](https://github.com/RexCode-Digital/shopify-app-review-guard)** — Run deterministic preflight checks for Shopify App Store and production readiness.
|
|
195
|
+
|
|
196
|
+
GitHub Marketplace: [Shopify Upgrade Guard](https://github.com/marketplace/actions/shopify-upgrade-guard)
|
|
181
197
|
|
|
182
|
-
|
|
198
|
+
All four tools run offline and require no Shopify credentials.
|
|
183
199
|
|
|
184
200
|
## Contributing
|
|
185
201
|
|
|
@@ -193,7 +209,7 @@ A Shopify-specific rule should include:
|
|
|
193
209
|
4. migration guidance
|
|
194
210
|
5. positive and false-positive tests
|
|
195
211
|
|
|
196
|
-
Start with [the contribution guide](CONTRIBUTING.md) or browse the [open issues](https://github.com/
|
|
212
|
+
Start with [the contribution guide](CONTRIBUTING.md) or browse the [open issues](https://github.com/RexCode-Digital/shopify-upgrade-guard/issues).
|
|
197
213
|
|
|
198
214
|
## Roadmap
|
|
199
215
|
|
|
@@ -204,3 +220,15 @@ See [ROADMAP.md](ROADMAP.md).
|
|
|
204
220
|
## License
|
|
205
221
|
|
|
206
222
|
MIT — see [LICENSE](LICENSE).
|
|
223
|
+
|
|
224
|
+
## Immutable SHA usage
|
|
225
|
+
|
|
226
|
+
The Action example pins the reviewed v0.2.3 release commit. Verify the release reference with:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
gh api repos/RexCode-Digital/shopify-upgrade-guard/git/ref/tags/v0.2.3 --jq .object.sha
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Published patch tags and existing minor aliases are retained. Future releases do not move minor aliases; use an immutable patch tag or a reviewed full commit SHA.
|
|
233
|
+
|
|
234
|
+
The Action `base-ref` input selects an explicit Git comparison base. With `fail-on-new: true`, pull-request events default to `origin/<base branch>`; other events must supply `base-ref`. Ordinary scans do not infer a comparison from GitHub environment variables.
|
package/action.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
name: Shopify Upgrade Guard
|
|
2
2
|
description: Detect documented Shopify API and platform upgrade risks in your repository
|
|
3
|
-
author:
|
|
3
|
+
author: RexCode Digital Ltd (Efe Gökdemir)
|
|
4
4
|
branding:
|
|
5
5
|
icon: shield
|
|
6
6
|
color: purple
|
|
@@ -16,6 +16,9 @@ inputs:
|
|
|
16
16
|
description: Apply fail-on only to findings introduced by the pull request
|
|
17
17
|
required: false
|
|
18
18
|
default: 'false'
|
|
19
|
+
base-ref:
|
|
20
|
+
description: Git base reference for new-only comparison; defaults to origin/PR-base on pull requests
|
|
21
|
+
required: false
|
|
19
22
|
path:
|
|
20
23
|
description: Repository path to scan
|
|
21
24
|
required: false
|
package/data/versions.json
CHANGED
|
@@ -1,14 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
-
"verifiedAt": "2026-10-
|
|
2
|
+
"verifiedAt": "2026-10-04",
|
|
3
3
|
"source": "https://shopify.dev/docs/api/usage/versioning",
|
|
4
4
|
"versions": [
|
|
5
|
-
{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
|
|
5
|
+
{
|
|
6
|
+
"version": "2025-01",
|
|
7
|
+
"releaseDate": "2025-01-01",
|
|
8
|
+
"accessibleUntil": "2026-01-16T15:00:00Z",
|
|
9
|
+
"status": "unsupported"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"version": "2025-04",
|
|
13
|
+
"releaseDate": "2025-04-01",
|
|
14
|
+
"accessibleUntil": "2026-04-16T15:00:00Z",
|
|
15
|
+
"status": "unsupported"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"version": "2025-07",
|
|
19
|
+
"releaseDate": "2025-07-01",
|
|
20
|
+
"accessibleUntil": "2026-07-16T15:00:00Z",
|
|
21
|
+
"status": "unsupported"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"version": "2025-10",
|
|
25
|
+
"releaseDate": "2025-10-01",
|
|
26
|
+
"accessibleUntil": "2026-10-16T15:00:00Z",
|
|
27
|
+
"status": "unsupported"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"version": "2026-01",
|
|
31
|
+
"releaseDate": "2026-01-01",
|
|
32
|
+
"accessibleUntil": "2027-01-16T15:00:00Z",
|
|
33
|
+
"status": "stable"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"version": "2026-04",
|
|
37
|
+
"releaseDate": "2026-04-01",
|
|
38
|
+
"accessibleUntil": "2027-04-16T15:00:00Z",
|
|
39
|
+
"status": "stable"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"version": "2026-07",
|
|
43
|
+
"releaseDate": "2026-07-01",
|
|
44
|
+
"accessibleUntil": "2027-07-16T15:00:00Z",
|
|
45
|
+
"status": "stable"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"version": "2026-10",
|
|
49
|
+
"releaseDate": "2026-10-01",
|
|
50
|
+
"accessibleUntil": "2027-10-16T15:00:00Z",
|
|
51
|
+
"status": "latest-stable"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"version": "2027-01",
|
|
55
|
+
"releaseDate": "2027-01-01",
|
|
56
|
+
"accessibleUntil": "2028-01-16T15:00:00Z",
|
|
57
|
+
"status": "release-candidate"
|
|
58
|
+
}
|
|
13
59
|
]
|
|
14
60
|
}
|