Skip to content

Huge stability improvements. Move from Yarn to NPM

Pre-release
Pre-release

Choose a tag to compare

@alvaroloes alvaroloes released this 25 Jan 14:45

This is a huge release regarding the stability of the framework.

We’ve been having a lot of random issues lately because of dependency problems. Long story short: the underlying reason was that there are differences in the dependency management between Yarn and NPM and we were using both applications in different stages of the framework development. That was causing subtle errors but really hard to track, especially when running integration tests and deploying user applications.

Now, we only use NPM and Lerna to manage the monorepo.

⚠ Breaking Changes

There is one breaking change introduced in this release, but it is really easy to solve. After switching your Booster dependencies to this version, you need to change your src/index.ts file from this:

import { Booster } from '@boostercloud/framework-core'
export {
  Booster,
  boosterEventDispatcher,
  boosterPreSignUpChecker,
  boosterServeGraphQL,
  boosterNotifySubscribers,
  boosterTriggerScheduledCommand,
} from '@boostercloud/framework-core'

Booster.start()

To this (you can copy and paste):

import { Booster } from '@boostercloud/framework-core'
export {
  Booster,
  boosterEventDispatcher,
  boosterPreSignUpChecker,
  boosterServeGraphQL,
  boosterNotifySubscribers,
  boosterTriggerScheduledCommand,
} from '@boostercloud/framework-core'

Booster.start(__dirname) // <— This changed

As you can see, the only thing that changed is that now Booster.start takes a parameter with the folder where the file is located, which is __dirname.

New projects generated with the new version of the CLI boost new:project will work as expected and don’t need any change.



🚀 Improvements

There are several non-planned but very welcome improvements in this release:

  • Deployments are faster: When you deploy your Booster application, the framework will now prepare your code so that only the production dependencies are deployed. These dependences are much much lighter than the development dependencies, so it takes less time to compress and upload the project to the cloud provider
  • Warm up times are shorter: AWS Lambda functions (and the equivalent in other providers) are 10 times smaller, meaning that the first time they are executed (when the code needs to be parsed) will take much less time.

🩹 Fixes

This release has an uncountable number of fixes, especially regarding dependency management, that have made the framework much more stable and reliable.