Skip to content
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

release v31 #737

Merged
merged 43 commits into from
Feb 23, 2021
Merged

release v31 #737

merged 43 commits into from
Feb 23, 2021

Conversation

hugomrdias
Copy link
Member

@hugomrdias hugomrdias commented Feb 4, 2021

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

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.

Code coverage is also lightning fast by using the internal v8 coverage instead of instrumention 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.

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 a lot 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.

Migration guide https://github.com/ipfs/aegir/blob/9000abae849ff5a51ce7addf0e0b483dd4923a10/md/migration-to-v31.md

PR:
multiformats/js-multihash#115
ipfs/js-ipfs#3528
ChainSafe/js-libp2p-noise#89

todo:

  • close issues
  • add metrics
  • readme

closes #728
closes #707
closes #704
closes #619
closes #608
closes #596
closes #587
closes #573
closes #570
closes #558
closes #527
closes #513
closes #487
closes #471
closes #453
closes #444
closes #420
closes #415
closes #397
closes #378
closes #361
closes #352
closes #347
closes #345
closes #339
closes #332
closes #330
closes #325
closes #316
closes #287
closes #269
closes #303
closes #215
closes #107
closes #102

@hugomrdias hugomrdias changed the title feat: use esbuild and playwright-test release v31 Feb 18, 2021
@hugomrdias hugomrdias merged commit 059290f into master Feb 23, 2021
@hugomrdias hugomrdias deleted the feat/remove-webpack-karma branch February 23, 2021 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment