diff --git a/.babelrc.js b/.babelrc.js deleted file mode 100644 index fdf4c83a..00000000 --- a/.babelrc.js +++ /dev/null @@ -1,22 +0,0 @@ -const { BABEL_ENV, NODE_ENV } = process.env; - -module.exports = { - presets: [ - [ - '@babel/env', - { - targets: { - browsers: ['ie >= 11'] - }, - exclude: ['transform-async-to-generator', 'transform-regenerator'], - modules: BABEL_ENV === 'commonjs' ? 'cjs' : false, - loose: true - } - ] - ], - plugins: [ - // don't use `loose` mode here - need to copy symbols when spreading - '@babel/proposal-object-rest-spread', - NODE_ENV === 'test' && '@babel/transform-modules-commonjs' - ].filter(Boolean) -}; diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..5e29be96 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,32 @@ +name: CI +on: + pull_request: + push: + branches: [ master ] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 20 + + - uses: pnpm/action-setup@v2 + with: + version: 8 + + - run: pnpm install + + - run: pnpm format:check + + - run: pnpm lint + + - run: pnpm test + + - uses: codecov/codecov-action@v3 + + - run: pnpm build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..68062dc1 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,43 @@ +name: Version and Release + +on: + workflow_dispatch: + inputs: + newversion: + description: 'Version' + required: true + +concurrency: + group: npm-bump + cancel-in-progress: true + +jobs: + version_and_release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v3 + with: + node-version: 20 + registry-url: 'https://registry.npmjs.org/' + + - uses: pnpm/action-setup@v2 + id: pnpm-install + with: + version: 8 + + - run: pnpm install + + - run: pnpm test + + - uses: bcomnes/npm-bump@v2 + with: + git_email: github-actions@github.com + git_username: github-actions + newversion: ${{ github.event.inputs.newversion }} + push_version_commit: true + github_token: ${{ secrets.GITHUB_TOKEN }} + npm_token: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index 5bad6b0e..9f977c10 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,7 @@ dist .idea *.log package-lock.json + +# System Files +.DS_Store +Thumbs.db diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e7931fff..00000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -node_js: 11 -script: - - yarn format:check - - yarn lint - - yarn test -after_success: - - npx codecov -cache: - directories: - - "$HOME/.npm" diff --git a/README.md b/README.md index cc67c8fa..d9d943c2 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,7 @@ or $ yarn add redux-actions ``` -The [npm](https://www.npmjs.com) package provides a [CommonJS](http://webpack.github.io/docs/commonjs.html) build for use in Node.js, and with bundlers like [Webpack](http://webpack.github.io/) and [Browserify](http://browserify.org/). It also includes an [ES modules](http://jsmodules.io/) build that works well with [Rollup](http://rollupjs.org/) and [Webpack2](https://webpack.js.org)'s tree-shaking. - -The [UMD](https://unpkg.com/redux-actions@latest/dist) build exports a global called `window.ReduxActions` if you add it to your page via a ` - +