From d1c9c01094ae37c9998393cd618119fa5fb4883c Mon Sep 17 00:00:00 2001 From: Soham Jaiswal Date: Wed, 19 Mar 2025 12:39:40 +0530 Subject: [PATCH 1/3] feat(w3id): basic setup --- infrastructure/w3id/package.json | 34 +++++++++++++++++++++-- infrastructure/w3id/src/index.ts | 1 + infrastructure/w3id/tsconfig.browser.json | 8 ++++++ infrastructure/w3id/tsconfig.json | 18 ++++++++++++ infrastructure/w3id/tsconfig.node.json | 8 ++++++ pnpm-lock.yaml | 15 ++++++++++ 6 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 infrastructure/w3id/src/index.ts create mode 100644 infrastructure/w3id/tsconfig.browser.json create mode 100644 infrastructure/w3id/tsconfig.json create mode 100644 infrastructure/w3id/tsconfig.node.json diff --git a/infrastructure/w3id/package.json b/infrastructure/w3id/package.json index 1132cce3c..0d7daf6a8 100644 --- a/infrastructure/w3id/package.json +++ b/infrastructure/w3id/package.json @@ -2,11 +2,39 @@ "name": "w3id", "version": "1.0.0", "description": "", - "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "dev": "tsc --watch", + "format": "prettier --write \"src/**/*.ts\"", + "check-format": "prettier --check \"src/**/*.ts\"", + "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", + "check-types": "tsc --noEmit", + "build": "npm run build:node && npm run build:browser", + "build:node": "tsc -p tsconfig.node.json", + "build:browser": "tsc -p tsconfig.browser.json", + "postinstall": "npm run build" }, "keywords": [], "author": "", - "license": "ISC" + "license": "ISC", + "dependencies": { + "uuid": "^11.1.0" + }, + "devDependencies": { + "typescript": "^5.8.2" + }, + "main": "./dist/node/index.js", + "module": "./dist/browser/index.js", + "types": "./dist/types/index.d.ts", + "exports": { + ".": { + "require": "./dist/node/index.js", + "import": "./dist/browser/index.js", + "types": "./dist/types/index.d.ts" + }, + "./package.json": "./package.json" + }, + "files": [ + "dist/**/*" + ] } diff --git a/infrastructure/w3id/src/index.ts b/infrastructure/w3id/src/index.ts new file mode 100644 index 000000000..d914c6066 --- /dev/null +++ b/infrastructure/w3id/src/index.ts @@ -0,0 +1 @@ +console.log("hi"); diff --git a/infrastructure/w3id/tsconfig.browser.json b/infrastructure/w3id/tsconfig.browser.json new file mode 100644 index 000000000..c99b9392d --- /dev/null +++ b/infrastructure/w3id/tsconfig.browser.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "ESNext", + "outDir": "./dist/browser", + "lib": ["DOM", "ESNext"] + } +} diff --git a/infrastructure/w3id/tsconfig.json b/infrastructure/w3id/tsconfig.json new file mode 100644 index 000000000..bc374bca1 --- /dev/null +++ b/infrastructure/w3id/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "ES2017", + "module": "ESNext", + "lib": ["ESNext", "DOM"], + "declaration": true, + "declarationDir": "./dist/types", + "outDir": "./dist", + "rootDir": "./src", + "strict": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "Node", + "skipLibCheck": true + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +} diff --git a/infrastructure/w3id/tsconfig.node.json b/infrastructure/w3id/tsconfig.node.json new file mode 100644 index 000000000..c43bd7be7 --- /dev/null +++ b/infrastructure/w3id/tsconfig.node.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "CommonJS", + "outDir": "./dist/node", + "lib": ["ESNext"] + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index be81e5169..9ee6bf999 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,6 +18,16 @@ importers: specifier: 5.8.2 version: 5.8.2 + infrastructure/w3id: + dependencies: + uuid: + specifier: ^11.1.0 + version: 11.1.0 + devDependencies: + typescript: + specifier: ^5.8.2 + version: 5.8.2 + packages/eslint-config: devDependencies: '@eslint/js': @@ -2002,6 +2012,11 @@ packages: punycode: 2.3.1 dev: true + /uuid@11.1.0: + resolution: {integrity: sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==} + hasBin: true + dev: false + /which-boxed-primitive@1.1.1: resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==} engines: {node: '>= 0.4'} From de8b938189843c8435e2c3659bf1784ff439a248 Mon Sep 17 00:00:00 2001 From: Soham Jaiswal Date: Wed, 19 Mar 2025 12:47:56 +0530 Subject: [PATCH 2/3] fix(root): add infrastructure workspaces --- infrastructure/w3id/package.json | 5 +- package.json | 3 +- pnpm-lock.yaml | 91 ++++++++++++++++++++++++++++++++ pnpm-workspace.yaml | 1 + 4 files changed, 97 insertions(+), 3 deletions(-) diff --git a/infrastructure/w3id/package.json b/infrastructure/w3id/package.json index 0d7daf6a8..26128de10 100644 --- a/infrastructure/w3id/package.json +++ b/infrastructure/w3id/package.json @@ -5,9 +5,10 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "dev": "tsc --watch", - "format": "prettier --write \"src/**/*.ts\"", "check-format": "prettier --check \"src/**/*.ts\"", - "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", + "format": "npx @biomejs/biome format --write ./src", + "lint": "npx @biomejs/biome lint --write ./src", + "check": "npx @biomejs/biome check --write ./src", "check-types": "tsc --noEmit", "build": "npm run build:node && npm run build:browser", "build:node": "tsc -p tsconfig.node.json", diff --git a/package.json b/package.json index b3915fe08..7d5f10743 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,11 @@ "build": "turbo run build", "dev": "turbo run dev", "lint": "turbo run lint", - "format": "prettier --write \"**/*.{ts,tsx,md}\"", + "format": "pnpm -F=* format", "check-types": "turbo run check-types" }, "devDependencies": { + "@biomejs/biome": "^1.9.4", "prettier": "^3.5.3", "turbo": "^2.4.4", "typescript": "5.8.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9ee6bf999..045365cdf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: devDependencies: + '@biomejs/biome': + specifier: ^1.9.4 + version: 1.9.4 prettier: specifier: ^3.5.3 version: 3.5.3 @@ -68,6 +71,94 @@ importers: packages: + /@biomejs/biome@1.9.4: + resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} + engines: {node: '>=14.21.3'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@biomejs/cli-darwin-arm64': 1.9.4 + '@biomejs/cli-darwin-x64': 1.9.4 + '@biomejs/cli-linux-arm64': 1.9.4 + '@biomejs/cli-linux-arm64-musl': 1.9.4 + '@biomejs/cli-linux-x64': 1.9.4 + '@biomejs/cli-linux-x64-musl': 1.9.4 + '@biomejs/cli-win32-arm64': 1.9.4 + '@biomejs/cli-win32-x64': 1.9.4 + dev: true + + /@biomejs/cli-darwin-arm64@1.9.4: + resolution: {integrity: sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-darwin-x64@1.9.4: + resolution: {integrity: sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-linux-arm64-musl@1.9.4: + resolution: {integrity: sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-linux-arm64@1.9.4: + resolution: {integrity: sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-linux-x64-musl@1.9.4: + resolution: {integrity: sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-linux-x64@1.9.4: + resolution: {integrity: sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-win32-arm64@1.9.4: + resolution: {integrity: sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-win32-x64@1.9.4: + resolution: {integrity: sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@eslint-community/eslint-utils@4.5.0(eslint@9.22.0): resolution: {integrity: sha512-RoV8Xs9eNwiDvhv7M+xcL4PWyRyIXRY/FLp3buU4h1EYfdF7unWUy3dOjPqb3C7rMUewIcqwW850PgS8h1o1yg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 3ff5faaaf..1059c7450 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,4 @@ packages: - "apps/*" - "packages/*" + - "infrastructure/*" From 00d2aba3e9b56f0538ccdbd3060f6eaf14b51af5 Mon Sep 17 00:00:00 2001 From: Soham Jaiswal Date: Wed, 19 Mar 2025 12:48:41 +0530 Subject: [PATCH 3/3] update: lock file --- pnpm-lock.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 045365cdf..7f1f40cbc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,6 +21,8 @@ importers: specifier: 5.8.2 version: 5.8.2 + infrastructure/evault-core: {} + infrastructure/w3id: dependencies: uuid: