diff --git a/.github/workflows/linear-export.yml b/.github/workflows/linear-export.yml deleted file mode 100644 index eb3efd3..0000000 --- a/.github/workflows/linear-export.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Export to linear - -on: - issues: - types: [labeled] - pull_request: - types: [labeled] - -jobs: - trigger: - if: github.event.label.name == 'linear' - name: Export to linear - runs-on: ubuntu-latest - steps: - # - uses: hmarr/debug-action@v2 - - name: Linear action - uses: shilman/linear-action@v1 - with: - ghIssueNumber: ${{ github.event.number || github.event.issue.number }} - ghRepoOwner: ${{ github.event.repository.owner.login }} - ghRepoName: ${{ github.event.repository.name }} - ghToken: ${{ secrets.LINEAR_GH_TOKEN }} - linearIssuePrefix: Jest - linearLabel: Storybook - linearPRLabel: PR - linearTeam: SB - linearApiKey: ${{ secrets.LINEAR_API_KEY }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd8a6d3..979ea42 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,10 +12,10 @@ jobs: - name: Prepare repository run: git fetch --unshallow --tags - - name: Use Node.js 14.x + - name: Use Node.js 16.x uses: actions/setup-node@v1 with: - node-version: 14.x + node-version: 16.x - name: Install dependencies run: yarn diff --git a/package.json b/package.json index b4ead7b..85a1b24 100644 --- a/package.json +++ b/package.json @@ -6,38 +6,40 @@ "type": "git", "url": "https://github.com/storybookjs/jest.git" }, - "scripts": { - "build": "tsup ./src/index.ts --format cjs,esm --dts", - "prerelease": "yarn build", - "release": "auto shipit" - }, + "license": "MIT", + "author": "yannbf@gmail.com", "main": "./dist/index.js", "module": "./dist/index.mjs", - "license": "MIT", + "types": "./dist/index.d.ts", "files": [ "dist/**/*" ], - "types": "./dist/index.d.ts", - "publishConfig": { - "access": "public" + "scripts": { + "build": "tsup", + "prerelease": "yarn build", + "release": "auto shipit" }, + "sideEffects": false, "dependencies": { "@storybook/expect": "storybook-jest", - "@storybook/instrumenter": "future", "@testing-library/jest-dom": "^5.16.2", "jest-mock": "^27.3.0" }, "devDependencies": { "@auto-it/first-time-contributor": "^10.37.6", - "tsup": "^5.12.0", "@auto-it/released": "^10.37.6", + "@storybook/instrumenter": "future", "@storybook/linter-config": "^3.1.2", "@types/react": "*", "auto": "^10.37.6", + "util": "^0.12.5", "expect": "^27.3.1", + "tsup": "^5.12.0", "typescript": "^5.0.4" }, - "author": "yannbf@gmail.com", + "publishConfig": { + "access": "public" + }, "auto": { "prereleaseBranches": [ "next", diff --git a/tsup.config.ts b/tsup.config.ts new file mode 100644 index 0000000..d46ebef --- /dev/null +++ b/tsup.config.ts @@ -0,0 +1,23 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig( + { + entry: ['./src/index.ts'], + format: ['cjs', 'esm'], + esbuildOptions(options, context) { + Object.assign(options, { + platform: 'browser', + logLevel: 'error', + legalComments: 'none', + minifyWhitespace: false, + minifyIdentifiers: false, + minifySyntax: true, + }) + }, + shims: false, + dts: { + entry: ['./src/index.ts'], + resolve: true, + }, + } +);