Skip to content

Commit

Permalink
Merge pull request #1369 from brave/master
Browse files Browse the repository at this point in the history
Production Release 2024-10-09
  • Loading branch information
IanKrieger authored Oct 9, 2024
2 parents f9dd624 + 767761f commit bc225d8
Show file tree
Hide file tree
Showing 7 changed files with 623 additions and 606 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
uses: github/codeql-action/init@6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea # v3.26.11
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
uses: github/codeql-action/autobuild@6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea # v3.26.11

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,4 +67,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
uses: github/codeql-action/analyze@6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea # v3.26.11
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.17.0
20.18.0
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"@lingui/format-po": "4.11.4",
"@lingui/macro": "4.11.4",
"@lingui/react": "4.11.4",
"@mui/icons-material": "6.1.1",
"@mui/icons-material": "6.1.2",
"@mui/lab": "6.0.0-beta.10",
"@mui/material": "6.1.1",
"@mui/x-data-grid": "7.18.0",
"@mui/x-date-pickers": "7.18.0",
"@mui/material": "6.1.2",
"@mui/x-data-grid": "7.19.0",
"@mui/x-date-pickers": "7.19.0",
"bignumber.js": "9.1.2",
"dayjs": "1.11.13",
"formik": "2.4.6",
Expand Down Expand Up @@ -68,31 +68,31 @@
"@lingui/cli": "4.11.4",
"@lingui/vite-plugin": "4.11.4",
"@parcel/watcher": "2.4.1",
"@types/lodash": "4.17.9",
"@types/lodash": "4.17.10",
"@types/papaparse": "5.3.14",
"@types/react": "18.3.10",
"@types/react": "18.3.11",
"@types/react-dom": "18.3.0",
"@types/react-router-dom": "5.3.3",
"@types/react-window": "1.8.8",
"@vitejs/plugin-basic-ssl": "1.1.0",
"@vitejs/plugin-react": "4.3.1",
"@vitejs/plugin-react": "4.3.2",
"babel-plugin-macros": "3.1.0",
"eslint": "8.57.1",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-lingui": "0.3.0",
"eslint-plugin-react": "7.37.0",
"eslint-plugin-react": "7.37.1",
"eslint-plugin-react-hooks": "4.6.2",
"husky": "9.1.6",
"knip": "5.30.6",
"knip": "5.31.0",
"lint-staged": "15.2.10",
"npm-run-all2": "6.2.3",
"prettier": "3.3.3",
"typescript": "5.6.2",
"typescript-eslint": "8.7.0",
"typescript-eslint": "8.8.0",
"vite": "5.4.8",
"vite-plugin-checker": "0.8.0",
"vite-tsconfig-paths": "5.0.1",
"vitest": "2.1.1"
"vitest": "2.1.2"
},
"engines": {
"node": ">=20",
Expand Down Expand Up @@ -121,5 +121,5 @@
"rollup@>=4.0.0 <4.22.4": ">=4.22.4"
}
},
"packageManager": "pnpm@9.11.0+sha512.0a203ffaed5a3f63242cd064c8fb5892366c103e328079318f78062f24ea8c9d50bc6a47aa3567cabefd824d170e78fa2745ed1f16b132e16436146b7688f19b"
"packageManager": "pnpm@9.12.0+sha512.4abf725084d7bcbafbd728bfc7bee61f2f791f977fd87542b3579dcb23504d170d46337945e4c66485cd12d588a0c0e570ed9c477e7ccdd8507cf05f3f92eaca"
}
1,149 changes: 582 additions & 567 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/Creatives/hooks/useSubmitCreative.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function useSubmitCreative(props: { id: string }) {
);

const input = {
..._.omit(valid, ["id", "targetUrlValid", "included"]),
..._.omit(valid, ["id", "targetUrlValid", "included", "type"]),
state: "under_review",
};

Expand Down
10 changes: 5 additions & 5 deletions src/user/library/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ describe("edit form tests", () => {
title: "valid",
body: "valid",
},
type: { code: "notification_v1_all" },
type: { code: "notification_all_v1" },
};

const ad: Partial<AdFragment> = {
Expand Down Expand Up @@ -407,7 +407,7 @@ describe("edit form tests", () => {
"state": "active",
"targetUrlValid": "",
"type": {
"code": "notification_v1_all",
"code": "notification_all_v1",
},
},
{
Expand All @@ -425,7 +425,7 @@ describe("edit form tests", () => {
"state": "active",
"targetUrlValid": "",
"type": {
"code": "notification_v1_all",
"code": "notification_all_v1",
},
},
],
Expand Down Expand Up @@ -464,7 +464,7 @@ describe("edit form tests", () => {
"state": "active",
"targetUrlValid": "",
"type": {
"code": "notification_v1_all",
"code": "notification_all_v1",
},
},
{
Expand All @@ -482,7 +482,7 @@ describe("edit form tests", () => {
"state": "active",
"targetUrlValid": "",
"type": {
"code": "notification_v1_all",
"code": "notification_all_v1",
},
},
],
Expand Down
36 changes: 19 additions & 17 deletions src/user/library/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,23 +176,25 @@ export function validCreativeFields<T extends GenericCreative>(
targetUrlValid: "",
state: c.state,
type: { code: c.type.code },
payloadNotification: c.payloadNotification
? {
title: c.payloadNotification.title,
body: c.payloadNotification.body,
targetUrl: c.payloadNotification.targetUrl,
}
: undefined,
payloadInlineContent: c.payloadInlineContent
? {
ctaText: c.payloadInlineContent.ctaText,
description: c.payloadInlineContent.description,
dimensions: "900x750",
imageUrl: c.payloadInlineContent.imageUrl,
targetUrl: c.payloadInlineContent.targetUrl,
title: c.payloadInlineContent.title,
}
: undefined,
payloadNotification:
c.type.code === "notification_all_v1" && !!c.payloadNotification
? {
title: c.payloadNotification.title,
body: c.payloadNotification.body,
targetUrl: c.payloadNotification.targetUrl,
}
: undefined,
payloadInlineContent:
c.type.code === "inline_content_all_v1" && !!c.payloadInlineContent
? {
ctaText: c.payloadInlineContent.ctaText,
description: c.payloadInlineContent.description,
dimensions: "900x750",
imageUrl: c.payloadInlineContent.imageUrl,
targetUrl: c.payloadInlineContent.targetUrl,
title: c.payloadInlineContent.title,
}
: undefined,
};
}

Expand Down

0 comments on commit bc225d8

Please sign in to comment.