Skip to content

Releases: Cohesible/synapse

v0.0.18

13 Jan 19:22
Compare
Choose a tag to compare

Enhancements

  • status shows the current --target option and is presented similar to compile

Bug Fixes

  • run does not recompile simple files (#9)
  • Serialization of anonymous classes (#10)
  • Improved serialization of class methods
  • Source mapping now works correctly for imported packages within the same project
  • Deploying circularly referenced files now works
  • Improved symEval:
    • Map is no longer treated as "unknown"
    • Multiple assignments to a symbol covered by branches are treated as the union of those assignments

v0.0.17

30 Dec 23:29
Compare
Choose a tag to compare

Bug Fixes

  • run/deploy/test commands automatically recompile when new source files are added
  • The CLI no longer shows certain error messages twice

v0.0.16

17 Dec 17:18
Compare
Choose a tag to compare

Enhancements

  • Added minimal report-bug command to simplify bug reporting.
  • Implemented help command
    • Both synapse help <command> and synapse <command> --help will show more detailed documentation per-command

Bug Fixes

  • deploy command now correctly normalizes target file paths. Previously, using anything other than a bare relative file path did not work as expected.

v0.0.15

12 Dec 20:03
Compare
Choose a tag to compare

Enhancements

  • run and repl prompt to deploy instead of failing when a TTY is available
  • Install script shows instructions to source/reload if synapse is not found in your PATH

Bug Fixes

  • Inputs to run are now correctly normalized
    • Previously, synapse run ./main.ts would fail
  • Nested files not explicitly included in tsconfig.json are now included

v0.0.14

11 Dec 23:57
Compare
Choose a tag to compare

Improvements

  • Smarter init command
    • No longer requires an empty directory; per-file conflicts are reported instead
    • Automatically compiles the current program for immediate editor support (does not yet work for multiple programs)
  • console.log calls in the top-level scope now show in the final output
  • console.log calls now show a user-friendly resource name instead of the internal name

Bug fixes

  • Adding and/or renaming resources no longer causes apparent caching issues
    • The problem was due to the recently added "auto-refactor" feature

v0.0.13

10 Dec 06:17
Compare
Choose a tag to compare

Bug Fixes

  • Deploying Queue for --target local now succeeds
  • Removed redundant compile during deploy when no files have changed

v0.0.12

09 Dec 23:30
Compare
Choose a tag to compare

Breaking Changes

  • Renamed the command migrate to detect-refactors to differentiate it from others forms of migration (i.e. DBs)
    • The old name will continue to work for now
  • Improved resource key generation - significantly less churn for resources created in packages
    • Resources deployed using earlier versions are no longer tracked. Use synapse detect-refactors to fix-up any older deployments.
    • Expect another breaking change to resource tracking in a subsequent release. It's incredibly important for us to get tracking in a good spot because it directly affects ecosystem scalability. The next step is to apply a reduction technique to support many common code refactors automatically.

New Features

  • Zig integration - write native modules using Zig
  • Smart recompilation from .env file changes
    • Changes to environment variables that affect the resulting program automatically trigger a recompilation on relevant commands (most notably test and deploy)
    • Only environment variables present in the relevant .env file as well as SYNAPSE_ENV are checked
  • Automatic deployment updates for simple code changes
    • Code changes (such as renaming a variable or function) that only affect at most 1 resource of a given type are automatically corrected, reducing the need to use detect-refactors
    • Later releases will be able to handle many more cases

Performance Improvements

  • Reduced deploy time significantly by moving to a binary format for deploy instructions. Expect local deploys to take half the time, and cloud deploys by around 10%. synapse test should be significantly faster due to this change.
  • Checking the test cache is now many times faster

Bug Fixes

  • deploy --dry-run no longer hangs when nothing has changed
  • Provider contexts are now instantiated on-demand regardless of the --target option
    • Previously creating a LambdaFunction from @cohesible/synapse-aws with --target local failed
  • The first test in a test suite is now cached correctly
  • Deprecation warnings no longer fail a deployment (whoops!)

v0.0.11

31 Aug 01:56
Compare
Choose a tag to compare

New features

  • Smart test caching - only re-run tests with changed inputs
  • before and after test hooks - run code before and/or after every test in a suite
  • move-resource command - useful for refactoring, allows you to move existing resources to a new location in source code
  • import-resource command (experimental) - imports the state of an existing resource into your program

Performance improvements

  • Further reductions in start-up time (10-20%)
  • Reduced overhead for synapse compile
  • (Linux/Mac) Moved to mimalloc 2.1.7 for significantly better allocation performance across threads
  • Improved V8's garbage collector under high-throughput situations

Compilation and synthesis

  • Permissions solver works on bound functions
  • for loop variables are captured per-iteration rather than as a single symbol

Bug fixes

  • Lengthy terminal output now wraps around to subsequent lines instead of truncated
  • query-logs no longer treats user errors as "system" messages
  • Multiple providers of the same type no longer use the same cache key
  • (Windows) Detect changed files correctly for the deploy command
  • (Windows) upgrade no longer silently fails

Features-in-progress

Support for Zig-based native modules (include language server support) is almost complete. This is a major step towards enabling developers to create, share, package, and deploy their own high-performance modules. The end-goal is to produce minimal executables that only include the code absolutely necessary to run.

Significant progress has been made on a CI/CD system that "just works" for Synapse packages/deployments. This will first be used with Synapse itself to iron out any issues before possibly becoming a service offering and/or the source code is made available for self-hosting. The system is of course developed using Synapse.

v0.0.10

19 Jul 01:40
Compare
Choose a tag to compare

Improved performance on macOS and Linux

  • Reduced startup time by 10-20ms or around 33%
  • Slightly faster compilations from updating to TypeScript 5.5.2

New Commands

  • query-logs - shows logs from deployed resources. All resources are checked by default.
    • You can provide an identifer to filter the logs, e.g. query-logs service for const service = new HttpService()
    • Only some resources have separate logs. Currently, this is limited to Function and HttpService.
  • migrate - automatically detects if any deployed resources were renamed or moved in source code, moving them on the next deploy.
    • This is useful if you changed the name of a stateful resource but want to keep the existing state
  • upgrade - check for and potentially install the latest version of the CLI

Core API changes

  • Exposed a generic symEval function for symbolic execution. This is the primary mechanism for automatically determining runtime requirements such as AWS permissions. See the AWS integration for an example of combining symEval with other core APIs.
  • Added a move function to help with refactoring library code. Example usages will be added over time.
  • Added stubWhenBundled to forcefully strip code that you know won't be executed when bundled
  • Added registerLogProvider which can be used to provide logs for query-logs. The provider used for Lambda functions shows the expected inputs/outputs.

Other notable changes

  • Code deployed to AWS API Gateway now automatically returns a 304 if the response has an etag header and it matches the if-none-match header in the request, if present.
  • Improved support for providers from the Terraform registry
  • Fixed installation bug related to caching fs installs
  • The target env is shown when compiling if it's not the default and not passed as a parameter
  • Changed the local impl. of Bucket to persist state after being moved by migrate

v0.0.9

30 Jun 21:54
Compare
Choose a tag to compare

BREAKING CHANGES:

  • Bucket.get now returns Blob | undefined if no encoding is provided
  • Reworked HttpService.addRoute into HttpService.route. Route handlers are now provided a Request object instead of a bespoke interface.
  • Programs are now identified with a different strategy. Existing programs should be moved automatically. Open an issue if you run into any problems.

Fixes for Windows:

  • Incremental builds now work correctly
  • Installed package executables no longer fail
  • Multiple problems with building Synapse from source