Rules_nodejs: Compile list of features & bugs to fix for 2.0 milestone

Created on 16 Jan 2020  Â·  12Comments  Â·  Source: bazelbuild/rules_nodejs

With 1.0 released and the holidays over, it's time to start planning our 2.0 milestone (and set a target date).

Thanks to everyone who contributed to 1.0 and to our users for stress testing us! We got a lot in for 1.0 but we also left a lot on the table to achieve for 2.0.

Here's is a working list to get the process started.

(from 2019-01-16 meeting notes: https://docs.google.com/document/d/11e9RSzZ01s_SaFYUPd77WRxxllgNxjXloNHYgIP95hQ/edit#heading=h.76yzrrrtmplq)

FEATURES

  • Watch mode

    • Working for the general case so ibazel can run a tool such as webpack devserver

  • Simpler ts_library & ng_module replacements (much of the complexity of ts_library is due to its use inside google which could be avoided if code was not shared)

    • more user control of tsconfig settings

    • one output flavor (ts_library produced two outputs: es5 umd & es2015 esm)

    • concurrent worker mode

    • incremental build mode

    • pruned input list

    • TS composite project support

    • strict deps

    • .js in DefaultInfo output

    • ng_module replacement could be very similar to ts_library replacement with just the addition of assets & calling ngtsc instead of tsc

    • expected_diagnostics

    • prototyping at: https://github.com/gregmagolan/rules_nodejs/tree/labs/labs

  • node_module rule -- light weight pkg_npm without the npm integration?

    • could generate a basic package.json with module_name and main (for the main entry point other than index.js)

    • could take a new list of npm runtime deps for use by binary rules, by nodejs_image

    • could also parse a user supplied package.json to determine the moodule_name that the linker would use if a user supplies a package.json

  • JSModuleInfo provider

    • this is now useful for the ts_library & ng_module replacements & node_modules implementations

  • rules_docker improvements

    • PR already out just needs review & landing

  • jest_test macro (or at least a good example of one)
  • yarn workspaces support
  • Support for bazel running Angular architect to build Angular apps & libs
  • Better examples for community to follow for widely used tools in the node ecosystem

    • jest, mocha, webpack (incl. devserver), etc...

    • jasmine_test example that used jasmine directly instead of using a runner

    • can we reach feature parity without wrapping jasmine in a custom runner and if not why not?

    • simpler karma_test example does not use the karma_web_test concatjs which requires UMD inputs

    • simpler protractor_test example that doesn't require a templated config

MAJOR BUGS

  • prevent symlinks from escaping into the copies of node_modules visible under execroot & runfiles
discussion

Most helpful comment

I would like to propose Nodejs code coverage aggrigation.

All 12 comments

Anything I missed? Please add suggestions & refinements to this thread.

This list will get converted into features & issues in the https://github.com/bazelbuild/rules_nodejs/milestone/5 milestone.

I would like to propose Nodejs code coverage aggrigation.

A few items for the Angular team:

  • upstream npm_integration_test I wrote there as it would be useful for our users in general
  • investigate simpler and more flexible browser provisioning that can work for the general case—-right now the way rules_webtesting sets up browsers & suites is complicated & we’re not using most of the features of that repo; just hijacking their browser binaries which are difficult to configure—-I think that can be improved on without too much effort

Also finish up turning on the linker for the general nodejs_binary case & make the runfiles require patches optional—-it may be that Windows users will want to turn them on.

  • Look at removing the node_modules attribute
  • Use @npm/bazelisk instead of mirroring @bazel/bazel on npm
    EDIT: done (thanks @alexeagle)

IMO the current issued bugs are a higher priority than adding new features.

someway we should able to keep update the version of rollup etc.

  • Remove node_modules from runfiles

@marcus-sa rollup is currently a peerDep, so you do can install anything in this range >=1.0.0 <2.0.0

In our contributor sync meeting, we went through this whole list, and each item is either done, has a separate issue in the 2.0 milestone, or is infeasible in the 2.0 timeframe (next few weeks)

Was this page helpful?
0 / 5 - 0 ratings