Skip to content

Commit 7e09cb7

Browse files
rayokotamilindl
andauthored
Separate SR into a different workspace (#78)
Co-authored-by: Milind L <[email protected]>
1 parent a744a82 commit 7e09cb7

File tree

9 files changed

+1472
-1698
lines changed

9 files changed

+1472
-1698
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ deps/*
55
.gitmodules
66
Dockerfile
77
deps/librdkafka/config.h
8+
schemaregistry
89
build
910
.github
1011
.vscode

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module.exports = ts.config(
5454
},
5555
...ts.configs.recommended.map((config) => ({
5656
...config,
57-
ignores: ["**/*.js"],
57+
ignores: ["**/*.js", "types/rdkafka.d.ts", "types/kafkajs.d.ts", "types/config.d.ts"],
5858
rules: {
5959
...config.rules,
6060
"prefer-const": "warn",

package-lock.json

Lines changed: 1351 additions & 1642 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
"test": "make test",
1313
"install": "node-pre-gyp install --fallback-to-build",
1414
"prepack": "node ./ci/prepublish.js",
15-
"test:types": "tsc -p .",
16-
"test:schemaregistry": "make -f Makefile.schemaregistry test"
15+
"test:types": "tsc -p ."
1716
},
1817
"binary": {
1918
"module_name": "confluent-kafka-javascript",
@@ -48,31 +47,14 @@
4847
"typescript-eslint": "^8.2.0"
4948
},
5049
"dependencies": {
51-
"@aws-sdk/client-kms": "^3.637.0",
52-
"@azure/identity": "^4.4.1",
53-
"@azure/keyvault-keys": "^4.8.0",
54-
"@bufbuild/protobuf": "^2.0.0",
55-
"@criteria/json-schema": "^0.10.0",
56-
"@criteria/json-schema-validation": "^0.10.0",
57-
"@google-cloud/kms": "^4.5.0",
58-
"@hackbg/miscreant-esm": "^0.3.2-patch.3",
5950
"@mapbox/node-pre-gyp": "^1.0.11",
60-
"@smithy/types": "^3.3.0",
61-
"@types/validator": "^13.12.0",
62-
"ajv": "^8.17.1",
63-
"async-mutex": "^0.5.0",
64-
"avsc": "^5.7.7",
65-
"axios": "^1.7.3",
6651
"bindings": "^1.3.1",
67-
"json-stringify-deterministic": "^1.0.12",
68-
"jsonata": "^2.0.5",
69-
"lru-cache": "^11.0.0",
70-
"nan": "^2.17.0",
71-
"node-vault": "^0.10.2",
72-
"ts-jest": "^29.2.4",
73-
"validator": "^13.12.0"
52+
"nan": "^2.17.0"
7453
},
7554
"engines": {
7655
"node": ">=18.0.0"
77-
}
56+
},
57+
"workspaces": [
58+
"schemaregistry"
59+
]
7860
}

Makefile.schemaregistry renamed to schemaregistry/Makefile.schemaregistry

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
# Variables
44
NODE ?= node
5-
ESLINT ?= ./node_modules/.bin/eslint
6-
JEST ?= ./node_modules/.bin/jest
7-
TS_NODE ?= ./node_modules/.bin/ts-node
5+
ESLINT ?= ../node_modules/.bin/eslint
6+
JEST ?= ../node_modules/.bin/jest
7+
TS_NODE ?= ../node_modules/.bin/ts-node
88

99
# Paths
10-
SRC_DIR = schemaregistry
11-
SR_TEST_DIR = test/schemaregistry
12-
DEK_TEST_DIR = test/schemaregistry/rules/encryption/dekregistry
13-
INTEG_DIR = e2e/schemaregistry
10+
SRC_DIR = .
11+
SR_TEST_DIR = ../test/schemaregistry
12+
DEK_TEST_DIR = ../test/schemaregistry/rules/encryption/dekregistry
13+
INTEG_DIR = ../e2e/schemaregistry
1414

1515
# Tasks
1616
.PHONY: all lint test integtest

schemaregistry/jest.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
roots: [".."],
3+
transform: {
4+
'^.+\\.tsx?$': 'ts-jest',
5+
},
6+
};

schemaregistry/package.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"name": "@confluentinc/schemaregistry",
3+
"version": "v0.1.16-devel",
4+
"description": "Node.js client for Confluent Schema Registry",
5+
"main": "lib/index.js",
6+
"devDependencies": {
7+
"@bufbuild/buf": "^1.37.0",
8+
"@bufbuild/protoc-gen-es": "^2.0.0",
9+
"@eslint/js": "^9.9.0",
10+
"@types/eslint__js": "^8.42.3",
11+
"@types/node": "^20.16.1",
12+
"bluebird": "^3.5.3",
13+
"eslint": "^8.57.0",
14+
"eslint-plugin-jest": "^28.6.0",
15+
"jest": "^29.7.0",
16+
"jsdoc": "^4.0.2",
17+
"mocha": "^10.7.0",
18+
"node-gyp": "^9.3.1",
19+
"ts-jest": "^29.2.4",
20+
"typescript": "^5.5.4",
21+
"typescript-eslint": "^8.2.0"
22+
},
23+
"dependencies": {
24+
"@aws-sdk/client-kms": "^3.637.0",
25+
"@azure/identity": "^4.4.1",
26+
"@azure/keyvault-keys": "^4.8.0",
27+
"@bufbuild/protobuf": "^2.0.0",
28+
"@criteria/json-schema": "^0.10.0",
29+
"@criteria/json-schema-validation": "^0.10.0",
30+
"@google-cloud/kms": "^4.5.0",
31+
"@hackbg/miscreant-esm": "^0.3.2-patch.3",
32+
"@smithy/types": "^3.3.0",
33+
"@types/validator": "^13.12.0",
34+
"ajv": "^8.17.1",
35+
"async-mutex": "^0.5.0",
36+
"avsc": "^5.7.7",
37+
"axios": "^1.7.3",
38+
"json-stringify-deterministic": "^1.0.12",
39+
"jsonata": "^2.0.5",
40+
"lru-cache": "^11.0.0",
41+
"node-vault": "^0.10.2",
42+
"validator": "^13.12.0"
43+
},
44+
"scripts": {
45+
"test:types": "tsc -p .",
46+
"test:schemaregistry": "make -f Makefile.schemaregistry test"
47+
},
48+
49+
"keywords": [
50+
"schemaregistry",
51+
"confluent"
52+
],
53+
"repository": {
54+
"type": "git",
55+
"url": "[email protected]:confluentinc/confluent-kafka-javascript.git"
56+
},
57+
58+
"license": "MIT"
59+
}

schemaregistry/tsconfig.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": ".",
4+
"lib": [
5+
"es2021", "dom"
6+
],
7+
"module": "preserve",
8+
"target": "es2021",
9+
"strict": true,
10+
"esModuleInterop": true,
11+
"forceConsistentCasingInFileNames": true,
12+
"moduleResolution": "bundler",
13+
"allowUnusedLabels": false,
14+
"allowUnreachableCode": false,
15+
"noFallthroughCasesInSwitch": true,
16+
"noImplicitOverride": true,
17+
"noImplicitReturns": true,
18+
"noPropertyAccessFromIndexSignature": true,
19+
"noUnusedLocals": true,
20+
"useUnknownInCatchVariables": true,
21+
"types": ["../node_modules/@types/node"],
22+
"typeRoots": ["."],
23+
"noEmit": true,
24+
"resolveJsonModule": true,
25+
"skipLibCheck": true
26+
},
27+
"include": [
28+
"**/*",
29+
"../test/**/*"
30+
]
31+
}

tsconfig.json

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,18 @@
11
{
22
"compilerOptions": {
3+
"module": "commonjs",
4+
"lib": ["es6"],
5+
"noImplicitAny": true,
6+
"noImplicitThis": true,
7+
"strictNullChecks": true,
38
"baseUrl": ".",
4-
"lib": [
5-
"es2021", "dom"
6-
],
7-
"module": "preserve",
8-
"target": "es2021",
9-
"strict": true,
10-
"esModuleInterop": true,
11-
"forceConsistentCasingInFileNames": true,
12-
"moduleResolution": "bundler",
13-
"allowUnusedLabels": false,
14-
"allowUnreachableCode": false,
15-
"noFallthroughCasesInSwitch": true,
16-
"noImplicitOverride": true,
17-
"noImplicitReturns": true,
18-
"noPropertyAccessFromIndexSignature": true,
19-
"noUnusedLocals": true,
20-
"useUnknownInCatchVariables": true,
21-
"types": ["node_modules/@types/node"],
9+
"types": ["./node_modules/@types/node"],
2210
"typeRoots": ["."],
2311
"noEmit": true,
24-
"resolveJsonModule": true,
25-
"skipLibCheck": true
12+
"forceConsistentCasingInFileNames": true,
13+
"strictFunctionTypes": true
2614
},
27-
"include": [
28-
"index.d.ts",
29-
"schemaregistry/**/*",
30-
"test/**/*"
15+
"files": [
16+
"index.d.ts"
3117
]
3218
}

0 commit comments

Comments
 (0)