diff --git a/.github/workflows/test-multiple-builds.yml b/.github/workflows/test-multiple-builds.yml index 1243e6ea41..393b7a6cc9 100644 --- a/.github/workflows/test-multiple-builds.yml +++ b/.github/workflows/test-multiple-builds.yml @@ -26,22 +26,22 @@ jobs: - name: Patch for DEV-ONLY if: ${{ matrix.env == 'development' }} run: | - sed -i~ -e "s/it[.a-zA-Z]*('\[DEV-ONLY\]/it('/" tests/*.tsx - sed -i~ -e "s/it[.a-zA-Z]*('\[PRD-ONLY\]/it.skip('/" tests/*.tsx + sed -i~ "s/it[.a-zA-Z]*('\[DEV-ONLY\]/it('/" tests/*.tsx + sed -i~ "s/it[.a-zA-Z]*('\[PRD-ONLY\]/it.skip('/" tests/*.tsx - name: Patch for PRD-ONLY if: ${{ matrix.env == 'production' }} run: | - sed -i~ -e "s/it[.a-zA-Z]*('\[PRD-ONLY\]/it('/" tests/*.tsx - sed -i~ -e "s/it[.a-zA-Z]*('\[DEV-ONLY\]/it.skip('/" tests/*.tsx + sed -i~ "s/it[.a-zA-Z]*('\[PRD-ONLY\]/it('/" tests/*.tsx + sed -i~ "s/it[.a-zA-Z]*('\[DEV-ONLY\]/it.skip('/" tests/*.tsx - name: Patch for CJS if: ${{ matrix.build == 'cjs' }} run: | - sed -i~ "s/\/src\(.*\)\.ts/\/dist\1.js/" package.jsonx + sed -i~ "s/\/src\(.*\)\.ts/\/dist\1.js/" package.json - name: Patch for ESM if: ${{ matrix.build == 'esm' }} run: | - sed -i~ -e "s/\/src\(.*\)\.ts/\/dist\/esm\1.js/" package.json - sed -i~ -e "1s/^/import.meta.env=import.meta.env||{};import.meta.env.MODE='${NODE_ENV}';/" tests/*.tsx + sed -i~ "s/\/src\(.*\)\.ts/\/dist\/esm\1.js/" package.json + sed -i~ "1s/^/import.meta.env=import.meta.env||{};import.meta.env.MODE='${NODE_ENV}';/" tests/*.tsx env: NODE_ENV: ${{ matrix.env }} - name: Test ${{ matrix.build }} ${{ matrix.env }} diff --git a/.github/workflows/test-old-typescript.yml b/.github/workflows/test-old-typescript.yml index f5bacfeb7e..2f43e7897c 100644 --- a/.github/workflows/test-old-typescript.yml +++ b/.github/workflows/test-old-typescript.yml @@ -33,11 +33,11 @@ jobs: - run: yarn build - name: Patch for Old TS run: | - sed -i~ -e 's/"moduleResolution": "bundler",/"moduleResolution": "node",/' tsconfig.json - sed -i~ -e 's/"allowImportingTsExtensions": true,//' tsconfig.json - sed -i~ -e 's/"zustand": \["\.\/src\/index\.ts"\],/"zustand": [".\/dist\/index.d.ts"],/' tsconfig.json - sed -i~ -e 's/"zustand\/\*": \["\.\/src\/\*\.ts"\]/"zustand\/*": [".\/dist\/*.d.ts"]/' tsconfig.json - sed -i~ -e 's/"include": .*/"include": ["src\/types.d.ts", "dist\/**\/*", "tests\/**\/*"],/' tsconfig.json + sed -i~ 's/"moduleResolution": "bundler",/"moduleResolution": "node",/' tsconfig.json + sed -i~ 's/"allowImportingTsExtensions": true,//' tsconfig.json + sed -i~ 's/"zustand": \["\.\/src\/index\.ts"\],/"zustand": [".\/dist\/index.d.ts"],/' tsconfig.json + sed -i~ 's/"zustand\/\*": \["\.\/src\/\*\.ts"\]/"zustand\/*": [".\/dist\/*.d.ts"]/' tsconfig.json + sed -i~ 's/"include": .*/"include": ["src\/types.d.ts", "dist\/**\/*", "tests\/**\/*"],/' tsconfig.json - name: Test ${{ matrix.typescript }} run: | yarn add -D typescript@${{ matrix.typescript }}