From 4be9189804cfd347192798f599960aa729b49b67 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Tue, 26 May 2020 18:54:17 -0400 Subject: Switch to GitHub Actions --- .github/workflows/compressed-size.yml | 14 ++++++++++++++ .github/workflows/main.yml | 21 +++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/compressed-size.yml create mode 100644 .github/workflows/main.yml (limited to '.github/workflows') diff --git a/.github/workflows/compressed-size.yml b/.github/workflows/compressed-size.yml new file mode 100644 index 0000000..d346ef8 --- /dev/null +++ b/.github/workflows/compressed-size.yml @@ -0,0 +1,14 @@ +name: Compressed Size + +on: [pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: preactjs/compressed-size-action@v1 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..9d3aacf --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,21 @@ +name: CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm test + env: + CI: true -- cgit v1.2.3 From 7d25805889ccda393e622d3732cc2dc287dc3c15 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Thu, 25 Jun 2020 10:18:18 -0400 Subject: run on push + PR --- .github/workflows/main.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9d3aacf..b758474 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,12 @@ name: CI -on: [push] +on: + pull_request: + branches: + - '**' + push: + branches: + - master jobs: build: -- cgit v1.2.3 From 244cac2aa3d6831774129d6dc4942465dcef8099 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Thu, 9 Jul 2020 15:17:50 -0400 Subject: Move to compressed-size-action v2 (#111) --- .github/workflows/compressed-size.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/compressed-size.yml b/.github/workflows/compressed-size.yml index d346ef8..ed9f872 100644 --- a/.github/workflows/compressed-size.yml +++ b/.github/workflows/compressed-size.yml @@ -9,6 +9,6 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: preactjs/compressed-size-action@v1 + - uses: preactjs/compressed-size-action@v2 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" -- cgit v1.2.3 From ec0aab7de2474b9592c177c19e5c839c74196394 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Wed, 23 Jun 2021 12:47:46 -0400 Subject: update actions for main branch --- .github/workflows/compressed-size.yml | 8 ++------ .github/workflows/main.yml | 28 +++++++++++++--------------- 2 files changed, 15 insertions(+), 21 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/compressed-size.yml b/.github/workflows/compressed-size.yml index ed9f872..958fd22 100644 --- a/.github/workflows/compressed-size.yml +++ b/.github/workflows/compressed-size.yml @@ -4,11 +4,7 @@ on: [pull_request] jobs: build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: preactjs/compressed-size-action@v2 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" + - uses: actions/checkout@v2 + - uses: preactjs/compressed-size-action@v2 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b758474..7b73b7d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,25 +3,23 @@ name: CI on: pull_request: branches: - - '**' + - "**" push: branches: - - master + - main jobs: build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - - name: npm install, build, and test - run: | - npm install - npm run build --if-present - npm test - env: - CI: true + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm test + env: + CI: true -- cgit v1.2.3 From f3990ec5e34477d2fc21644c91a64d7a0bc004c1 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Wed, 23 Jun 2021 16:40:45 -0400 Subject: Add Package Exports configuration (#139) * Add Package Exports configuration (semver major) * Update compressed-size.yml --- .github/workflows/compressed-size.yml | 2 ++ package.json | 14 +++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/compressed-size.yml b/.github/workflows/compressed-size.yml index 958fd22..45cad2f 100644 --- a/.github/workflows/compressed-size.yml +++ b/.github/workflows/compressed-size.yml @@ -8,3 +8,5 @@ jobs: steps: - uses: actions/checkout@v2 - uses: preactjs/compressed-size-action@v2 + with: + pattern: "./dist/*.{js,mjs,cjs}" diff --git a/package.json b/package.json index 666ffe7..767bbca 100644 --- a/package.json +++ b/package.json @@ -2,20 +2,24 @@ "name": "mitt", "version": "2.1.0", "description": "Tiny 200b functional Event Emitter / pubsub.", - "jsnext:main": "dist/mitt.es.js", - "source": "src/index.ts", - "module": "dist/mitt.es.js", - "esmodules": "dist/mitt.modern.js", + "module": "dist/mitt.mjs", "main": "dist/mitt.js", + "jsnext:main": "dist/mitt.mjs", "umd:main": "dist/mitt.umd.js", + "source": "src/index.ts", "typings": "index.d.ts", + "exports": { + "import": "./dist/mitt.mjs", + "require": "./dist/mitt.js", + "default": "./dist/mitt.mjs" + }, "scripts": { "test": "npm-run-all --silent typecheck lint mocha test-types", "mocha": "mocha test", "test-types": "tsc test/test-types-compilation.ts --noEmit --strict", "lint": "eslint src test --ext ts --ext js", "typecheck": "tsc --noEmit", - "bundle": "microbundle", + "bundle": "microbundle -f es,cjs,umd", "build": "npm-run-all --silent clean -p bundle -s docs", "clean": "rimraf dist", "docs": "documentation readme src/index.ts --section API -q --parse-extension ts", -- cgit v1.2.3