Skip to content

Commit ec6b13a

Browse files
authored
chore: Remove requirements for upload tokens (#153)
Implement tokenless support for forked upstream branch support.
1 parent f290775 commit ec6b13a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1535
-76
lines changed

.changeset/kind-camels-give.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@codecov/nextjs-webpack-plugin": minor
3+
"@codecov/bundler-plugin-core": patch
4+
"@codecov/nuxt-plugin": patch
5+
"@codecov/remix-vite-plugin": patch
6+
"@codecov/rollup-plugin": patch
7+
"@codecov/solidstart-plugin": patch
8+
"@codecov/sveltekit-plugin": patch
9+
"@codecov/vite-plugin": patch
10+
"@codecov/webpack-plugin": patch
11+
---
12+
13+
Remove requirement for uploadToken being present adding support for tokenless uploads.

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ jobs:
290290
"vite",
291291
"webpack",
292292
"solidstart",
293+
"tokenless",
293294
]
294295
steps:
295296
- name: Checkout
@@ -352,6 +353,8 @@ jobs:
352353
SVELTEKIT_API_URL: ${{ secrets.CODECOV_API_URL }}
353354
VITE_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
354355
VITE_API_URL: ${{ secrets.CODECOV_API_URL }}
356+
TOKENLESS_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
357+
TOKENLESS_API_URL: ${{ secrets.CODECOV_API_URL }}
355358
WEBPACK_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
356359
WEBPACK_API_URL: ${{ secrets.CODECOV_API_URL }}
357360
run: pnpm run build
@@ -374,6 +377,7 @@ jobs:
374377
"vite",
375378
"webpack",
376379
"solidstart",
380+
"tokenless",
377381
]
378382
steps:
379383
- name: Checkout
@@ -436,6 +440,8 @@ jobs:
436440
SVELTEKIT_API_URL: ${{ secrets.CODECOV_API_URL }}
437441
VITE_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
438442
VITE_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }}
443+
TOKENLESS_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
444+
TOKENLESS_API_URL: ${{ secrets.CODECOV_API_URL }}
439445
WEBPACK_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
440446
WEBPACK_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }}
441447
run: pnpm run build

examples/next-js-15/next.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const nextConfig = {
1010
uploadToken: process.env.NEXT_UPLOAD_TOKEN,
1111
apiUrl: process.env.NEXT_API_URL,
1212
webpack: options.webpack,
13+
gitService: "github",
1314
debug: true,
1415
}),
1516
);

examples/next-js/next.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export default {
1010
uploadToken: process.env.NEXT_UPLOAD_TOKEN,
1111
apiUrl: process.env.NEXT_API_URL,
1212
webpack: options.webpack,
13+
gitService: "github",
1314
debug: true,
1415
}),
1516
);

examples/nuxt/nuxt.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default defineNuxtConfig({
99
bundleName: "@codecov/example-nuxt-app",
1010
uploadToken: process.env.NUXT_UPLOAD_TOKEN,
1111
apiUrl: process.env.NUXT_API_URL,
12+
gitService: "github",
1213
debug: true,
1314
},
1415
],

examples/remix/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default defineConfig({
1818
bundleName: "@codecov/example-remix-app",
1919
uploadToken: process.env.REMIX_UPLOAD_TOKEN,
2020
apiUrl: process.env.REMIX_API_URL,
21+
gitService: "github",
2122
debug: true,
2223
}),
2324
],

examples/rollup/rollup.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export default defineConfig({
2222
bundleName: "@codecov/example-rollup-app",
2323
apiUrl: process.env.ROLLUP_API_URL,
2424
uploadToken: process.env.ROLLUP_UPLOAD_TOKEN,
25+
gitService: "github",
2526
debug: true,
2627
uploadOverrides: {
2728
sha: process.env.HEAD_SHA,

examples/solidstart/app.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ export default defineConfig({
1111
bundleName: "@codecov/example-solidstart-app",
1212
uploadToken: process.env.SOLIDSTART_UPLOAD_TOKEN,
1313
apiUrl: process.env.SOLIDSTART_API_URL,
14+
gitService: "github",
1415
debug: true,
15-
}) as any,
16+
}),
1617
],
1718
},
1819
});

examples/sveltekit/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export default defineConfig({
1010
bundleName: "@codecov/example-sveltekit-app",
1111
uploadToken: process.env.SVELTEKIT_UPLOAD_TOKEN,
1212
apiUrl: process.env.SVELTEKIT_API_URL,
13+
gitService: "github",
1314
debug: true,
1415
}),
1516
],

examples/tokenless/.eslintrc.cjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
root: true,
3+
env: { browser: true, es2020: true },
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:react-hooks/recommended',
8+
],
9+
ignorePatterns: ['dist', '.eslintrc.cjs'],
10+
parser: '@typescript-eslint/parser',
11+
plugins: ['react-refresh'],
12+
rules: {
13+
'react-refresh/only-export-components': [
14+
'warn',
15+
{ allowConstantExport: true },
16+
],
17+
},
18+
}

0 commit comments

Comments
 (0)