Skip to content

Commit

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

BREAKING CHANGE: The package won't support CJS anymore.
  • Loading branch information
dziraf authored Apr 18, 2023
1 parent 353f543 commit b2aca34
Show file tree
Hide file tree
Showing 22 changed files with 7,502 additions and 7,150 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 11,
ecmaVersion: 20,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint'],
Expand Down Expand Up @@ -41,5 +41,11 @@ module.exports = {
'react/jsx-props-no-spreading': 'off',
},
},
{
files: ['*.spec.ts'],
rules: {
'import/no-extraneous-dependencies': 'off',
},
},
],
};
12 changes: 6 additions & 6 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
- name: Setup
uses: actions/setup-node@v2
with:
node-version: '14'
- uses: actions/cache@v1
node-version: '18'
- uses: actions/cache@v2
id: yarn-cache
with:
path: node_modules
Expand Down Expand Up @@ -46,8 +46,8 @@ jobs:
- name: Setup
uses: actions/setup-node@v2
with:
node-version: '14'
- uses: actions/cache@v1
node-version: '18'
- uses: actions/cache@v2
id: yarn-cache
with:
path: node_modules
Expand All @@ -74,8 +74,8 @@ jobs:
- name: Setup
uses: actions/setup-node@v2
with:
node-version: '14'
- uses: actions/cache@v1
node-version: '18'
- uses: actions/cache@v2
id: yarn-cache
with:
path: node_modules
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ example-app/
src/
package-lock\.json
*.db
docker-compose.yml
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
File renamed without changes.
17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3.7'

services:
prisma_test_app:
container_name: prisma_test_app
image: postgres
environment:
- POSTGRES_DB=adminjs
- POSTGRES_USER=adminjs
- POSTGRES_PASSWORD=adminjs
ports:
- "5432:5432"
volumes:
- prisma_test_app:/var/lib/postgresql/data

volumes:
prisma_test_app:
33 changes: 16 additions & 17 deletions example-app/package.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
{
"name": "example-app",
"version": "1.0.0",
"main": "index.js",
"type": "module",
"license": "MIT",
"scripts": {
"build": "tsc",
"start": "dotenv -e .env -- node build/index.js"
},
"devDependencies": {
"@types/express": "^4.17.7",
"@types/node": "^8.0.29",
"concurrently": "^5.2.0",
"dotenv-cli": "^4.0.0",
"nodemon": "^2.0.4",
"prisma": "^3.2.1",
"ts-node": "3.3.0",
"typescript": "^4.4.4"
"@types/express": "^4.17.17",
"@types/node": "^18",
"dotenv-cli": "^7.0.0",
"prisma": "^4.11.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.5"
},
"dependencies": {
"@adminjs/express": "^4.0.0",
"@adminjs/prisma": "^1.0.0",
"@prisma/client": "^3.2.1",
"adminjs": "^5.0.0",
"express": "^4.17.1",
"@adminjs/express": "^5.1.0",
"@adminjs/prisma": "^3.0.1",
"@prisma/client": "^4.11.0",
"adminjs": "^6.8.7",
"express": "^4.18.2",
"express-formidable": "^1.2.0",
"express-session": "^1.17.1",
"pg": "^8.3.0",
"reflect-metadata": "^0.1.10"
"express-session": "^1.17.3",
"pg": "^8.10.0",
"reflect-metadata": "^0.1.13",
"tslib": "^2.5.0"
}
}
10 changes: 3 additions & 7 deletions example-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,21 @@
"compilerOptions": {
"baseUrl": ".",
"outDir": "./build",
"target": "es6",
"target": "esnext",
"lib": ["esnext"],
"esModuleInterop": true,
"jsx": "react",
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"noImplicitThis": true,
"moduleResolution": "node",
"module": "commonjs",
"moduleResolution": "nodenext",
"module": "nodenext",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false,
"strict": true,
"sourceMap": true,
"paths": {
"react": ["node_modules/@types/react"],
"adminjs": ["node_modules/adminjs"]
},
"skipLibCheck": true
},
"include": [
Expand Down
Loading

0 comments on commit b2aca34

Please sign in to comment.