diff --git a/package.json b/package.json index 81aac43e..2e7e1915 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "powership", - "version": "2.3.1-beta.3", + "version": "2.3.1", "private": true, "scripts": { "pack": "run-s pack:*", diff --git a/packages/accounts/package.json b/packages/accounts/package.json index 7a8869d1..bd469692 100644 --- a/packages/accounts/package.json +++ b/packages/accounts/package.json @@ -1,9 +1,20 @@ { "name": "@powership/accounts", - "version": "2.3.1-beta.3", + "version": "2.3.1", "description": "Powership accounts", - "main": "out/index.js", - "typings": "out/index.d.ts", + "type": "module", + "main": "./out/index.js", + "module": "./out/module/index.js", + "types": "./out/index.d.ts", + "exports": { + "types": "./out/index.d.ts", + "import": "./out/module/index.js", + "require": "./out/index.js" + }, + "browser": { + "out/module/index.js": "./out/browser/module/index.js", + "out/index.js": "./out/browser/index.js" + }, "sideEffects": false, "license": "MIT", "scripts": { @@ -15,10 +26,10 @@ "fix:lint": "eslint src --ext .ts --fix", "prepublishOnly": "run-s build fix && run-p test", "build-targets": "run-p build:*", - "build:node": "TARGET=node npm run babild -- --out-dir out", + "build:node": "TARGET=node npm run babild -- --out-xdir out", "build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module", "declarations": "tsc -p tsconfig.declarations.json", - "babild": "babel 'src' --extensions '.ts,.tsx'" + "babild": "babel 'src' --extensions '.ts,.tsx' --source-maps=true --ignore '**/__tests__'" }, "files": [ "package.json", diff --git a/packages/babel-plugins/package.json b/packages/babel-plugins/package.json index f16c6364..da0bd438 100644 --- a/packages/babel-plugins/package.json +++ b/packages/babel-plugins/package.json @@ -1,6 +1,6 @@ { "name": "@powership/babel-plugins", - "version": "2.3.1-beta.3", + "version": "2.3.1", "main": "out", "sideEffects": false, "typings": "out", diff --git a/packages/boilerplate/package.json b/packages/boilerplate/package.json index 4581eeb9..53c8d4e1 100644 --- a/packages/boilerplate/package.json +++ b/packages/boilerplate/package.json @@ -1,6 +1,6 @@ { "name": "@powership/boilerplate", - "version": "2.3.1-beta.3", + "version": "2.3.1", "main": "out/index.js", "module": "out/module/index.js", "author": "antoniopresto ", diff --git a/packages/deepstate/package.json b/packages/deepstate/package.json index 58bb9c39..b96c116c 100644 --- a/packages/deepstate/package.json +++ b/packages/deepstate/package.json @@ -1,6 +1,6 @@ { "name": "@powership/deepstate", - "version": "2.3.1-beta.3", + "version": "2.3.1", "main": "out/index.js", "module": "out/module/index.js", "sideEffects": false, diff --git a/packages/entity/package.json b/packages/entity/package.json index ceb99ab9..8a77daf4 100644 --- a/packages/entity/package.json +++ b/packages/entity/package.json @@ -1,13 +1,20 @@ { "name": "@powership/entity", - "version": "2.3.1-beta.3", - "main": "out/index.js", - "module": "out/module/index.js", + "version": "2.3.1", + "type": "module", + "main": "./out/index.js", + "module": "./out/module/index.js", + "types": "./out/index.d.ts", + "exports": { + "types": "./out/index.d.ts", + "import": "./out/module/index.js", + "require": "./out/index.js" + }, "author": "antoniopresto ", "license": "MIT", "sideEffects": false, "scripts": { - "test": "jest --runInBand", + "test": "jest", "build": "run-s clear && run-p declarations build:*", "clear": "rimraf out", "fix": "run-s fix:* ", @@ -18,7 +25,7 @@ "build:node": "TARGET=node npm run babild -- --out-dir out", "build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module", "declarations": "tsc -p tsconfig.declarations.json", - "babild": "babel 'src' --extensions '.ts,.tsx'" + "babild": "babel 'src' --extensions '.ts,.tsx' --source-maps=true --ignore '**/__tests__'" }, "description": "Powership db", "repository": { diff --git a/packages/helpers/package.json b/packages/helpers/package.json index 9bfac254..8c6a97b8 100644 --- a/packages/helpers/package.json +++ b/packages/helpers/package.json @@ -1,8 +1,19 @@ { "name": "@powership/helpers", - "version": "2.3.1-beta.3", - "main": "out/index.js", - "module": "out/module/index.js", + "version": "2.3.1", + "type": "module", + "main": "./out/index.js", + "module": "./out/module/index.js", + "types": "./out/index.d.ts", + "exports": { + "types": "./out/index.d.ts", + "import": "./out/module/index.js", + "require": "./out/index.js" + }, + "browser": { + "out/module/index.js": "./out/browser/module/index.js", + "out/index.js": "./out/browser/index.js" + }, "author": "antoniopresto ", "license": "MIT", "sideEffects": false, @@ -15,10 +26,11 @@ "fix:lint": "eslint src --ext .ts --fix", "prepublishOnly": "run-s build fix && run-p test", "build-targets": "run-p build:*", + "build:module-browser": "TARGET=module-browser npm run babild -- --out-dir out/browser/module", "build:node": "TARGET=node npm run babild -- --out-dir out", "build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module", "declarations": "tsc -p tsconfig.declarations.json", - "babild": "babel 'src' --extensions '.ts,.tsx'" + "babild": "babel 'src' --extensions '.ts,.tsx' --source-maps=true --ignore '**/__tests__'" }, "description": "Powership server-utils", "repository": { diff --git a/packages/logstorm/package.json b/packages/logstorm/package.json index ecce5e12..b99d249b 100644 --- a/packages/logstorm/package.json +++ b/packages/logstorm/package.json @@ -1,12 +1,23 @@ { "name": "logstorm", - "version": "2.3.1-beta.3", + "version": "2.3.1", "typings": "out", "author": "antoniopresto ", - "license": "MIT", - "main": "out/index.js", - "module": "out/module/index.js", + "type": "module", + "main": "./out/index.js", + "module": "./out/module/index.js", + "types": "./out/index.d.ts", + "exports": { + "types": "./out/index.d.ts", + "import": "./out/module/index.js", + "require": "./out/index.js" + }, + "browser": { + "out/module/index.js": "./out/browser/module/index.js", + "out/index.js": "./out/browser/index.js" + }, "sideEffects": false, + "license": "MIT", "scripts": { "test": "echo ok", "build": "run-s clear && run-p declarations build:*", @@ -18,8 +29,8 @@ "build-targets": "run-p build:*", "build:node": "TARGET=node npm run babild -- --out-dir out", "build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module", - "declarations": "tsc -p tsconfig.json", - "babild": "babel 'src' --extensions '.ts' --source-maps=true --ignore '**/__tests__'" + "declarations": "tsc -p tsconfig.declarations.json", + "babild": "babel 'src' --extensions '.ts,.tsx' --source-maps=true --ignore '**/__tests__'" }, "description": "run command in each package", "keywords": [], diff --git a/packages/logstorm/tsconfig.declarations.json b/packages/logstorm/tsconfig.declarations.json new file mode 100644 index 00000000..fc516d2f --- /dev/null +++ b/packages/logstorm/tsconfig.declarations.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.prod.json", + "compilerOptions": { + "emitDeclarationOnly": true + }, + "exclude": [ + "node_modules/**" + ] +} diff --git a/packages/logstorm/tsconfig.json b/packages/logstorm/tsconfig.json index d899a7d8..0dd6bce4 100644 --- a/packages/logstorm/tsconfig.json +++ b/packages/logstorm/tsconfig.json @@ -2,8 +2,9 @@ "compilerOptions": { "outDir": "out", "rootDir": "src", + "paths": {}, "baseUrl": ".", - "lib": ["es5", "es6", "es7", "esnext", "dom", "es2020"], + "lib": ["es5", "es6", "es7", "esnext", "dom"], "declaration": true, "target": "es5", "removeComments": false, @@ -12,13 +13,14 @@ "resolveJsonModule": true, "strict": true, "skipLibCheck": true, - "strictPropertyInitialization": true, + "strictPropertyInitialization": true, "forceConsistentCasingInFileNames": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noImplicitReturns": false, "noFallthroughCasesInSwitch": true, "downlevelIteration": true, + "isolatedModules": true, "noImplicitAny": false }, "include": ["./src/**/*"] diff --git a/packages/logstorm/tsconfig.lint.json b/packages/logstorm/tsconfig.lint.json new file mode 100644 index 00000000..c16309be --- /dev/null +++ b/packages/logstorm/tsconfig.lint.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "noUnusedLocals": true, + "noUnusedParameters": true + }, + "exclude": ["node_modules/**"] +} diff --git a/packages/logstorm/tsconfig.module.json b/packages/logstorm/tsconfig.module.json index d157afb0..45e474ab 100644 --- a/packages/logstorm/tsconfig.module.json +++ b/packages/logstorm/tsconfig.module.json @@ -1,11 +1,14 @@ { - "extends": "./tsconfig", + "extends": "./tsconfig.prod.json", "compilerOptions": { "target": "esnext", "outDir": "out/module", - "module": "esnext" + "module": "esnext", + "noUnusedLocals": true, + "noUnusedParameters": true }, "exclude": [ - "node_modules/**" + "node_modules/**", // + "**/*/__tests__/*" ] } diff --git a/packages/logstorm/tsconfig.prod.json b/packages/logstorm/tsconfig.prod.json new file mode 100644 index 00000000..1e7d536c --- /dev/null +++ b/packages/logstorm/tsconfig.prod.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "noUnusedLocals": true, + "noUnusedParameters": true + }, + "exclude": [ + "node_modules/**", + "**/*/__tests__/*" + ] +} diff --git a/packages/mongo/package.json b/packages/mongo/package.json index e3f8ebba..bbb2cd62 100644 --- a/packages/mongo/package.json +++ b/packages/mongo/package.json @@ -1,11 +1,17 @@ { "name": "@powership/mongo", - "version": "2.3.1-beta.3", - "main": "out/index.js", - "module": "out/module/index.js", - "author": "antoniopresto ", - "license": "MIT", + "version": "2.3.1", + "type": "module", + "main": "./out/index.js", + "module": "./out/module/index.js", + "types": "./out/index.d.ts", + "exports": { + "types": "./out/index.d.ts", + "import": "./out/module/index.js", + "require": "./out/index.js" + }, "sideEffects": false, + "license": "MIT", "scripts": { "test": "jest", "build": "run-s clear && run-p declarations build:*", @@ -18,7 +24,7 @@ "build:node": "TARGET=node npm run babild -- --out-dir out", "build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module", "declarations": "tsc -p tsconfig.declarations.json", - "babild": "babel 'src' --extensions '.ts,.tsx'" + "babild": "babel 'src' --extensions '.ts,.tsx' --source-maps=true --ignore '**/__tests__'" }, "description": "Powership mongo", "repository": { diff --git a/packages/powership/package.json b/packages/powership/package.json index 13d31a41..0b0216af 100644 --- a/packages/powership/package.json +++ b/packages/powership/package.json @@ -1,14 +1,21 @@ { "name": "powership", - "version": "2.3.1-beta.3", - "main": "out/index.js", - "module": "out/module/index.js", + "version": "2.3.1", + "author": "antoniopresto ", + "type": "module", + "main": "./out/index.js", + "module": "./out/module/index.js", + "types": "./out/index.d.ts", + "exports": { + "types": "./out/index.d.ts", + "import": "./out/module/index.js", + "require": "./out/index.js" + }, "browser": { "out/module/index.js": "./out/browser/module/index.js", "out/index.js": "./out/browser/index.js" }, "sideEffects": false, - "author": "antoniopresto ", "license": "MIT", "scripts": { "test": "jest", @@ -22,6 +29,7 @@ "build:browser": "TARGET=browser npm run babild -- --out-dir out/browser", "build:module-browser": "TARGET=module-browser npm run babild -- --out-dir out/browser/module", "build:node": "TARGET=node npm run babild -- --out-dir out", + "build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module", "declarations": "tsc -p tsconfig.declarations.json", "babild": "babel 'src' --extensions '.ts,.tsx' --source-maps=true --ignore '**/__tests__'" }, diff --git a/packages/runmate/package.json b/packages/runmate/package.json index 2a723204..7bc63765 100644 --- a/packages/runmate/package.json +++ b/packages/runmate/package.json @@ -1,6 +1,6 @@ { "name": "runmate", - "version": "2.3.1-beta.3", + "version": "2.3.1", "typings": "out", "author": "antoniopresto ", "license": "MIT", @@ -22,8 +22,8 @@ "build-targets": "run-p build:*", "build:node": "TARGET=node npm run babild -- --out-dir out", "build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module", - "declarations": "tsc -p tsconfig.json", - "babild": "babel 'src' --extensions '.ts' --source-maps=true --ignore '**/__tests__'" + "declarations": "tsc -p tsconfig.declarations.json", + "babild": "babel 'src' --extensions '.ts,.tsx' --source-maps=true --ignore '**/__tests__'" }, "description": "run command in each package", "keywords": [], diff --git a/packages/schema/package.json b/packages/schema/package.json index 456b5bd8..5dc81033 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -1,13 +1,20 @@ { "name": "@powership/schema", - "version": "2.3.1-beta.3", - "main": "out/index.js", - "module": "out/module/index.js", - "sideEffects": false, + "version": "2.3.1", + "type": "module", + "main": "./out/index.js", + "module": "./out/module/index.js", + "types": "./out/index.d.ts", + "exports": { + "types": "./out/index.d.ts", + "import": "./out/module/index.js", + "require": "./out/index.js" + }, "browser": { "out/module/index.js": "./out/browser/module/index.js", "out/index.js": "./out/browser/index.js" }, + "sideEffects": false, "author": "antoniopresto ", "license": "MIT", "scripts": { diff --git a/packages/server/package.json b/packages/server/package.json index cd00cd2a..61ce1a3b 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,15 +1,22 @@ { "name": "@powership/server", - "version": "2.3.1-beta.3", - "main": "out/index.js", - "module": "out/module/index.js", - "sideEffects": false, + "version": "2.3.1", + "type": "module", + "main": "./out/index.js", + "module": "./out/module/index.js", + "types": "./out/index.d.ts", + "exports": { + "types": "./out/index.d.ts", + "import": "./out/module/index.js", + "require": "./out/index.js" + }, "browser": { "out/module/index.js": "./out/browser/module/index.js", "out/index.js": "./out/browser/index.js" }, - "author": "antoniopresto ", + "sideEffects": false, "license": "MIT", + "author": "antoniopresto ", "scripts": { "test": "echo TODO", "ts": "tsc --noEmit", @@ -21,7 +28,6 @@ "prepublishOnly": "run-p build fix && run-p test", "build-targets": "run-p build:*", "build:browser": "TARGET=browser npm run babild -- --out-dir out/browser", - "build:module-browser": "TARGET=module-browser npm run babild -- --out-dir out/browser/module", "build:node": "TARGET=node npm run babild -- --out-dir out", "build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module", "declarations": "tsc -p tsconfig.declarations.json", diff --git a/packages/transporter/package.json b/packages/transporter/package.json index 8baff13b..0d91f771 100644 --- a/packages/transporter/package.json +++ b/packages/transporter/package.json @@ -1,13 +1,24 @@ { "name": "@powership/transporter", - "version": "2.3.1-beta.3", - "main": "out/index.js", + "version": "2.3.1", + "type": "module", + "main": "./out/index.js", + "module": "./out/module/index.js", + "types": "./out/index.d.ts", + "exports": { + "types": "./out/index.d.ts", + "import": "./out/module/index.js", + "require": "./out/index.js" + }, + "browser": { + "out/module/index.js": "./out/browser/module/index.js", + "out/index.js": "./out/browser/index.js" + }, "sideEffects": false, - "module": "out/module/index.js", "author": "antoniopresto ", "license": "MIT", "scripts": { - "test": "jest --runInBand", + "test": "jest", "build": "run-s clear && run-p declarations build:*", "clear": "rimraf out", "fix": "run-s fix:* ", @@ -18,7 +29,7 @@ "build:node": "TARGET=node npm run babild -- --out-dir out", "build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module", "declarations": "tsc -p tsconfig.declarations.json", - "babild": "babel 'src' --extensions '.ts,.tsx'" + "babild": "babel 'src' --extensions '.ts,.tsx' --source-maps=true --ignore '**/__tests__'" }, "description": "Powership db", "repository": { diff --git a/packages/utils/package.json b/packages/utils/package.json index 0fb7908b..05298688 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,12 +1,18 @@ { "name": "@powership/utils", - "version": "2.3.1-beta.3", + "version": "2.3.1", "typings": "out", "author": "antoniopresto ", "license": "MIT", - "main": "out/index.js", - "module": "out/module/index.js", - "sideEffects": false, + "type": "module", + "main": "./out/index.cjs", + "module": "./out/module/index.js", + "types": "./out/index.d.ts", + "exports": { + "types": "./out/index.d.ts", + "import": "./out/module/index.js", + "require": "./out/index.js" + }, "browser": { "out/module/index.js": "./out/browser/module/index.js", "out/index.js": "./out/browser/index.js" diff --git a/turbo.json b/turbo.json index 07fcbcdb..9e0c0407 100644 --- a/turbo.json +++ b/turbo.json @@ -2,6 +2,9 @@ "$schema": "https://turbo.build/schema.json", "globalDependencies": ["**/.env.*local"], "pipeline": { + "prepublishOnly": { + "dependsOn": ["^build"] + }, "build": { "dependsOn": ["^build"], "outputs": ["dist/**", "lib/**", "public/dist/**"]