-
Notifications
You must be signed in to change notification settings - Fork 0
Sync upstream #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
fix: Expose the prefer-const-values Typescript language setting via CLI
Co-authored-by: David Siegel <[email protected]>
* move omit empty check * Remove unneeded import --------- Co-authored-by: David Siegel <[email protected]>
Co-authored-by: David Siegel <[email protected]>
* make private members of TypeScriptZodRenderer protected * add protected access for typeMapTypeForProperty, typeMapTypeFor --------- Co-authored-by: David Siegel <[email protected]>
typecheck PRs Co-authored-by: David Siegel <[email protected]>
Co-authored-by: David Siegel <[email protected]>
Co-authored-by: Gudjon Ragnar Brynjarsson <[email protected]> Co-authored-by: David Siegel <[email protected]>
Co-authored-by: David Siegel <[email protected]>
Co-authored-by: David Siegel <[email protected]>
* !W(Core.Language.CSharp) add `keepPropertyName` * !B(Core.Language.CSharp) `keywords` * !T(Core.Language.CSharp) `keepPropertyName` default value is false and use ternary --------- Co-authored-by: David Siegel <[email protected]>
Enhance clarity and informativeness of error messages in the C++ code generator for enum type conversions. Update the default case in `to_json` function to include the specific enumeration name and the unexpected value in the error message. This aids in quicker debugging and aligns with best practices in error messaging. Co-authored-by: David Siegel <[email protected]>
…2478) Co-authored-by: David Siegel <[email protected]>
This commit fixes the style issues introduced in fdd4052 according to the output from Prettier. Details: None Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
* add CommentConfig and LeadingComments type * add emitComments function to ConvenienceRenderer * use object params for comment options in ConvenienceRenderer.emitCommentLines * rename beforeLine -> beforeComment, afterLine -> afterComment * support lineNed in emitCommentLines * allow SourceLike in CommentConfig types * update inline description block comments --------- Co-authored-by: David Siegel <[email protected]>
This commit fixes the style issues introduced in c188aba according to the output from Prettier. Details: None Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
…, in stead (#2412) Co-authored-by: David Siegel <[email protected]>
* feat(Golang): Add support for native golang Date/Time types * code cleanup * fix: import generation * fix: proper way of indenting imports * fixes: fix import generation, tests data, golang tests list * fix: review issues --------- Co-authored-by: Maciej Maczuga <[email protected]> Co-authored-by: David Siegel <[email protected]>
… before they've been declared (#2419) * Fixing code generation for zod, ensuring that referenced types are defined before they are referenced * Apply suggestions from code review adding a warning to Typescript Zod generator on (unlikely) exceeeding max num passes when determining output order + correcting a comment typo --------- Co-authored-by: David Siegel <[email protected]>
This commit fixes the style issues introduced in f440afd according to the output from Prettier. Details: None Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: David Siegel <[email protected]>
* Add omit-empty to usable options * run Prettier
Related: #2402 Signed-off-by: black-desk <[email protected]> Co-authored-by: David Siegel <[email protected]>
* Fail the workflow if anything earlier fails * Update test-pr.yaml
* standardise json formatting * add file association for schema files * install eslint packages * add eslint config * remove tslint * eslint autofix * update eslint rules, eslintignore * add lint:fix script * update eslint rules, eslintignore * add lint:fix script * add import rules * add import rules * update import rules * reduce excess style rules * downgrade remaining to warnings * fix enum values fixup! fix enum values * add all missing accessibility modifiers fixup! add all missing accessibility modifiers fixup! add all missing accessibility modifiers * fix nullish errors * update import rules * fix all require imports * fix all imports * reduce excess style rules * fix any types fixup! fix any types fixup! fix any types * fix misc errors * downgrade remaining to warnings * return types * fix types errors * fix json import for test tsconfig * auto lint fix * fix lint errors in extension * fix lint errors in Elixir * make ref.pushElement public * fix misc * fix accidental public in CSharp raw text get * fix new lint errors * Merge branch 'refactor/imports/languages' * strongly type Rust naming styles * fix typo * unify emitDeriveHeader for Rust * ♻️
chore(repo): Allow running test pr workflow for release branches
* fix Acronym dep cycle * ♻️ * fix dep cycle in input dir
* fix: punycode error for non CI * chore: remove build artifacts * fix: import add comment --------- Co-authored-by: avallete <[email protected]>
* update gh actions test step to use ubuntu 22.04 instead of latest due to issues with 24.04
Updated the header comment for Go files to align with standard conventions. Go tools, like golangci-lint, often rely on this comment format. see https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source Co-authored-by: inferrinizzard <[email protected]>
* temp disable swift
* Fix typos * Fix text in C++ default statement * Remove whitespace characters in cpp file
* update options parse to filter by cli option kind
* refactor out PathElement dependency cycle * refactor out type transformed string util cycle * separate index for re-exports * rename to TransformedStringType * move Type files into dir * refactor out TypeBuilderUtils * fix imports * split TypeGraph utils to own file * move provenance type attribute kind to own file * fix getGraph instanceof * recomment cycle * export through index * assign TypeGraph to TypeBuilder after init * update comments
* split fetch into build-time files * fix lint * test sh * add grep replace for ci * bump types node version * add info log * add override for node-fetch whatwg
* grep in ci only but not publish
* fix: move publish to setup step
…ext (#2606) * added dependecy usings based on types present in renderContext * PR change : removed array usage for emiting , added local function to ensure single addition of "System.Collections.Generic" --------- Co-authored-by: inferrinizzard <[email protected]>
* expose enum option value map * update option.type to optionType union * add comments to OptionDefinition
…rg bug (#2767) * add command-line-args as devDep to core * extend option definition type from command line args * add map from optionType to type
I'm getting to work. See my steps and track my cost here.
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Review SummaryThis is a substantial upstream sync that brings quicktype-bin up to date with quicktype v23.2.0. I've tested the core functionality and the changes appear to work correctly. ✅ What's Working Well
|
PR Type
Enhancement
Description
• Major refactoring of quicktype codebase with comprehensive language renderer implementations
• Added complete C++ renderer with full code generation, type mapping, and JSON serialization support
• Implemented new Swift renderer with Codable protocol support and Alamofire integration
• Added Ruby renderer using Dry::Struct and Dry::Types with JSON validation
• Created new JSON Schema target language implementation
• Enhanced GraphQL input module with improved type safety and error handling
• Refactored core modules (
ConvenienceRenderer
,Transformers
,GatherNames
) with better TypeScript patterns• Added Smithy4s language support with constants and reserved keywords
• Reorganized imports across codebase with alphabetical ordering and type-only imports
• Improved type safety throughout with proper generic constraints and readonly modifiers
• Deleted legacy language files and moved to modular renderer structure
Changes walkthrough 📝
10 files
CPlusPlusRenderer.ts
Complete C++ renderer implementation with full code generation
packages/quicktype-core/src/language/CPlusPlus/CPlusPlusRenderer.ts
• Complete implementation of C++ code generator with 3467 lines of new
code
• Added comprehensive type mapping, class generation, enum
handling, and JSON serialization
• Implemented optional types, unions,
constraints, and helper functions
• Added support for both single-file
and multi-file output structures
index.ts
GraphQL input module refactoring and type improvements
packages/quicktype-graphql-input/src/index.ts
• Updated import statements and type definitions for better
organization
• Reordered interface properties and added proper type
annotations
• Improved code formatting and added missing type safety
features
• Enhanced error handling and null safety checks
language.ts
New JSON Schema target language implementation
packages/quicktype-core/src/language/JSONSchema/language.ts
• Added new JSON Schema target language implementation
• Implemented
language configuration with display name and file extension
• Added
renderer factory method and language-specific options
• Configured
string type mapping and object type support
JSONSchemaInput.ts
Major refactoring of JSON Schema input processing with improved type
safety
packages/quicktype-core/src/input/JSONSchemaInput.ts
• Reorganized imports with alphabetical sorting and added biome-ignore
comment
• Moved
PathElement
andPathElementKind
types to separatemodule
• Refactored path element comparison logic with explicit type
checking
• Updated function signatures to use proper TypeScript types
and readonly arrays
• Replaced regex literal with more concise syntax
and improved URI handling
• Enhanced error handling and type safety
throughout the file
ConvenienceRenderer.ts
Enhanced convenience renderer with improved comment handling and type
safety
packages/quicktype-core/src/ConvenienceRenderer.ts
• Reorganized imports and updated import paths for type definitions
•
Added comprehensive comment handling functionality with
emitComments
method
• Enhanced type definitions with proper interfaces and readonly
modifiers
• Improved function signatures with better parameter typing
and return types
• Updated method implementations with more explicit
type checking and error handling
GatherNames.ts
Improved type safety and import organization in name gathering
packages/quicktype-core/src/GatherNames.ts
• Reorganized imports and updated import paths for type definitions
•
Enhanced type annotations with proper generic constraints and readonly
modifiers
• Improved function parameter typing and return type
specifications
• Added better type safety checks and explicit type
assertions throughout
constants.ts
New constants file for Smithy4s language support
packages/quicktype-core/src/language/Smithy4s/constants.ts
• Added new constants file defining invalid symbols and reserved
keywords
• Exported arrays of symbols that need special handling in
Smithy4s code generation
• Included comprehensive list of
Scala/Smithy4s reserved words and type names
Transformers.ts
Refactor Transformers with improved TypeScript patterns and imports
packages/quicktype-core/src/Transformers.ts
• Reorganized imports to use alphabetical ordering and type-only
imports
• Added explicit
public
access modifiers to all class methodsand properties
• Improved method parameter formatting with better line
breaks and trailing commas
• Enhanced type annotations with generic
constraints and stricter typing
• Updated import paths to use new
modular structure (
Type/TypeGraph
,Type/TypeRef
)SwiftRenderer.ts
Add complete Swift language renderer implementation
packages/quicktype-core/src/language/Swift/SwiftRenderer.ts
• Added complete Swift code generation renderer with support for
classes, enums, and unions
• Implemented Codable protocol support with
custom encoding/decoding logic
• Added convenience initializers,
Alamofire integration, and multi-file output support
• Included
comprehensive type mapping from quicktype types to Swift types
RubyRenderer.ts
Add complete Ruby language renderer implementation
packages/quicktype-core/src/language/Ruby/RubyRenderer.ts
• Added complete Ruby code generation renderer using Dry::Struct and
Dry::Types
• Implemented JSON parsing and serialization with proper
type validation
• Added support for classes, enums, unions with
dynamic type conversion
• Included module namespacing and configurable
strictness levels
101 files