Skip to content

v31.0.0

Choose a tag to compare

@hugomrdias hugomrdias released this 23 Feb 15:43

Highlights

Speed improved by 46% to 90%

aegir now uses esbuild everywhere, to bundle, in the browser tests, to transpile TS in realtime for node tests, and more. Read about esbuild speed here.
Screenshot 2021-02-19 at 12 17 35

Code coverage is also lightning fast by using the internal v8 coverage instead of instrumentation with 3rd party tools like instanbul/nyc, in node it uses c8 and in the browser playwright api to get the internal chromium v8 coverage.

Based on several of our repos:

  • Running node tests in Typescript repos is 46% faster.
  • Generating coverage is 60% faster.
  • Running browser tests is 80% faster.
  • Compiling the browser bundle is 73%-90% faster.

10% smaller in size and 20% less files

Lots of aegir dependencies were removed, webpack, babel, karma, all the plugins from these and a lot more. This also makes installing aegir about 64% faster.

Configuration and Types

aegir can now be fully configured and customised using repo local config files or package.json and types for the configuration options are exported to make your life even easier.

Webkit support

We can now run our tests inside webkit to further improve our test suites.

Code Coverage for browser code

This one was blocked for a long time by the underlying tools but not anymore 🚀, our browser specific code will finally be represented in our coverage numbers.

Changelog

  • New aegir configuration setup, with proper merging between cli flags and config file
    • aegir property in package.json can be used to provide configuration in addition to the current .aegir.js file.
    • All command can be configured with config file or package.json property
    • Release command will pickup all the other commands config
  • New improved documentation with typedoc 0.20 with better support for commonjs
  • .js files are now outputted by the build command when --ts-repo flag is enabled
  • Linter config upgraded to 2.0.0
  • The lint command was improved (we were using deprecated methods) and the output changed a bit.
    • The output formatter now writes proper clickable paths to the errors
  • Aegir is fully typed now
  • TS command now copies all .d.ts inside the src folder to the dist and if a folder called types exists inside the root folder that folder is also copied to dist.
  • bundle-size github action doesn't generate types
  • Theres a new experimental aegir check command that will tell you about :
    • duplicates in the bundle
    • files that use node builtins but dont have browser swaps or npm dependencies for it.
  • TS runtime transpilation for node tests uses esbuild-register instead of babel to be ultra fast
  • Support for running tests in Webkit
  • Coverage supported in node and browser tests, the output can be upload directly to codecov no need to run nyc to generate a report. Notes: electron coverage is not supported yet and you can still use nyc as you would now.
  • Removed webpack, karma and some babel packages
  • Build and test use esbuild for ultra fast bundles
  • Test uses playwright-test instead of karma, for faster runs, cov support, webkit support and more
  • Node tests coverage uses c8instead of nyc for faster runs
  • Commands removed
    • update-last-successful-build
    • update-rc
    • update-release-branch-lockfiles
    • publish-rc
    • commit-lint
  • Electron tests can be started in parallel and electron bin download will not fail.
  • Aegir exports config types so the user can take advantage of type check and completion in .aegir.js
    • Don't forget to add .aegir.js to your tsconfig.json, when generating types aegir will ignore it automatically
'use strict'

/** @type {import('aegir').PartialOptions} */
module.exports = {
}
  • Hooks removed in favor of test.before and test.after see migration guide
    • test.before receives aegir options as a param
    • test.after receives aegir options and the return value of test.before so you can cleanup whatever before started.
    • test.after run even if tests fail

Migration guide

https://github.com/ipfs/aegir/blob/master/md/migration-to-v31.md