From 0497375c05ced878411e24784c6b1de3a76e36b4 Mon Sep 17 00:00:00 2001 From: Luong Minh Date: Wed, 13 Dec 2023 14:41:51 +0700 Subject: [PATCH] update peerdependencies --- package.json | 6 ++++-- pnpm-lock.yaml | 27 +++++++++++++-------------- rollup.config.mjs | 24 ++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index c8cbd67..61eb91c 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "@types/eslint": "^8.44.3", "@types/jest": "^29.5.5", "@types/prettier": "^3.0.0", - "@types/react": "^18.2.41", + "@types/react": ">=16", "@typescript-eslint/eslint-plugin": "^6.7.4", "@typescript-eslint/parser": "^6.7.4", "eslint": "^8.50.0", @@ -37,6 +37,7 @@ "eslint-plugin-prettier": "^5.0.0", "jest": "^29.7.0", "prettier": "^3.0.3", + "react": ">=16", "rollup": "^3.29.4", "rollup-plugin-typescript2": "^0.36.0", "ts-jest": "^29.1.1", @@ -70,6 +71,7 @@ "homepage": "https://github.com/8xff/media-sdk-react#readme", "peerDependencies": { "@8xff/atm0s-media-js": "0.1.3-alpha.3", - "react": ">=15" + "@types/react": ">=16", + "react": ">=16" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 20abbdc..fc78850 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,11 +4,6 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -dependencies: - react: - specifier: '>=15' - version: 18.2.0 - devDependencies: '@8xff/atm0s-media-js': specifier: 0.1.3-alpha.3 @@ -26,8 +21,8 @@ devDependencies: specifier: ^3.0.0 version: 3.0.0 '@types/react': - specifier: ^18.2.41 - version: 18.2.41 + specifier: '>=16' + version: 18.2.45 '@typescript-eslint/eslint-plugin': specifier: ^6.7.4 version: 6.7.4(@typescript-eslint/parser@6.7.4)(eslint@8.50.0)(typescript@5.2.2) @@ -49,6 +44,9 @@ devDependencies: prettier: specifier: ^3.0.3 version: 3.0.3 + react: + specifier: '>=16' + version: 18.2.0 rollup: specifier: ^3.29.4 version: 3.29.4 @@ -912,12 +910,12 @@ packages: resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==} dev: true - /@types/react@18.2.41: - resolution: {integrity: sha512-CwOGr/PiLiNBxEBqpJ7fO3kocP/2SSuC9fpH5K7tusrg4xPSRT/193rzolYwQnTN02We/ATXKnb6GqA5w4fRxw==} + /@types/react@18.2.45: + resolution: {integrity: sha512-TtAxCNrlrBp8GoeEp1npd5g+d/OejJHFxS3OWmrPBMFaVQMSN0OFySozJio5BHxTuTeug00AVXVAjfDSfk+lUg==} dependencies: '@types/prop-types': 15.7.11 '@types/scheduler': 0.16.8 - csstype: 3.1.2 + csstype: 3.1.3 dev: true /@types/scheduler@0.16.8: @@ -1430,8 +1428,8 @@ packages: which: 2.0.2 dev: true - /csstype@3.1.2: - resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} + /csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} dev: true /debug@4.3.4: @@ -2558,6 +2556,7 @@ packages: /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + dev: true /js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} @@ -2669,7 +2668,7 @@ packages: hasBin: true dependencies: js-tokens: 4.0.0 - dev: false + dev: true /lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} @@ -3010,7 +3009,7 @@ packages: engines: {node: '>=0.10.0'} dependencies: loose-envify: 1.4.0 - dev: false + dev: true /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} diff --git a/rollup.config.mjs b/rollup.config.mjs index 3414c74..0314e56 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -39,27 +39,51 @@ const options = { createOutputOptions({ file: './dist/index.js', format: 'commonjs', + globals: { + 'react': 'React', + '@8xff/atm0s-media-js': 'Atm0s', + }, }), createOutputOptions({ file: './dist/index.cjs', format: 'commonjs', + globals: { + 'react': 'React', + '@8xff/atm0s-media-js': 'Atm0s', + }, }), createOutputOptions({ file: './dist/index.mjs', format: 'esm', + globals: { + 'react': 'React', + '@8xff/atm0s-media-js': 'Atm0s', + }, }), createOutputOptions({ file: './dist/index.esm.js', format: 'esm', + globals: { + 'react': 'React', + '@8xff/atm0s-media-js': 'Atm0s', + }, }), createOutputOptions({ file: './dist/index.umd.js', format: 'umd', + globals: { + 'react': 'React', + '@8xff/atm0s-media-js': 'Atm0s', + }, }), createOutputOptions({ file: './dist/index.umd.min.js', format: 'umd', plugins: [terser()], + globals: { + 'react': 'React', + '@8xff/atm0s-media-js': 'Atm0s', + }, }), ], plugins: [