shopify-upgrade-guard 0.2.3 → 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 +16 -13
- package/action.yml +1 -1
- package/dist/index.js +1 -1
- package/package.json +4 -4
- package/src/output.js +1 -1
- package/src/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shopify-upgrade-guard",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Offline static analysis for Shopify platform and API upgrade risks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|
|
35
|
-
"url": "https://github.com/
|
|
35
|
+
"url": "https://github.com/RexCode-Digital/shopify-upgrade-guard.git"
|
|
36
36
|
},
|
|
37
37
|
"bugs": {
|
|
38
|
-
"url": "https://github.com/
|
|
38
|
+
"url": "https://github.com/RexCode-Digital/shopify-upgrade-guard/issues"
|
|
39
39
|
},
|
|
40
40
|
"keywords": [
|
|
41
41
|
"shopify",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"graphql": "16.14.2"
|
|
57
57
|
},
|
|
58
|
-
"homepage": "https://github.com/
|
|
58
|
+
"homepage": "https://github.com/RexCode-Digital/shopify-upgrade-guard#readme"
|
|
59
59
|
}
|
package/src/output.js
CHANGED
|
@@ -16,4 +16,4 @@ export function validatePolicy(threshold) { if (!['never','error','warning','inf
|
|
|
16
16
|
export function shouldFail(result, threshold = 'never', newOnly = false) { validatePolicy(threshold); if (newOnly && !result.comparisonAvailable) throw new Error('fail-on-new requires an available Git base comparison; use --base-ref or a pull request checkout with full history'); if (threshold === 'never') return false; return activeFindings(result).filter((finding) => !newOnly || finding.lifecycle === 'NEW').some((finding) => threshold === 'info' || (threshold === 'warning' && finding.severity !== 'info') || (threshold === 'error' && finding.severity === 'error')); }
|
|
17
17
|
export function toSarif(result) {
|
|
18
18
|
const ruleMap = new Map(); for (const finding of activeFindings(result)) if (!ruleMap.has(finding.ruleId)) ruleMap.set(finding.ruleId, { id: finding.ruleId, shortDescription: { text: finding.title }, helpUri: finding.source, properties: { severity: finding.severity, confidence: finding.confidence } });
|
|
19
|
-
const rules = [...ruleMap.values()]; return { version: '2.1.0', $schema: 'https://json.schemastore.org/sarif-2.1.0.json', runs: [{ tool: { driver: { name: 'Shopify Upgrade Guard', informationUri: 'https://github.com/
|
|
19
|
+
const rules = [...ruleMap.values()]; return { version: '2.1.0', $schema: 'https://json.schemastore.org/sarif-2.1.0.json', runs: [{ tool: { driver: { name: 'Shopify Upgrade Guard', informationUri: 'https://github.com/RexCode-Digital/shopify-upgrade-guard', rules } }, results: activeFindings(result).map((finding) => ({ ruleId: finding.ruleId, ruleIndex: rules.findIndex((rule) => rule.id === finding.ruleId), level: finding.severity === 'error' ? 'error' : finding.severity === 'warning' ? 'warning' : 'note', message: { text: `${finding.title}. ${finding.reason ?? finding.migration}` }, partialFingerprints: { primaryLocationLineHash: finding.fingerprint }, locations: [{ physicalLocation: { artifactLocation: { uri: finding.file.replaceAll('\\', '/').split('/').map(encodeURIComponent).join('/') }, region: { startLine: finding.line, startColumn: finding.column } } }] })) }] }; }
|
package/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated from package.json.
|
|
2
|
-
export const TOOL_VERSION = "0.2.
|
|
2
|
+
export const TOOL_VERSION = "0.2.4";
|