Skip to content

Commit 76f2b4e

Browse files
committed
fix: this change introduces multi version support for typings
This updates to explicit version support of the spec, and intros support for the latest versions. In addition it updates a few deps and deprecates meta-schema in this repo
1 parent d57bb6c commit 76f2b4e

File tree

16 files changed

+335
-143
lines changed

16 files changed

+335
-143
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ aliases:
2525
defaults: &defaults
2626
working_directory: ~/typings
2727
docker:
28-
- image: cimg/node:24.10.0
28+
- image: cimg/node:24.12.0
2929

3030
jobs:
3131
test:

package-lock.json

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

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@
3131
"dependencies": {
3232
"@json-schema-tools/titleizer": "1.0.9",
3333
"@json-schema-tools/transpiler": "^1.10.5",
34-
"@open-rpc/schema-utils-js": "2.0.2",
34+
"@open-rpc/schema-utils-js": "^2.2.1",
3535
"commander": "^6.0.0",
3636
"fs-extra": "^10.0.0"
3737
},
3838
"devDependencies": {
3939
"@open-rpc/examples": "1.7.2",
40-
"@open-rpc/meta-schema": "1.14.9",
40+
"@open-rpc/spec-types": "0.0.2",
4141
"@types/commander": "^2.12.2",
4242
"@types/fs-extra": "^9.0.1",
4343
"@types/jest": "^29.5.12",
4444
"jest": "^29.1.2",
45-
"ts-jest": "^29.1.2",
45+
"ts-jest": "29.4.6",
4646
"typedoc": "0.25.13",
47-
"typescript": "4.9.5"
47+
"typescript": "^5.4.0"
4848
}
4949
}

src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import program, { CommanderStatic } from "commander";
44
import { parseOpenRPCDocument } from "@open-rpc/schema-utils-js";
5-
import { OpenrpcDocument as OpenRPC } from "@open-rpc/meta-schema";
5+
import { OpenrpcDocument as OpenRPC } from "./types";
66
import { generateTypingsFile, TypingsOptions } from "./generate-typings-file";
77
import { OpenRPCTypingsSupportedLanguages } from "./";
88
const version = require("../package.json").version; // tslint:disable-line

src/generate-typings-file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ensureDir, writeFile } from "fs-extra";
22

33
import MethodTypings, { OpenRPCTypingsSupportedLanguages } from "./";
4-
import { OpenrpcDocument as OpenRPC } from "@open-rpc/meta-schema";
4+
import { OpenrpcDocument as OpenRPC } from "./types";
55

66
export interface TypingsOptions {
77
fileName: string;

src/generator-interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { OpenrpcDocument as OpenRPC, MethodObject } from "@open-rpc/meta-schema";
1+
import { OpenrpcDocument as OpenRPC, MethodObject } from "./types";
22

33
export type GetMethodTypings = (openrpcSchema: OpenRPC) => string;
44
export type GetParamsTypings = (openrpcSchema: OpenRPC) => string;

src/go.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
GetMethodAliasName,
55
GetParamsTypings,
66
} from "./generator-interface";
7-
import { ContentDescriptorObject, MethodObject } from "@open-rpc/meta-schema";
7+
import { ContentDescriptorObject, MethodObject } from "./types";
88

99
import { languageSafeName, getTitle } from "@json-schema-tools/transpiler/build/utils";
1010
import titleizer from "@json-schema-tools/titleizer";

src/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import MethodTypings from ".";
2-
import { MethodObject, OpenrpcDocument as OpenRPC } from "@open-rpc/meta-schema";
2+
import { MethodObject, OpenrpcDocument as OpenRPC } from "./types";
33
import examples from "@open-rpc/examples";
44
import { dereferenceDocument } from "@open-rpc/schema-utils-js";
55
import defaultReferenceResolver from "@json-schema-tools/reference-resolver"

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import rust from "./rust";
33
import go from "./go";
44
import python from "./python";
55
import { Generator } from "./generator-interface";
6-
import { OpenrpcDocument as OpenRPC, MethodObject, ContentDescriptorObject } from "@open-rpc/meta-schema";
6+
import { OpenrpcDocument as OpenRPC, MethodObject, ContentDescriptorObject } from "./types";
77
import { getSchemasForOpenRPCDocument, deepClone } from "./utils";
88
import Transpiler from "@json-schema-tools/transpiler";
99
import { languageSafeName, getTitle } from "@json-schema-tools/transpiler/build/utils";

src/openrpc.fixture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { OpenrpcDocument as OpenRPC } from "@open-rpc/meta-schema";
1+
import { OpenrpcDocument as OpenRPC } from "./types";
22

33
const testOpenRPCDocument = {
44
info: {

0 commit comments

Comments
 (0)