Skip to content

Releases: chase-mew/skittles

1.6.0

Choose a tag to compare

@chase-mew chase-mew released this 13 Mar 20:50

What's Changed

  • Enum return type: function returning number fails when returning enum state variable by @chase-manning in #336
  • Interface method balanceOf compiled as nonpayable instead of view; external calls return tx object by @chase-manning in #337
  • Child contract returning parent public property generates invalid Solidity (getter ref instead of call) by @chase-manning in #338
  • Align debounce values between compile watch and Playground [XXS] by @chase-manning in #362
  • Extract baseName(filePath) helper in compiler [XXS] by @chase-manning in #363
  • Extract duplicate array destructuring error message to constant [XXS] by @chase-manning in #364
  • Unify ZERO_ADDRESS constant format [XXS] by @chase-manning in #365
  • Extract config validation field helpers to reduce repetition [S] by @chase-manning in #366
  • Deduplicate struct/enum collection logic in parser.ts [M] by @chase-manning in #367
  • Consolidate URL constants between webapp and docs [S] by @chase-manning in #368
  • Refactor Playground TSLine and SolLine into single CodeLine component [S] by @chase-manning in #369
  • Extract init command CONFIG_TEMPLATE from DEFAULT_CONFIG [S] by @chase-manning in #370
  • Extract error message utility to eliminate DRY violation [S] by @chase-manning in #372
  • Extract enum member name helper to reduce 'Unknown' fallback duplication [XXS] by @chase-manning in #373
  • Unify generateStructDecl and generateFileScopeStructDecl in codegen [S] by @chase-manning in #374
  • Extract CACHE_HASH_LENGTH constant for hashString slice [XXS] by @chase-manning in #375
  • Unify test defaultConfig with config defaults [S] by @chase-manning in #376
  • Consolidate Token example code across webapp components [M] by @chase-manning in #377
  • Extract package.json version reader to shared utility [XXS] by @chase-manning in #378
  • Replace empty catch blocks with explicit comment or logging [XXS] by @chase-manning in #379
  • Extract duplicate ancestor set computation in codegen [S] by @chase-manning in #380
  • Share statement tree walking for console.log detection and stripping [M] by @chase-manning in #382
  • Use optional chaining for config.formatting in compiler [XXS] by @chase-manning in #381
  • Add explicit return type annotations to public API functions [M] by @chase-manning in #383
  • Consider splitting compiler.ts into phase modules [L] by @chase-manning in #384
  • Standardize import order (path vs fs) across source files [XXS] by @chase-manning in #371
  • Use DEFAULT_CONFIG in test fixtures instead of duplicating [XS] by @chase-manning in #405
  • Refactor syntax-highlight.ts to eliminate duplicate logic [S] by @chase-manning in #404
  • Extract TypeScript file filter logic to shared utility [XS] by @chase-manning in #406
  • Extract playground filename constant in webapp [XXS] by @chase-manning in #407
  • Fix inconsistent cached file write for multi-contract files [M] by @chase-manning in #408
  • Remove redundant ctx reset in collectTypes and collectFunctions [XS] by @chase-manning in #409
  • Simplify config validation with a helper [M] by @chase-manning in #410
  • Extract error message utility to eliminate DRY violation [S] by @chase-manning in #411
  • Improve empty catch blocks with explicit comments [XXS] by @chase-manning in #412
  • Consider consolidating ts.forEachChild passes in parser.ts [L] by @chase-manning in #413
  • Reduce codegen.ts file size by extracting modules [L] by @chase-manning in #414
  • Consider using walkStatements for collectLocalVarNames in codegen [M] by @chase-manning in #415
  • Unify statement tree traversal for console.log detection and stripping [M] by @chase-manning in #416
  • Constants import path inconsistency (webapp vs docs) [XXS] by @chase-manning in #431
  • Extend format script to webapp and docs [XS] by @chase-manning in #432
  • Replace webapp README with Skittles-specific content [S] by @chase-manning in #434
  • Stdlib resolver: make import path regex more robust [S] by @chase-manning in #435
  • DRY: Shared regex rules in syntax-highlight.ts [XXS] by @chase-manning in #433
  • Normalize import style: add space after comma in imports [XS] by @chase-manning in #436
  • DRY: Extract DEBOUNCE_MS to shared constant [XXS] by @chase-manning in #437
  • Extend ESLint to webapp, docs, and example [M] by @chase-manning in #438
  • Introduce path helper utilities for common patterns [M] by @chase-manning in #439
  • DRY: Extract generateSolidity branching helper [S] by @chase-manning in #440
  • DRY: Extract shared compile pipeline (parse → generate) [M] by @chase-manning in #441

Full Changelog: v1.5.1...v1.6.0

1.5.1

Choose a tag to compare

@chase-mew chase-mew released this 13 Mar 15:15

What's Changed

  • Math.sqrt() returns incorrect result for small values (e.g. sqrt(2) returns 2 instead of 1) by @chase-manning in #327
  • Generated string helper _split uses local variable 'count' that shadows state variable by @chase-manning in #329
  • Mutability inference bug: mint() marked as view when extending ERC20Votes or ERC20Permit by @chase-manning in #331
  • Pre-scan warning for imported enum type in type guard function parameter by @chase-manning in #328
  • for...in loop over enum generates unused local variable warning in Solidity by @chase-manning in #332

Full Changelog: v1.5.0...v1.5.1

1.5.0

Choose a tag to compare

@chase-mew chase-mew released this 13 Mar 14:22

What's Changed

  • Support conditional (ternary) expressions in state variable initializers by @Copilot in #222
  • Docs: Add missing --no-install flag and exit codes to CLI reference by @Copilot in #223
  • Add AccessControl (role-based) contract to standard library by @Copilot in #224
  • docs: improve self/address(this) documentation clarity by @Copilot in #229
  • Support string.replace() and string.replaceAll() methods by @Copilot in #225
  • Support interface property getters for external contract view calls by @Copilot in #227
  • Support 'is' type guards for enum and type narrowing by @Copilot in #233
  • Add ERC20Permit and ERC20Votes to standard library by @Copilot in #228
  • Support tuple destructuring from function return values by @Copilot in #231
  • Support array.sort() with comparator function by @Copilot in #226
  • Support address.balance for reading ETH balance by @Copilot in #230
  • Support string interpolation with non-string expressions in template literals by @Copilot in #232
  • Fix mutability inference for msg.sender in custom error throw arguments by @Copilot in #236
  • Exclude address literals from string comparison keccak256 optimization by @Copilot in #238
  • Fix super.method() call incorrectly marked as pure instead of state-modifying by @Copilot in #237
  • Fix string truthiness in if-conditions to generate valid Solidity by @Copilot in #235
  • Generate Solidity overloads for functions with default parameter values by @Copilot in #234
  • Refactor: Split parser.ts (4,800+ lines) into smaller focused modules by @Copilot in #279
  • Refactor: Merge two import statements from types/index.ts in compiler.ts [XS] by @chase-manning in #280
  • Cleanup: webapp fetch error for npm version is silently swallowed [XS] by @chase-manning in #281
  • Cleanup: analysis.ts walkNestedBlocks has redundant while/do-while cases [XS] by @chase-manning in #282
  • Cleanup: Use SkittlesTypeKind enum instead of string casts in parser.ts [S] by @chase-manning in #283
  • Cleanup: Webapp Playground error handling and accessibility improvements [S] by @chase-manning in #284
  • Cleanup: Empty catch blocks swallow errors silently in compiler.ts [S] by @chase-manning in #286
  • Cleanup: Regex /extends\s+(\w+)/g duplicated in compiler.ts and resolver.ts [XS] by @chase-manning in #289
  • Cleanup: Deep relative imports in webapp/src/compiler.ts [XS] by @chase-manning in #288
  • Cleanup: Hardcoded external URLs in webapp should be centralized [XS] by @chase-manning in #287
  • Cleanup: isSuperCall and getSuperCallArgs duplicate the same condition in codegen.ts [XS] by @chase-manning in #285
  • Cleanup: Remove non-null assertions and add proper null checks [S] by @chase-manning in #290
  • Cleanup: Split types/index.ts by domain (config, IR, expressions) [S] by @chase-manning in #291
  • Cleanup: Add ESLint and Prettier configuration to repo root [S] by @chase-manning in #293
  • Cleanup: Invalidate stdlib registry cache in resolver.ts [XS] by @chase-manning in #292
  • Cleanup: Inconsistent behavioral test patterns (connectAs, destructuring, tx style) [S] by @chase-manning in #294
  • Refactor: Extract duplicated syntax highlighting into shared module in webapp [S] by @chase-manning in #295
  • Cleanup: Replace hardcoded colors with CSS custom properties in webapp [M] by @chase-manning in #297
  • Cleanup: Fix CSS color typo and duplicated variable definitions in docs [S] by @chase-manning in #296
  • Refactor: Split App.tsx (468 lines) into separate page section components [M] by @chase-manning in #298
  • Cleanup: Add Indexed to Pausable event parameters for consistency [XS] by @chase-manning in #299
  • Cleanup: defaultConfig duplicated in cache.test.ts vs fixtures.ts [XS] by @chase-manning in #300
  • Refactor: Extract shared test utilities for temp dirs, event parsing, and env setup [M] by @chase-manning in #301
  • Refactor: Split integration.test.ts (6,700+ lines) into focused test files [L] by @chase-manning in #303
  • Cleanup: Centralize shared test constants (ZERO_ADDRESS, MAX_UINT256, INITIAL_SUPPLY, timeouts) [S] by @chase-manning in #302
  • Cleanup: DRY violation between compileCommand and runCompilation in compile.ts [S] by @chase-manning in #304
  • Cleanup: Use named constants for ReentrancyGuard status values [XS] by @chase-manning in #305
  • Cleanup: Add error handling to cleanCommand and CLI entry point [XS] by @chase-manning in #307
  • Cleanup: Add config validation in loadConfig [S] by @chase-manning in #308
  • Cleanup: Define shared ZERO_ADDRESS constant in stdlib [S] by @chase-manning in #306
  • Refactor: Split initCommand into smaller functions and remove DRY violations [M] by @chase-manning in #309
  • Cleanup: Duplicate utility functions in codegen.ts (getFunctionKey, hasAncestorOrigin) [S] by @chase-manning in #310
  • Cleanup: Add explicit error handling for unknown expression/statement kinds in codegen [S] by @chase-manning in #312
  • Cleanup: Replace magic numbers and strings in compiler with named constants [S] by @chase-manning in #311
  • Refactor: Break up compile() function in compiler.ts (368 lines) [L] by @chase-manning in #314
  • Refactor: Split generateContractBody() in codegen.ts (468 lines) [M] by @chase-manning in #315
  • Refactor: Extract shared AST walking utilities from parser, analysis, and compiler [M] by @chase-manning in #316
  • Refactor: Replace module-level mutable state with context objects in compiler [L] by @chase-manning in #313
  • Refactor: Consolidate compileSolidity and compileSolidityBatch in solc.ts [S] by @chase-manning in #317
  • Support TypeScript private class fields (#field syntax) by @chase-manning in #318
  • Add error recovery: report multiple compilation errors instead of stopping at first by @chase-manning in #319
  • Support Solidity NatSpec comments from TypeScript JSDoc comments by @chase-manning in #320
  • Add Solidity output formatting/pretty-printing options by @chase-manning in #321

Full Changelog: v1.4.1...v1.5.0

1.4.1

Choose a tag to compare

@chase-mew chase-mew released this 07 Mar 19:43
be82382

What's Changed

  • Docs: Add operator reference table by @Copilot in #163
  • Support Map methods (get, set, has, delete) for mappings by @Copilot in #162
  • Add interactive playground to website by @Copilot in #164
  • Address review feedback from stdlib/OpenZeppelin imports PR by @Copilot in #166
  • 🚀 Add Open Zeppelin Style Template Imports by @chase-manning in #165
  • Support Math built-in methods (Math.min, Math.max, Math.pow, Math.sqrt) by @Copilot in #168
  • Support configurable Solidity pragma version and SPDX license by @Copilot in #167
  • 🚀 Add String Methods by @chase-manning in #169
  • 🎨 Switch to npm by @chase-manning in #170
  • 🚀 List Overhaul by @chase-manning in #171
  • Hoist KNOWN_ARRAY_METHODS to module scope and add max-arity checks for callback-based array methods by @Copilot in #173
  • 🐛 List Fixes by @chase-manning in #172
  • Support multiple interface implementation (implements multiple interfaces) by @Copilot in #174
  • Support function overloading by @Copilot in #176
  • Support TypeScript spread operator (...) for arrays by @Copilot in #177
  • Support optional chaining (?.) and nullish coalescing (??) operators by @Copilot in #178
  • Propagate view/pure annotations from concrete implementations to abstract method declarations by @Copilot in #179
  • Propagate known view/pure annotations for interface methods in external contract calls by @Copilot in #180
  • Fix local variable shadowing of state variables in generated Solidity by @Copilot in #181
  • Fix parameter name shadowing warnings in generated Solidity for getter/setter accessors by @Copilot in #182
  • Fix tuple-returning function incorrectly marked as pure instead of view by @Copilot in #183
  • fix: wrap ecrecover v argument in uint8() cast in codegen by @Copilot in #185
  • Add bytes32 type support and fix hash function return types by @chase-manning in #184

Full Changelog: v1.3.1...v1.4.1

1.3.1

Choose a tag to compare

@chase-mew chase-mew released this 01 Mar 14:56

What's Changed

  • Align skittles output directories with Hardhat conventions by @Copilot in #29
  • Rewrite docs, README, and webapp to focus on using Skittles, not Solidity compilation by @Copilot in #30
  • Fix --version flag to show Skittles compiler version by @Copilot in #92
  • Update Node.js requirement from 20+ to 22+ across docs, website, CI, and package.json by @Copilot in #91
  • Support exponentiation operator (**) by @Copilot in #88
  • Support Map<K, V> as alias for Record<K, V> by @Copilot in #84
  • Fix pure internal function calls incorrectly marking caller as view by @Copilot in #93
  • Support multiple return values (tuple returns) by @Copilot in #87
  • Support try/catch for external calls by @Copilot in #86
  • Support object destructuring for struct fields by @Copilot in #85
  • Support for...in loops over enum values by @Copilot in #82
  • Add abi.decode TypeScript syntax with type parameters by @Copilot in #80
  • Add watch mode for the compiler (skittles compile --watch) by @Copilot in #79
  • Support optional constructor parameters with default values by @Copilot in #78
  • Add source maps from TypeScript to generated Solidity by @Copilot in #77
  • Add unreachable code and unused variable warnings at the TypeScript level by @Copilot in #75
  • Support readonly arrays (compile to internal storage + public getter) by @Copilot in #94
  • Support console.log for debugging (compile to Hardhat console.log) by @Copilot in #95
  • Add string.length and string comparison support by @Copilot in #96
  • Support external contract calls via Contract() pattern by @Copilot in #97
  • Support abstract classes → abstract contracts by @Copilot in #98
  • Support ETH transfers from contracts via addr.transfer(amount) by @Copilot in #99
  • Filter unused shared definitions from generated contracts by @Copilot in #100
  • Fix duplicate shared definitions in same-file parent/child contracts by @Copilot in #101
  • Fix cross-file inheritance to generate Solidity import statements by @Copilot in #102
  • Fix EVM globals incorrectly marked as pure instead of view by @Copilot in #103
  • Fix super() call in constructor generates invalid Solidity by @Copilot in #105
  • Docs: Add common testing patterns to the Testing guide by @Copilot in #158
  • Add npm link to website header navigation by @Copilot in #160
  • Support ternary with void/side-effect expressions by @Copilot in #161
  • Add missing ETH transfer in staking contract withdraw() by @Copilot in #159

New Contributors

  • @Copilot made their first contribution in #29

Full Changelog: v1.2.6...v1.3.1

1.2.6

Choose a tag to compare

@chase-mew chase-mew released this 21 Feb 08:48
9c96aaf

What's Changed

  • 🐛 Fix Three Bugs with Interface Compiling by @chase-manning in #26
  • 🚀 Invalidate Cache on Skittles Version Update by @chase-manning in #27

Full Changelog: v1.2.5...v1.2.6

1.2.5

Choose a tag to compare

@chase-mew chase-mew released this 20 Feb 22:40
e1f54e6

What's Changed

  • 🚀 Add Support for Interfaces by @chase-manning in #24

Full Changelog: v1.2.4...v1.2.5

1.2.4

Choose a tag to compare

@chase-mew chase-mew released this 20 Feb 21:39
5cd8d90

What's Changed

  • ✅ Add Validation for Init Scripts by @chase-manning in #22
  • 🐛 Fix Issue With Missing Self Export by @chase-manning in #23

Full Changelog: v1.2.3...v1.2.4

1.2.3

Choose a tag to compare

@chase-mew chase-mew released this 20 Feb 16:01
  • 🐛 Fixed Mocha Version Issue

1.2.2

Choose a tag to compare

@chase-mew chase-mew released this 20 Feb 15:48
  • Fixed an issue with chai version in init script