Skip to content

Commit

Permalink
chore: rewrite package to esmodules (#117)
Browse files Browse the repository at this point in the history
* chore: change to ECMAScript modules

BREAKING CHANGE: The package won't support CJS anymore.
  • Loading branch information
jwasiak authored Apr 18, 2023
1 parent 262c58b commit 8dd8cc0
Show file tree
Hide file tree
Showing 46 changed files with 4,988 additions and 11,478 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 11,
ecmaVersion: 20,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint'],
Expand Down
52 changes: 4 additions & 48 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
- name: Setup
uses: actions/setup-node@v2
with:
node-version: '16.x'
- uses: actions/cache@v1
node-version: '18.x'
- uses: actions/cache@v2
id: yarn-cache
with:
path: node_modules
Expand All @@ -30,25 +30,14 @@ jobs:
name: Test
runs-on: ubuntu-latest
needs: setup
services:
postgres:
image: postgres:10.8
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup
uses: actions/setup-node@v2
with:
node-version: '16.x'
- uses: actions/cache@v1
node-version: '18.x'
- uses: actions/cache@v2
id: yarn-cache
with:
path: node_modules
Expand All @@ -58,21 +47,8 @@ jobs:
- name: Install
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
- run: yarn run sequelize db:migrate
env:
NODE_ENV: test
POSTGRES_PASSWORD: postgres
POSTGRES_DATABASE: postgres
POSTGRES_USER: postgres
- name: Lint
run: yarn lint
- name: test
run: yarn test
env:
NODE_ENV: test
POSTGRES_PASSWORD: postgres
POSTGRES_DATABASE: postgres
POSTGRES_USER: postgres
- name: Build
run: yarn build
- name: Release
Expand All @@ -82,23 +58,3 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
run: yarn release

notify:
name: Notify
runs-on: ubuntu-latest
if: always()
needs:
- test
- setup
steps:
- uses: technote-space/workflow-conclusion-action@v1
- uses: 8398a7/action-slack@v3
with:
status: ${{ env.WORKFLOW_CONCLUSION }}
fields: repo,message,commit,author,action,eventName,ref,workflow # selectable (default: repo,message)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
if: failure()


2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"semantic-release-slack-bot",
{
"notifyOnSuccess": true,
"notifyOnFail": true
"notifyOnFail": false
}
]
]
Expand Down
5 changes: 0 additions & 5 deletions .sequelizerc

This file was deleted.

8 changes: 0 additions & 8 deletions .tav.yml

This file was deleted.

2 changes: 1 addition & 1 deletion commitlint.config.js → commitlint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module.exports = {
extends: [
'@commitlint/config-conventional',
],
}
};
11 changes: 0 additions & 11 deletions config/config.js

This file was deleted.

1 change: 0 additions & 1 deletion example-app/.adminbro/.entry.js

This file was deleted.

7 changes: 0 additions & 7 deletions example-app/.adminbro/bundle.js

This file was deleted.

4 changes: 0 additions & 4 deletions example-app/.env-example

This file was deleted.

3 changes: 0 additions & 3 deletions example-app/cypress.json

This file was deleted.

5 changes: 0 additions & 5 deletions example-app/cypress/fixtures/example.json

This file was deleted.

9 changes: 0 additions & 9 deletions example-app/cypress/integration/example.spec.ts

This file was deleted.

22 changes: 0 additions & 22 deletions example-app/cypress/plugins/index.js

This file was deleted.

25 changes: 0 additions & 25 deletions example-app/cypress/support/commands.js

This file was deleted.

20 changes: 0 additions & 20 deletions example-app/cypress/support/index.js

This file was deleted.

13 changes: 0 additions & 13 deletions example-app/docker-compose.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions example-app/package.json

This file was deleted.

23 changes: 0 additions & 23 deletions example-app/src/comments/comment.entity.ts

This file was deleted.

36 changes: 0 additions & 36 deletions example-app/src/connect.ts

This file was deleted.

42 changes: 0 additions & 42 deletions example-app/src/index.ts

This file was deleted.

Loading

0 comments on commit 8dd8cc0

Please sign in to comment.