-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into bump-app-sdk
- Loading branch information
Showing
133 changed files
with
3,251 additions
and
1,117 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Check Licenses | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
# Labels are needed to handle external contributors | ||
- labeled | ||
- unlabeled | ||
paths: | ||
# Self | ||
- ".github/workflows/check-licenses.yaml" | ||
# JS/TS Ecosystem | ||
- "**/package.json" | ||
- "**/pnpm-lock.yaml" | ||
- "**/package-lock.json" | ||
|
||
jobs: | ||
default: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
uses: saleor/saleor-internal-actions/.github/workflows/run-license-check.yaml@v1 | ||
with: | ||
# List of ecosystems to scan. | ||
ecosystems: >- | ||
javascript | ||
# Grant rules (https://github.com/anchore/grant/blob/4362dc22cf5ea9baeccfa59b2863879afe0c30d7/README.md#usage) | ||
rules: | | ||
# Explicitly allow LGPL as "*GPL*" rule will cause to reject them otherwise. | ||
- pattern: "*lgpl*" | ||
name: "allow-lgpl" | ||
mode: "allow" | ||
reason: "LGPL is allowed." | ||
- pattern: "*gpl*" | ||
name: "deny-gpl" | ||
mode: "deny" | ||
reason: "GPL licenses are not compatible with BSD-3-Clause" | ||
exceptions: | ||
# store2 is under a dual license (MIT OR GPL-3.0), thus is compatible with our project. | ||
# License metadata (for v2.14.2): https://github.com/nbubna/store/blob/20cce53b83b5870b6715fa929e4aa773cfa5e179/package.json#L32 | ||
- store2 | ||
- pattern: "*proprietary*" | ||
name: "deny-proprietary" | ||
mode: "deny" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
* @saleor/apps-guild | ||
|
||
/apps/avatax @saleor/shopex-js | ||
/apps/segment @saleor/shopex-js | ||
|
||
/apps/cms-v2 @saleor/merchant-js | ||
/apps/klaviyo @saleor/merchant-js | ||
/apps/products-feed @saleor/merchant-js | ||
/apps/search @saleor/merchant-js | ||
/apps/smtp @saleor/merchant-js | ||
* @saleor/extensibility-team-js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
apps/avatax/src/modules/avatax/calculate-taxes/avatax-calculate-taxes-adapter.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { describe, expect, it } from "vitest"; | ||
|
||
import { suspiciousLineCalculationCheck } from "@/modules/avatax/calculate-taxes/avatax-calculate-taxes-adapter"; | ||
|
||
describe("suspiciousLineCalculationCheck", () => { | ||
it("Returns false if line is zero", () => { | ||
expect( | ||
suspiciousLineCalculationCheck({ | ||
total_gross_amount: 0, | ||
total_net_amount: 0, | ||
tax_rate: 0.2, // If its zero-line, it doesn matter | ||
}), | ||
).toBe(false); | ||
}); | ||
|
||
it("Returns true if net & gross is the same, but rate is not: 1.00 + 1.00 + rate 0.08", () => { | ||
expect( | ||
suspiciousLineCalculationCheck({ | ||
total_gross_amount: 1, | ||
total_net_amount: 1, | ||
tax_rate: 0.08, // If its zero-line, it doesn matter | ||
}), | ||
).toBe(true); | ||
}); | ||
|
||
it("Returns true for small numbers: 0.06 + 0.06 + rate 0.07", () => { | ||
expect( | ||
suspiciousLineCalculationCheck({ | ||
total_gross_amount: 0.06, | ||
total_net_amount: 0.06, | ||
tax_rate: 0.07, // If its zero-line, it doesn matter | ||
}), | ||
).toBe(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
apps/avatax/src/modules/client-logs/client-logs-feature-config.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.