diff --git a/packages/react/package.json b/packages/react/package.json index 502d06dc39..a0485d8b84 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -46,6 +46,7 @@ "@babel/plugin-transform-runtime": "^7.0.0", "@babel/preset-env": "^7.0.0", "@babel/preset-react": "^7.0.0", + "@codecov/rollup-plugin": "^1.5.1", "@emotion/babel-plugin": "^11.10.0", "@emotion/jest": "^11.10.0", "@rollup/plugin-babel": "^6.0.0", diff --git a/packages/react/rollup.config.mjs b/packages/react/rollup.config.mjs index 43f5e30e5a..1a2ffd4b6c 100644 --- a/packages/react/rollup.config.mjs +++ b/packages/react/rollup.config.mjs @@ -1,5 +1,6 @@ import path from 'path'; import { fileURLToPath } from 'url'; +import { codecovRollupPlugin } from '@codecov/rollup-plugin'; import { babel } from '@rollup/plugin-babel'; import { nodeResolve } from '@rollup/plugin-node-resolve'; @@ -26,6 +27,12 @@ export default [ plugins: [ nodeResolve(), babel({ babelHelpers: 'bundled' }), + // Put the Codecov rollup plugin after all other plugins + codecovRollupPlugin({ + enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined, + bundleName: '@tonic-ui/react/dist/cjs/index.js', + uploadToken: process.env.CODECOV_TOKEN, + }), ], }, { @@ -39,6 +46,12 @@ export default [ plugins: [ nodeResolve(), babel({ babelHelpers: 'bundled' }), + // Put the Codecov rollup plugin after all other plugins + codecovRollupPlugin({ + enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined, + bundleName: '@tonic-ui/react/dist/esm/index.js', + uploadToken: process.env.CODECOV_TOKEN, + }), ], } ]; diff --git a/yarn.lock b/yarn.lock index 8e7b5de1cb..548b50ba4a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,6 +12,54 @@ __metadata: languageName: node linkType: hard +"@actions/core@npm:^1.10.1": + version: 1.11.1 + resolution: "@actions/core@npm:1.11.1" + dependencies: + "@actions/exec": ^1.1.1 + "@actions/http-client": ^2.0.1 + checksum: 9ac7a3e0b478bfefd862dcb4ddaa1d8c3f9076bb1931d3d280918d1749e7783480c6a009c1b009c8bf5093e2d77d9f4e023d70416145bf246f0071736d4ef839 + languageName: node + linkType: hard + +"@actions/exec@npm:^1.1.1": + version: 1.1.1 + resolution: "@actions/exec@npm:1.1.1" + dependencies: + "@actions/io": ^1.0.1 + checksum: d976e66dd51ab03d76a143da8e1406daa1bcdee06046168e6e0bec681c87a12999eefaad7a81cb81f28e4190610f55a58b8458ae4b82cbaaba13200490f4e8c2 + languageName: node + linkType: hard + +"@actions/github@npm:^6.0.0": + version: 6.0.0 + resolution: "@actions/github@npm:6.0.0" + dependencies: + "@actions/http-client": ^2.2.0 + "@octokit/core": ^5.0.1 + "@octokit/plugin-paginate-rest": ^9.0.0 + "@octokit/plugin-rest-endpoint-methods": ^10.0.0 + checksum: 81831a78377175d8825fc0b94247ff366c0e87ad1dfa48df9b30b8659506f216dcf1e2d3124fcd318839b92c24ba20165e238b3cc11a34db89c69c40825e9ccf + languageName: node + linkType: hard + +"@actions/http-client@npm:^2.0.1, @actions/http-client@npm:^2.2.0": + version: 2.2.3 + resolution: "@actions/http-client@npm:2.2.3" + dependencies: + tunnel: ^0.0.6 + undici: ^5.25.4 + checksum: 5d395df575d30ae599efa10dd715e72944b015e753db61f0a823f737acbb0e99743d4a9f25e812b18ec8cc34f86c73565d075c449e01ffa891577b6595212dde + languageName: node + linkType: hard + +"@actions/io@npm:^1.0.1": + version: 1.1.3 + resolution: "@actions/io@npm:1.1.3" + checksum: 42841ac2b8a7afb29456b9edb5534dbe00148893c794bdbc17d29166847c51c884e2a7c087a489a428250a78e7b54bc761ba3b55eb2f97d9600e9193b60caf0b + languageName: node + linkType: hard + "@adobe/css-tools@npm:^4.3.2": version: 4.3.3 resolution: "@adobe/css-tools@npm:4.3.3" @@ -2265,6 +2313,32 @@ __metadata: languageName: node linkType: hard +"@codecov/bundler-plugin-core@npm:^1.5.1": + version: 1.5.1 + resolution: "@codecov/bundler-plugin-core@npm:1.5.1" + dependencies: + "@actions/core": ^1.10.1 + "@actions/github": ^6.0.0 + chalk: 4.1.2 + semver: ^7.5.4 + unplugin: ^1.10.1 + zod: ^3.22.4 + checksum: 6fa69c804af898e8b069cfc90861627cc0ce587063f01b50a71cc7d2fad85a578b663a2b65a8b609ce2c1c4946a3a6aca7a8551d7ad44c07c406f54fe75793eb + languageName: node + linkType: hard + +"@codecov/rollup-plugin@npm:^1.5.1": + version: 1.5.1 + resolution: "@codecov/rollup-plugin@npm:1.5.1" + dependencies: + "@codecov/bundler-plugin-core": ^1.5.1 + unplugin: ^1.10.1 + peerDependencies: + rollup: 3.x || 4.x + checksum: 27904ee3b4e7ccc11d2232be4d00b5e332ba3e3ef2ae836d8497a95294af5c33fcab10639459352aaf2210dd8fed15ac6a78fd1d5c732a1b7c44abf1ff5f3a56 + languageName: node + linkType: hard + "@commitlint/cli@npm:17.x": version: 17.8.1 resolution: "@commitlint/cli@npm:17.8.1" @@ -2752,6 +2826,13 @@ __metadata: languageName: node linkType: hard +"@fastify/busboy@npm:^2.0.0": + version: 2.1.1 + resolution: "@fastify/busboy@npm:2.1.1" + checksum: 42c32ef75e906c9a4809c1e1930a5ca6d4ddc8d138e1a8c8ba5ea07f997db32210617d23b2e4a85fe376316a41a1a0439fc6ff2dedf5126d96f45a9d80754fb2 + languageName: node + linkType: hard + "@gar/promisify@npm:^1.1.3": version: 1.1.3 resolution: "@gar/promisify@npm:1.1.3" @@ -3619,6 +3700,13 @@ __metadata: languageName: node linkType: hard +"@octokit/auth-token@npm:^4.0.0": + version: 4.0.0 + resolution: "@octokit/auth-token@npm:4.0.0" + checksum: d78f4dc48b214d374aeb39caec4fdbf5c1e4fd8b9fcb18f630b1fe2cbd5a880fca05445f32b4561f41262cb551746aeb0b49e89c95c6dd99299706684d0cae2f + languageName: node + linkType: hard + "@octokit/core@npm:^4.2.1": version: 4.2.4 resolution: "@octokit/core@npm:4.2.4" @@ -3634,6 +3722,21 @@ __metadata: languageName: node linkType: hard +"@octokit/core@npm:^5.0.1": + version: 5.2.0 + resolution: "@octokit/core@npm:5.2.0" + dependencies: + "@octokit/auth-token": ^4.0.0 + "@octokit/graphql": ^7.1.0 + "@octokit/request": ^8.3.1 + "@octokit/request-error": ^5.1.0 + "@octokit/types": ^13.0.0 + before-after-hook: ^2.2.0 + universal-user-agent: ^6.0.0 + checksum: 57d5f02b759b569323dcb76cc72bf94ea7d0de58638c118ee14ec3e37d303c505893137dd72918328794844f35c74b3cd16999319c4b40d410a310d44a9b7566 + languageName: node + linkType: hard + "@octokit/endpoint@npm:^7.0.0": version: 7.0.6 resolution: "@octokit/endpoint@npm:7.0.6" @@ -3645,6 +3748,16 @@ __metadata: languageName: node linkType: hard +"@octokit/endpoint@npm:^9.0.1": + version: 9.0.5 + resolution: "@octokit/endpoint@npm:9.0.5" + dependencies: + "@octokit/types": ^13.1.0 + universal-user-agent: ^6.0.0 + checksum: d5cc2df9bd4603844c163eea05eec89c677cfe699c6f065fe86b83123e34554ec16d429e8142dec1e2b4cf56591ef0ce5b1763f250c87bc8e7bf6c74ba59ae82 + languageName: node + linkType: hard + "@octokit/graphql@npm:^5.0.0": version: 5.0.6 resolution: "@octokit/graphql@npm:5.0.6" @@ -3656,6 +3769,17 @@ __metadata: languageName: node linkType: hard +"@octokit/graphql@npm:^7.1.0": + version: 7.1.0 + resolution: "@octokit/graphql@npm:7.1.0" + dependencies: + "@octokit/request": ^8.3.0 + "@octokit/types": ^13.0.0 + universal-user-agent: ^6.0.0 + checksum: 7b2706796e0269fc033ed149ea211117bcacf53115fd142c1eeafc06ebc5b6290e4e48c03d6276c210d72e3695e8598f83caac556cd00714fc1f8e4707d77448 + languageName: node + linkType: hard + "@octokit/openapi-types@npm:^18.0.0": version: 18.1.1 resolution: "@octokit/openapi-types@npm:18.1.1" @@ -3663,6 +3787,20 @@ __metadata: languageName: node linkType: hard +"@octokit/openapi-types@npm:^20.0.0": + version: 20.0.0 + resolution: "@octokit/openapi-types@npm:20.0.0" + checksum: 23ff7613750f8b5790a0cbed5a2048728a7909e50d726932831044908357a932c7fc0613fb7b86430a49d31b3d03a180632ea5dd936535bfbc1176391a199e96 + languageName: node + linkType: hard + +"@octokit/openapi-types@npm:^22.2.0": + version: 22.2.0 + resolution: "@octokit/openapi-types@npm:22.2.0" + checksum: eca41feac2b83298e0d95e253ac1c5b6d65155ac57f65c5fd8d4a485d9728922d85ff4bee0e815a1f3a5421311db092bdb6da9d6104a1b1843d8b274bcad9630 + languageName: node + linkType: hard + "@octokit/plugin-enterprise-rest@npm:6.0.1": version: 6.0.1 resolution: "@octokit/plugin-enterprise-rest@npm:6.0.1" @@ -3682,6 +3820,17 @@ __metadata: languageName: node linkType: hard +"@octokit/plugin-paginate-rest@npm:^9.0.0": + version: 9.2.1 + resolution: "@octokit/plugin-paginate-rest@npm:9.2.1" + dependencies: + "@octokit/types": ^12.6.0 + peerDependencies: + "@octokit/core": 5 + checksum: 554ad17a7dcfd7028e321ffcae233f8ae7975569084f19d9b6217b47fb182e2604145108de7a9029777e6dc976b27b2dd7387e2e47a77532a72e6c195880576d + languageName: node + linkType: hard + "@octokit/plugin-request-log@npm:^1.0.4": version: 1.0.4 resolution: "@octokit/plugin-request-log@npm:1.0.4" @@ -3691,6 +3840,17 @@ __metadata: languageName: node linkType: hard +"@octokit/plugin-rest-endpoint-methods@npm:^10.0.0": + version: 10.4.1 + resolution: "@octokit/plugin-rest-endpoint-methods@npm:10.4.1" + dependencies: + "@octokit/types": ^12.6.0 + peerDependencies: + "@octokit/core": 5 + checksum: 3e0e95515ccb7fdd5e5cff32a5e34a688fd275c6703caf786f7c49820e2bf2a66e7d845ba4eae4d03c307c1950ea417e34a17055b25b46e2019123b75b394c56 + languageName: node + linkType: hard + "@octokit/plugin-rest-endpoint-methods@npm:^7.1.2": version: 7.2.3 resolution: "@octokit/plugin-rest-endpoint-methods@npm:7.2.3" @@ -3713,6 +3873,17 @@ __metadata: languageName: node linkType: hard +"@octokit/request-error@npm:^5.1.0": + version: 5.1.0 + resolution: "@octokit/request-error@npm:5.1.0" + dependencies: + "@octokit/types": ^13.1.0 + deprecation: ^2.0.0 + once: ^1.4.0 + checksum: 2cdbb8e44072323b5e1c8c385727af6700e3e492d55bc1e8d0549c4a3d9026914f915866323d371b1f1772326d6e902341c872679cc05c417ffc15cadf5f4a4e + languageName: node + linkType: hard + "@octokit/request@npm:^6.0.0": version: 6.2.8 resolution: "@octokit/request@npm:6.2.8" @@ -3727,6 +3898,18 @@ __metadata: languageName: node linkType: hard +"@octokit/request@npm:^8.3.0, @octokit/request@npm:^8.3.1": + version: 8.4.0 + resolution: "@octokit/request@npm:8.4.0" + dependencies: + "@octokit/endpoint": ^9.0.1 + "@octokit/request-error": ^5.1.0 + "@octokit/types": ^13.1.0 + universal-user-agent: ^6.0.0 + checksum: 3d937e817a85c0adf447ab46b428ccd702c31b2091e47adec90583ec2242bd64666306fe8188628fb139aa4752e19400eb7652b0f5ca33cd9e77bbb2c60b202a + languageName: node + linkType: hard + "@octokit/rest@npm:19.0.11": version: 19.0.11 resolution: "@octokit/rest@npm:19.0.11" @@ -3755,6 +3938,24 @@ __metadata: languageName: node linkType: hard +"@octokit/types@npm:^12.6.0": + version: 12.6.0 + resolution: "@octokit/types@npm:12.6.0" + dependencies: + "@octokit/openapi-types": ^20.0.0 + checksum: 850235f425584499a2266d5c585c1c2462ae11e25c650567142f3342cb9ce589c8c8fed87705811ca93271fd28c68e1fa77b88b67b97015d7b63d269fa46ed05 + languageName: node + linkType: hard + +"@octokit/types@npm:^13.0.0, @octokit/types@npm:^13.1.0": + version: 13.6.2 + resolution: "@octokit/types@npm:13.6.2" + dependencies: + "@octokit/openapi-types": ^22.2.0 + checksum: c4e51da1ccabc028b70fc90ca58d65091862a7fe3a65ec2692681f473a0aee4c355abfd15fd547bce3a9800d07c1592603fe84b4223e7beea0d493e4fcc1a65e + languageName: node + linkType: hard + "@octokit/types@npm:^9.0.0, @octokit/types@npm:^9.2.3": version: 9.3.2 resolution: "@octokit/types@npm:9.3.2" @@ -4488,6 +4689,7 @@ __metadata: "@babel/plugin-transform-runtime": ^7.0.0 "@babel/preset-env": ^7.0.0 "@babel/preset-react": ^7.0.0 + "@codecov/rollup-plugin": ^1.5.1 "@emotion/babel-plugin": ^11.10.0 "@emotion/is-prop-valid": 1.x "@emotion/jest": ^11.10.0 @@ -5262,6 +5464,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^8.14.0": + version: 8.14.0 + resolution: "acorn@npm:8.14.0" + bin: + acorn: bin/acorn + checksum: 8755074ba55fff94e84e81c72f1013c2d9c78e973c31231c8ae505a5f966859baf654bddd75046bffd73ce816b149298977fff5077a3033dedba0ae2aad152d4 + languageName: node + linkType: hard + "add-stream@npm:^1.0.0": version: 1.0.0 resolution: "add-stream@npm:1.0.0" @@ -16711,6 +16922,13 @@ __metadata: languageName: node linkType: hard +"tunnel@npm:^0.0.6": + version: 0.0.6 + resolution: "tunnel@npm:0.0.6" + checksum: c362948df9ad34b649b5585e54ce2838fa583aa3037091aaed66793c65b423a264e5229f0d7e9a95513a795ac2bd4cb72cda7e89a74313f182c1e9ae0b0994fa + languageName: node + linkType: hard + "type-check@npm:^0.4.0, type-check@npm:~0.4.0": version: 0.4.0 resolution: "type-check@npm:0.4.0" @@ -16883,6 +17101,15 @@ __metadata: languageName: node linkType: hard +"undici@npm:^5.25.4": + version: 5.28.4 + resolution: "undici@npm:5.28.4" + dependencies: + "@fastify/busboy": ^2.0.0 + checksum: a8193132d84540e4dc1895ecc8dbaa176e8a49d26084d6fbe48a292e28397cd19ec5d13bc13e604484e76f94f6e334b2bdc740d5f06a6e50c44072818d0c19f9 + languageName: node + linkType: hard + "unicode-canonical-property-names-ecmascript@npm:^2.0.0": version: 2.0.0 resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.0" @@ -17147,6 +17374,16 @@ __metadata: languageName: node linkType: hard +"unplugin@npm:^1.10.1": + version: 1.16.0 + resolution: "unplugin@npm:1.16.0" + dependencies: + acorn: ^8.14.0 + webpack-virtual-modules: ^0.6.2 + checksum: 84bff88dd8fd6ba88bd21dad1b170fea2a91f7ff8ddcfadf826297cf77dfe305f3428f1612c0637f30d7ac10d668491f15fdf8f378dd56def370fdbc16edd85e + languageName: node + linkType: hard + "upath@npm:2.0.1": version: 2.0.1 resolution: "upath@npm:2.0.1" @@ -17421,6 +17658,13 @@ __metadata: languageName: node linkType: hard +"webpack-virtual-modules@npm:^0.6.2": + version: 0.6.2 + resolution: "webpack-virtual-modules@npm:0.6.2" + checksum: 7e8e1d63f35864c815420cc2f27da8561a1e028255040698a352717de0ba46d3b3faf16f06c1a1965217054c4c2894eb9af53a85451870e919b5707ce9c5822d + languageName: node + linkType: hard + "whatwg-encoding@npm:^2.0.0": version: 2.0.0 resolution: "whatwg-encoding@npm:2.0.0" @@ -17817,6 +18061,13 @@ __metadata: languageName: node linkType: hard +"zod@npm:^3.22.4": + version: 3.23.8 + resolution: "zod@npm:3.23.8" + checksum: 15949ff82118f59c893dacd9d3c766d02b6fa2e71cf474d5aa888570c469dbf5446ac5ad562bb035bf7ac9650da94f290655c194f4a6de3e766f43febd432c5c + languageName: node + linkType: hard + "zwitch@npm:^2.0.0": version: 2.0.4 resolution: "zwitch@npm:2.0.4"