diff --git a/.gitignore b/.gitignore index 7fa39d066..3bbe6ab78 100644 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,6 @@ packages/*/package-lock.json schema.json .DS_Store .eslintcache +.turbo build/ diff --git a/package.json b/package.json index be9c80150..b8096d5c8 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "scripts": { "start": "lerna exec -- pnpm run start", "clean": "lerna run clean; rm -rf node_modules; rm -rf packages/**/node_modules;", - "compile": "lerna run compile", + "compile": "turbo run compile", "publish": "lerna publish", "publish:canary": "pnpm run publish -- --canary", "test": "pnpm run test:lint && pnpm run compile && pnpm run coverage", @@ -53,6 +53,19 @@ "automerge": false } }, + "turbo": { + "baseBranch": "origin/master", + "pipeline": { + "compile": { + "dependsOn": [ + "^compile" + ], + "outputs": [ + "lib/**" + ] + } + } + }, "repository": { "type": "git", "url": "https://github.com/js-accounts/accounts" @@ -71,6 +84,7 @@ "lerna": "4.0.0", "lint-staged": "12.0.2", "prettier": "2.4.1", + "turbo": "1.0.19", "typescript": "4.5.2" }, "collective": { diff --git a/packages/database-tests/tsconfig.json b/packages/database-tests/tsconfig.json index 91b839b3e..bf89cfae4 100644 --- a/packages/database-tests/tsconfig.json +++ b/packages/database-tests/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "outDir": "./lib", "target": "esnext", - "importHelpers": true + "importHelpers": true, + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/packages/database-typeorm/tsconfig.json b/packages/database-typeorm/tsconfig.json index 24b7d700f..12f4a9b81 100644 --- a/packages/database-typeorm/tsconfig.json +++ b/packages/database-typeorm/tsconfig.json @@ -4,7 +4,8 @@ "emitDecoratorMetadata": true, "experimentalDecorators": true, "outDir": "./lib", - "importHelpers": true + "importHelpers": true, + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/packages/e2e/tsconfig.json b/packages/e2e/tsconfig.json index ea4603c63..cfc85fafc 100644 --- a/packages/e2e/tsconfig.json +++ b/packages/e2e/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "rootDir": "./src", "outDir": "./lib", - "importHelpers": true + "importHelpers": true, + "typeRoots": ["./node_modules/@types/"] } } diff --git a/packages/error/tsconfig.json b/packages/error/tsconfig.json index 24fad94f0..4ec63ea58 100644 --- a/packages/error/tsconfig.json +++ b/packages/error/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "outDir": "./lib", - "importHelpers": true + "importHelpers": true, + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/packages/express-session/package.json b/packages/express-session/package.json index 36ada1501..f3834ddae 100644 --- a/packages/express-session/package.json +++ b/packages/express-session/package.json @@ -43,6 +43,7 @@ "@types/express-session": "1.17.4", "@types/jest": "27.0.2", "@types/lodash": "4.14.177", + "@types/node": "16.11.7", "@types/request-ip": "0.0.37", "express": "4.17.1", "express-session": "1.17.2", diff --git a/packages/express-session/tsconfig.json b/packages/express-session/tsconfig.json index 848b9b224..c96e799a1 100644 --- a/packages/express-session/tsconfig.json +++ b/packages/express-session/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "./lib", - "importHelpers": true + "importHelpers": true, + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/packages/graphql-api/tsconfig.json b/packages/graphql-api/tsconfig.json index 24fad94f0..4ec63ea58 100644 --- a/packages/graphql-api/tsconfig.json +++ b/packages/graphql-api/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "outDir": "./lib", - "importHelpers": true + "importHelpers": true, + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/packages/graphql-client/tsconfig.json b/packages/graphql-client/tsconfig.json index 17ac9240b..9f65c454c 100644 --- a/packages/graphql-client/tsconfig.json +++ b/packages/graphql-client/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "outDir": "./lib", "importHelpers": true, - "target": "es5" + "target": "es5", + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/packages/magic-link/tsconfig.json b/packages/magic-link/tsconfig.json index 24fad94f0..4ec63ea58 100644 --- a/packages/magic-link/tsconfig.json +++ b/packages/magic-link/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "outDir": "./lib", - "importHelpers": true + "importHelpers": true, + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/packages/oauth-instagram/tsconfig.json b/packages/oauth-instagram/tsconfig.json index 848b9b224..c96e799a1 100644 --- a/packages/oauth-instagram/tsconfig.json +++ b/packages/oauth-instagram/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "./lib", - "importHelpers": true + "importHelpers": true, + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/packages/oauth-twitter/tsconfig.json b/packages/oauth-twitter/tsconfig.json index 848b9b224..c96e799a1 100644 --- a/packages/oauth-twitter/tsconfig.json +++ b/packages/oauth-twitter/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "./lib", - "importHelpers": true + "importHelpers": true, + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/packages/oauth/tsconfig.json b/packages/oauth/tsconfig.json index 848b9b224..c96e799a1 100644 --- a/packages/oauth/tsconfig.json +++ b/packages/oauth/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "./lib", - "importHelpers": true + "importHelpers": true, + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/packages/password/tsconfig.json b/packages/password/tsconfig.json index 24fad94f0..4ec63ea58 100644 --- a/packages/password/tsconfig.json +++ b/packages/password/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "outDir": "./lib", - "importHelpers": true + "importHelpers": true, + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/packages/rest-client/tsconfig.json b/packages/rest-client/tsconfig.json index 6e1c236d7..38f8a9a22 100644 --- a/packages/rest-client/tsconfig.json +++ b/packages/rest-client/tsconfig.json @@ -4,7 +4,8 @@ "outDir": "./lib", "importHelpers": true, "target": "es5", - "lib": ["es2019", "dom"] + "lib": ["es2019", "dom"], + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/packages/rest-express/tsconfig.json b/packages/rest-express/tsconfig.json index 24fad94f0..4ec63ea58 100644 --- a/packages/rest-express/tsconfig.json +++ b/packages/rest-express/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "outDir": "./lib", - "importHelpers": true + "importHelpers": true, + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/packages/server/tsconfig.json b/packages/server/tsconfig.json index 24fad94f0..4ec63ea58 100644 --- a/packages/server/tsconfig.json +++ b/packages/server/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "outDir": "./lib", - "importHelpers": true + "importHelpers": true, + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/packages/two-factor/tsconfig.json b/packages/two-factor/tsconfig.json index 24fad94f0..4ec63ea58 100644 --- a/packages/two-factor/tsconfig.json +++ b/packages/two-factor/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "outDir": "./lib", - "importHelpers": true + "importHelpers": true, + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index 24fad94f0..4ec63ea58 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "outDir": "./lib", - "importHelpers": true + "importHelpers": true, + "typeRoots": ["./node_modules/@types/"] }, "include": ["src/**/*.ts"], "exclude": ["node_modules"] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b7a5b04e7..c8b95b5e5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,7 @@ importers: lerna: 4.0.0 lint-staged: 12.0.2 prettier: 2.4.1 + turbo: 1.0.19 typescript: 4.5.2 devDependencies: '@changesets/changelog-github': 0.4.1 @@ -34,6 +35,7 @@ importers: lerna: 4.0.0 lint-staged: 12.0.2 prettier: 2.4.1 + turbo: 1.0.19 typescript: 4.5.2 examples/accounts-boost: @@ -708,6 +710,7 @@ importers: '@types/express-session': 1.17.4 '@types/jest': 27.0.2 '@types/lodash': 4.14.177 + '@types/node': 16.11.7 '@types/request-ip': 0.0.37 express: 4.17.1 express-session: 1.17.2 @@ -728,6 +731,7 @@ importers: '@types/express-session': 1.17.4 '@types/jest': 27.0.2 '@types/lodash': 4.14.177 + '@types/node': 16.11.7 '@types/request-ip': 0.0.37 express: 4.17.1 express-session: 1.17.2 @@ -8427,7 +8431,7 @@ packages: resolution: {integrity: sha512-a6bTJ21vFOGIkwM0kzh9Yr89ziVxq4vYH2fQ6N8AeipEzai/cFK6aGMArIkUeIdRIgpwQa+2bXiLuUJCpSf2Cg==} dependencies: '@types/connect': 3.4.35 - '@types/node': 16.4.10 + '@types/node': 16.11.7 /@types/body-parser/1.19.2: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} @@ -8490,7 +8494,7 @@ packages: /@types/express-serve-static-core/4.17.24: resolution: {integrity: sha512-3UJuW+Qxhzwjq3xhwXm2onQcFHn76frIYVbTu+kn24LFxI+dEhdfISDFovPB8VpEgW8oQCTpRuCe+0zJxB7NEA==} dependencies: - '@types/node': 16.11.4 + '@types/node': 16.11.7 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 @@ -8698,13 +8702,11 @@ packages: /@types/node/16.11.4: resolution: {integrity: sha512-TMgXmy0v2xWyuCSCJM6NCna2snndD8yvQF67J29ipdzMcsPa9u+o0tjF5+EQNdhcuZplYuouYqpc4zcd5I6amQ==} + dev: true /@types/node/16.11.7: resolution: {integrity: sha512-QB5D2sqfSjCmTuWcBWyJ+/44bcjO7VbjSbOE0ucoVbAsSNQc4Lt6QkgkVXkTDwkL4z/beecZNDvVX15D4P8Jbw==} - /@types/node/16.4.10: - resolution: {integrity: sha512-TmVHsm43br64js9BqHWqiDZA+xMtbUpI1MBIA0EyiBmoV9pcEYFOSdj5fr6enZNfh4fChh+AGOLIzGwJnkshyQ==} - /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true @@ -8785,7 +8787,7 @@ packages: /@types/request-ip/0.0.37: resolution: {integrity: sha512-uw6/i3rQnpznxD7LtLaeuZytLhKZK6bRoTS6XVJlwxIOoOpEBU7bgKoVXDNtOg4Xl6riUKHa9bjMVrL6ESqYlQ==} dependencies: - '@types/node': 16.11.4 + '@types/node': 16.11.7 dev: true /@types/request-promise/4.1.48: @@ -8827,7 +8829,7 @@ packages: resolution: {integrity: sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==} dependencies: '@types/mime': 1.3.2 - '@types/node': 16.4.10 + '@types/node': 16.11.7 /@types/shortid/0.0.29: resolution: {integrity: sha1-gJPuBBam4r8qpjOBCRFLP7/6Dps=} @@ -24810,6 +24812,12 @@ packages: dependencies: safe-buffer: 5.2.1 + /turbo/1.0.19: + resolution: {integrity: sha512-/gdEdpdludyHX+344JQ84bglK33dI4IWTtGkBkfJnSQW+lC3/JFAu9jy+4zNK2gdzxjwcB2/qQK+Pv53SZd1Kw==} + hasBin: true + requiresBuild: true + dev: true + /tweetnacl/0.14.5: resolution: {integrity: sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 22fef3fa1..6e245c78c 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,4 @@ packages: - 'packages/**' - 'examples/**' - - 'website/**' + - 'website'