Skip to content

Commit

Permalink
Merge pull request #1169 from brave/master
Browse files Browse the repository at this point in the history
Production Release 2024-04-26
  • Loading branch information
IanKrieger authored Apr 26, 2024
2 parents 1f5241e + ba18aa4 commit cb00e90
Show file tree
Hide file tree
Showing 223 changed files with 3,180 additions and 5,928 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.generated.tsx linguist-generated
src/graphql/types.ts linguist-generated
src/graphql-client/*.ts linguist-generated
*.po linguist-generated
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10
uses: github/codeql-action/init@c7f9125735019aa87cfc361530512d50ea439c71 # v3.25.1
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@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10
uses: github/codeql-action/autobuild@c7f9125735019aa87cfc361530512d50ea439c71 # v3.25.1

# ℹ️ 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@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10
uses: github/codeql-action/analyze@c7f9125735019aa87cfc361530512d50ea439c71 # v3.25.1
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
url: https://ads.brave.com

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- name: Use Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
url: https://ads.bravesoftware.com

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- name: Use Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sanity-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- name: Use Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ node_modules
build
src/locales/*.js

# these files are code generated
src/graphql-client/*.ts

# npm and prettier fight over a EOF on these files, let npm win:
package.json
package-lock.json
Expand Down
29 changes: 12 additions & 17 deletions codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@ import { CodegenConfig } from "@graphql-codegen/cli";

const config: CodegenConfig = {
schema: "../ads-serve/src/graphql/schema.graphql",
documents: "./src/**/*.graphql",
hooks: { afterAllFileWrite: ["prettier --write"] },
documents: ["src/**/*.ts", "src/**/*.tsx", "src/**/*.graphql"],
ignoreNoDocuments: true,
overwrite: true,
generates: {
"./src/graphql-client/": {
preset: "client",
presetConfig: {
fragmentMasking: false,
},
},
},
config: {
strictScalars: true,
useTypeImports: true,
Expand All @@ -16,20 +25,6 @@ const config: CodegenConfig = {
JSONObject: "object",
},
},
generates: {
"src/": {
preset: "near-operation-file",
presetConfig: {
extension: ".generated.tsx",
baseTypesPath: "graphql/types.ts",
},
plugins: ["typescript-operations", "typescript-react-apollo"],
config: { withHooks: true, withRefetchFn: true, skipTypename: true },
},
"src/graphql/types.ts": {
plugins: ["typescript"],
config: { onlyOperationTypes: true },
},
},
};

export default config;
Loading

0 comments on commit cb00e90

Please sign in to comment.