Skip to content

Commit

Permalink
improvement: upgrade ts-sdk, ts-express to IR37 (#3347)
Browse files Browse the repository at this point in the history
* improvement: upgrade ts-sdk, ts-express to IR37

* nit
mscolnick authored Apr 9, 2024
1 parent e377143 commit 3ba5a27
Showing 660 changed files with 721,945 additions and 58,409 deletions.
72 changes: 36 additions & 36 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
2 changes: 1 addition & 1 deletion generators/csharp/codegen/.depcheckrc.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "ignores": ["@types/jest", "@types/node"], "ignore-patterns": ["lib"] }
{ "ignores": ["@types/jest", "@types/node", "@fern-fern/ir-sdk"], "ignore-patterns": ["lib"] }
12 changes: 10 additions & 2 deletions generators/csharp/codegen/.mrlint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"type": "library",
"private": false
}
"private": false,
"rules": {
"depcheck": {
"ignores": ["@fern-fern/ir-sdk"]
},
"duplicate-dependencies": {
"exclude": ["@fern-fern/ir-sdk"]
}
}
}
1 change: 0 additions & 1 deletion generators/csharp/codegen/src/ast/Enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { Access } from "./Access";
import { Annotation } from "./Annotation";
import { ClassReference } from "./ClassReference";
4 changes: 4 additions & 0 deletions generators/typescript/express/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.10.0] - 2024-04-09

- Support V37 of the IR.

## [0.10.0-rc0] - 2024-04-02

- Feature: Add `retainOriginalCasing` option to preserve the naming convention expressed in the API.
2 changes: 1 addition & 1 deletion generators/typescript/express/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.0-rc0
0.10.0
2 changes: 1 addition & 1 deletion generators/typescript/express/cli/package.json
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
},
"devDependencies": {
"@fern-fern/generator-exec-sdk": "0.0.687",
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/abstract-generator-cli": "workspace:*",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
},
"dependencies": {
"@fern-api/core-utils": "workspace:*",
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/abstract-schema-generator": "workspace:*",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
"depcheck": "depcheck"
},
"dependencies": {
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/abstract-error-class-generator": "workspace:*",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
},
"dependencies": {
"@fern-api/core-utils": "workspace:*",
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/abstract-schema-generator": "workspace:*",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
"depcheck": "depcheck"
},
"dependencies": {
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*"
},
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
"depcheck": "depcheck"
},
"dependencies": {
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/abstract-schema-generator": "workspace:*",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
"depcheck": "depcheck"
},
"dependencies": {
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
"@fern-typescript/resolvers": "workspace:*",
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
"depcheck": "depcheck"
},
"dependencies": {
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
"@fern-typescript/resolvers": "workspace:*",
2 changes: 1 addition & 1 deletion generators/typescript/express/generator/package.json
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@
"dependencies": {
"@fern-api/core-utils": "workspace:*",
"@fern-api/fs-utils": "workspace:*",
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
"@fern-typescript/express-endpoint-type-schemas-generator": "workspace:*",
2 changes: 1 addition & 1 deletion generators/typescript/model/type-generator/package.json
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
"depcheck": "depcheck"
},
"dependencies": {
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
"@fern-typescript/union-generator": "workspace:*",
Original file line number Diff line number Diff line change
@@ -73,6 +73,16 @@ export class GeneratedObjectTypeImpl<Context extends ModelContext>

return example.properties.map((property) => {
const originalTypeForProperty = context.type.getGeneratedType(property.originalTypeDeclaration);
if (originalTypeForProperty.type === "union") {
const propertyKey = originalTypeForProperty.getSinglePropertyKey({
name: property.name,
type: TypeReference.named(property.originalTypeDeclaration)
});
return ts.factory.createPropertyAssignment(
propertyKey,
context.type.getGeneratedExample(property.value).build(context, opts)
);
}
if (originalTypeForProperty.type !== "object") {
throw new Error("Property does not come from an object");
}
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
"depcheck": "depcheck"
},
"dependencies": {
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/resolvers": "workspace:*",
"ts-morph": "^15.1.0"
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
},
"dependencies": {
"@fern-api/core-utils": "workspace:*",
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
"ts-morph": "^15.1.0"
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
"depcheck": "depcheck"
},
"dependencies": {
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/abstract-schema-generator": "workspace:*",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
2 changes: 1 addition & 1 deletion generators/typescript/model/union-generator/package.json
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
},
"dependencies": {
"@fern-api/core-utils": "workspace:*",
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
"ts-morph": "^15.1.0"
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
"depcheck": "depcheck"
},
"dependencies": {
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/abstract-schema-generator": "workspace:*",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
4 changes: 4 additions & 0 deletions generators/typescript/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.13.0] - 2024-04-09

- Support V37 of the IR.

## [0.13.0-rc0] - 2024-04-02

- Feature: Add `retainOriginalCasing` option to preserve the naming convention expressed in the API.
2 changes: 1 addition & 1 deletion generators/typescript/sdk/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.0-rc0
0.13.0
Original file line number Diff line number Diff line change
@@ -10,16 +10,21 @@ cd $project_name
yarn init --yes

yarn add \
@types/express@4.17.16 \
@types/node@17.0.33 \
@types/url-join@4.0.1 \
axios@0.27.2 \
esbuild@0.16.15 \
express@4.18.2 \
prettier@2.7.1 \
typescript@4.6.4 \
url-join@4.0.1 \
@ungap/url-search-params@0.2.2
@types/jest@29.5.5 \
@types/node-fetch@2.6.9 \
@types/node@17.0.33 \
@types/qs@6.9.8 \
@types/url-join@4.0.1 \
form-data@4.0.0 \
jest-environment-jsdom@29.7.0 \
jest@29.7.0 \
js-base64@3.7.2"
node-fetch@2.7.0 \
prettier@2.7.1 \
qs@6.11.2 \
ts-jest@29.1.1 \
typescript@4.6.4" \
url-join@4.0.1

cd ..
/bin/rm -rf $project_name
Original file line number Diff line number Diff line change
@@ -10,16 +10,21 @@ cd $project_name
yarn init --yes

yarn add \
@types/express@4.17.16 \
@types/node@17.0.33 \
@types/url-join@4.0.1 \
axios@0.27.2 \
esbuild@0.16.15 \
express@4.18.2 \
prettier@2.7.1 \
typescript@4.6.4 \
url-join@4.0.1 \
@ungap/url-search-params@0.2.2
@types/jest@29.5.5 \
@types/node-fetch@2.6.9 \
@types/node@17.0.33 \
@types/qs@6.9.8 \
@types/url-join@4.0.1 \
form-data@4.0.0 \
jest-environment-jsdom@29.7.0 \
jest@29.7.0 \
js-base64@3.7.2"
node-fetch@2.7.0 \
prettier@2.7.1 \
qs@6.11.2 \
ts-jest@29.1.1 \
typescript@4.6.4" \
url-join@4.0.1

cd ..
/bin/rm -rf $project_name
2 changes: 1 addition & 1 deletion generators/typescript/sdk/cli/package.json
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@
"devDependencies": {
"@fern-api/fs-utils": "workspace:*",
"@fern-api/generator-commons": "workspace:*",
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/abstract-generator-cli": "workspace:*",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
},
"dependencies": {
"@fern-api/core-utils": "workspace:*",
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
"@fern-typescript/resolvers": "workspace:*",
Original file line number Diff line number Diff line change
@@ -101,10 +101,10 @@ export class GeneratedFileUploadEndpointRequest implements GeneratedEndpointRequ
if (property.type === "file") {
parameters.push({
name: getParameterNameForFile({
property,
property: property.value,
retainOriginalCasing: context.retainOriginalCasing
}),
type: getTextOfTsNode(this.getFileParameterType(property, context))
type: getTextOfTsNode(this.getFileParameterType(property.value, context))
});
}
}
Original file line number Diff line number Diff line change
@@ -98,8 +98,12 @@ export class GeneratedDefaultEndpointImplementation implements GeneratedEndpoint
if (generatedExample == null) {
continue;
}
const exampleStr = "@example\n" + getTextOfTsNode(generatedExample);
groups.push(exampleStr.replaceAll("\n", `\n${EXAMPLE_PREFIX}`));
let exampleStr = "@example\n" + getTextOfTsNode(generatedExample);
exampleStr = exampleStr.replaceAll("\n", `\n${EXAMPLE_PREFIX}`);
// Only add if it doesn't already exist
if (!groups.includes(exampleStr)) {
groups.push(exampleStr);
}
}

return groups.join("\n\n");
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
"depcheck": "depcheck"
},
"dependencies": {
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
"@fern-typescript/resolvers": "workspace:*",
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
"depcheck": "depcheck"
},
"dependencies": {
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
"ts-morph": "^15.1.0"
2 changes: 1 addition & 1 deletion generators/typescript/sdk/generator/package.json
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
"@fern-api/core-utils": "workspace:*",
"@fern-api/fs-utils": "workspace:*",
"@fern-fern/generator-exec-sdk": "0.0.687",
"@fern-fern/ir-sdk": "0.0.16",
"@fern-fern/ir-sdk": "^37.0.0",
"@fern-typescript/commons": "workspace:*",
"@fern-typescript/contexts": "workspace:*",
"@fern-typescript/endpoint-error-union-generator": "workspace:*",
Loading

0 comments on commit 3ba5a27

Please sign in to comment.