Skip to content

Releases: insin/nwb

v0.9.2

26 Mar 15:43
Compare
Choose a tag to compare

Dependencies:

  • webpack-dev-middleware: v1.6.0 → v1.6.1 - fixes request path issue introduced in 1.6.0

v0.9.1

25 Mar 18:17
Compare
Choose a tag to compare

Fixed:

  • style-loader was not being specified to apply styles from additional chunks when extracting CSS.

v0.9.0

25 Mar 15:32
Compare
Choose a tag to compare

Breaking Changes:

  • Changes to how React and plain JS web apps are built:
    • Builds are now generated in dist/ instead of public/build/

    • index.html for builds is now generated based on a template in src/index.html, instead of using a static public/index.html [#34]

      Upgrading existing projects:

      • move your public/index.html to src/index.html and delete the <link> and <script> tags for vendor and app resources. These will now be injected at build time.
      • replace /public/build in your .gitignore with /dist/
    • public/ is now only for public files - any contents in this directory will now be copied to dist/ at the start of a build. The development server will also serve static content from public/.

Removed:

  • Backwards compatibility for nwb.config.js format changes made in 0.8 have been removed.

Added:

  • Added a --host option when running the dev server [#50]
  • ExtractTextPlugin (used to extract CSS when building) can now be configured using webpack.plugins.extractText config - this allows you to configure the allChunks setting if you want all CSS to be extracted when using code splitting.
  • HtmlWebpackPlugin (used to generate an index.html when building) can now be configured using webpack.plugins.html config.

Changed:

  • breakConfig: true has been added to default babel-loader config to avoid .babelrc files being resolved by Babel - all Babel configuration is expected to be in nwb.config.js [#63]
  • Static resources handled by Webpack's file-loader now include a hash in their filenames for cachebusting when they change [#38]

Dependencies:

  • babel: v5.8.34 → v5.8.38 - left-pad transitive dependency drama
  • babel-core: v5.8.34 → v5.8.38 - left-pad transitive dependency drama
  • connect-history-api-fallback: v1.1.0 → v1.2.0 - support custom Accept headers
  • copy-template-dir: v1.2.0 → v1.2.1 - support large template folders
  • expect: v1.14.0 → v1.16.0 - mostly packaging changes?
  • fs-extra: v0.26.5 → 0.26.7 - bug fixes for copy and emptyDir
  • glob: v7.0.0 → v7.0.3 - misc fixes
  • html-webpack-plugin: v2.9.0 → v2.14.0
  • karma: v0.13.21 → v0.13.22 - removed a large test file from npm package
  • karma-coverage: v0.5.3 → v0.5.5 - bug fixes
  • karma-mocha-reporter: v1.2.3 → v2.0.0 - add karma to peerDeps; wait for all browsers to run
  • npm-install-webpack-plugin: v2.0.2 → v3.0.0 - resolve.alias and resolve.root support [#83]
  • phantomjs-prebuilt: v2.1.4 → v2.1.6 - minor fixes to custom CA handling
  • react-transform-hmr: v1.0.2 → v1.0.4 - update react-proxy to fix a few correctness issues
  • style-loader: v0.13.0 → v0.13.1 - add query to style/useable
  • webpack-dev-middleware: v1.5.1 → v1.6.0
  • webpack-hot-middleware: v2.7.1 → v2.10.0 - improved error overlay styling
  • webpack-merge: v0.7.3 → v0.8.4 - change merging behavior so only loaders get prepended

v0.8.1

03 Mar 05:23
Compare
Choose a tag to compare

Dependencies:

  • karma-mocha-reporter: v1.2.2 → v1.2.3 - don't fail test suites containing skipped tests

v0.8.0

25 Feb 15:50
Compare
Choose a tag to compare

Breaking Changes:

  • npm-install-webpack-plugin is now used instead of npm-install-loader to implement nwb serve --auto-install.

    If you were configuring automatic npm installation using a loaders.install.query.cli config object, this should be moved to webpack.plugins.install instead.

nwb.config.js Format Changes:

nwb v0.8 will support the old format and display warning messages about the changes required before upgrading to nwb v0.9.

  1. React component and vanilla JS module npm build configuration must now be specificed as a build object:

    // < v0.9
    module.exports = {
      type: 'react-component',
      externals: {react: 'React'},
      global: 'MyComponent',
      jsNext: true,
      umd: true
    }
    // v0.9
    module.exports = {
      type: 'react-component',
      build: {
        externals: {react: 'React'},
        global: 'MyComponent',
        jsNext: true,
        umd: true
      }
    }
  2. Webpack configuration must now be specified as a webpack object:

    // < v0.9
    module.exports = {
      type: 'react-app',
      loaders: {
        css: {
          query: {
            modules: true
          }
        }
      }
    }
    // v0.9
    module.exports = {
      type: 'react-app',
      webpack: {
        loaders: {
          css: {
            query: {
              modules: true
            }
          }
        }
      }
    }
  3. Webpack define config must now be specified in a plugins object:

    // < v0.9
    module.exports = {
      type: 'react-app',
      define: {
        __VERSION__: JSON.stringify(require('./package.json').version)
      }
    }
    // v0.9
    module.exports = {
      type: 'react-app',
      webpack: {
        plugins: {
          define: {
            __VERSION__: JSON.stringify(require('./package.json').version)
          }
        }
      }
    }
  4. All "extra" Webpack config must be specified in a an extra object, including extra loaders. The new object must correspond with Webpack's config file layout.

    // < v0.9
    module.exports = {
      type: 'react-app',
      loaders: {
        extra: [/* ... */]
      }
    }
    // v0.9
    module.exports = {
      type: 'react-app',
      webpack: {
        extra: {
          module: {
            loaders: [/* ... */]
          }
        }
      }
    }

Changes:

  • nwb.config.js is now only required when running generic build commands: build, clean, serve, test
    • type config is only required when running a generic build command, but if provided it must be valid.
  • Karma tests now always run just once in a CI environment regardless of the --server flag - this allows you to use --server in your default npm test command if you want to, without needing a separate run script for CI.
  • Development instructions in project templates were moved from README.md to a CONTRIBUTING.md file, and are now documented using npm and npm run commands instead of global nwb commands.
  • All commands are now run in the current working directory - you no longer need to require.resolve() full paths to extra Babel plugins configured in nwb.config.js, just use their names as normal and Babel will now be able to import them.
  • Upgraded to PhantomJS v2 for Karma tests.
    • Babel polyfills are no longer included in Webpack config for Karma, as PhantomJS v2 uses a more recent version of WebKit.

Added:

  • Extra webpack config can now be configured via a webpack.extra Object.
    • To support adding other webpack built-in plugins via extra, if a function is exported from nwb.config.js, it will now be called with an object containing the following properties:
      • command - the nwb command being executed
      • webpack - the webpack module (for configuring extra plugins using nwb's version of webpack)
  • Project type-specific versions of the build, clean and serve commands are now officially documented for direct use.
  • A test:watch npm script was added to project template package.json.

Dependencies:

  • autoprefixer-loader: v3.1.0 → v3.2.0
  • cross-spawn: v2.1.4 → v2.1.5 - update which dependency (minor)
  • expect: v1.13.4 → v1.14.0 - new features
  • express: v4.13.3 → v4.13.4 - deps
  • extract-text-webpack-plugin: v0.9.1 → v1.0.1 - use webpack-sources
  • glob: v6.0.3 → v7.0.0 - throw if cwd is not a directory
  • html-webpack-plugin: v1.7.0 → v2.9.0
  • inquirer: v0.11.2 → v0.12.0
  • karma: v0.13.18 → v0.13.21 - socket.io 1.4.5 seems to have fixed the post-test hanging issue, bug fixes and new features
  • karma-mocha: v0.2.1 → v0.2.2
  • karma-mocha-reporter: v1.1.5 → v1.2.2 - add diff output for failed tests
  • karma-phantomjs-launcher: v0.2.3 → v1.0.0 - use phantomjs-prebuild
  • mocha: v2.3.4 → v2.4.5
  • phantomjs v1.9.19 → phantomjs-prebuilt v2.1.4 - update installer to PhantomJS 2.x, renamed package
  • qs: v5.2.0 → v6.1.0 - revert ES6 requirement, new allowDots option and some fixes
  • react-transform-catch-errors: v1.0.1 → v1.0.2 - remove some files from the npm package
  • react-transform-hmr: v1.0.1 → v1.0.2 - remove some files from the npm package
  • resolve: v1.1.6 → v1.1.7 - fix node_modules paths on Windows
  • rimraf: v2.5.0 → v2.5.2
  • webpack: v1.12.11 → v1.12.14 - fix Windows filename backslash incompatibility
  • webpack-dev-middleware: v1.4.0 → v1.5.1 - platform-agnostic path joining, use res.send when available
  • webpack-hot-middleware: v2.6.0 → v2.7.1 - improve hint when hot reloads aren't accepted, update strip-ansi dependency (major), update stats handling

v0.7.2

15 Jan 17:03
Compare
Choose a tag to compare

Fixed:

  • react-app and web-app Webpack build config didn't have output.publicPath set, so images required from JavaScript weren't being found [#55]
  • Test runs no longer hang for up to a minute after completion [#49]

Dependencies:

  • inquirer: v0.11.1 → v0.11.2 - display fixes
  • karma: v0.13.19 → v0.13.18 - downgraded due to the test hanging issue being introduced
  • karma-sourcemap-loader: v0.3.6 → v0.3.7 - avoid EMFILE errors; fix charset bug; fix RangeError exception
  • socket.io: v1.3.7 - temporarily pinned in nwb's dependencies until the Karma test hang issue is resolved
  • webpack: v1.12.10 → v1.12.11
  • webpack-merge: v0.7.2 → v0.7.3 - bugfix

v0.7.1

10 Jan 08:39
Compare
Choose a tag to compare

Fixed:

  • Express middleware had a broken import.

Added:

  • Added an autoInstall option to Express middleware.

Dependencies:

  • glob: v6.0.3 → v6.0.4 - remove util._extend to avoid deprecation warnings
  • karma: v0.13.18 → v0.13.19 - handle new socket.io internal format
  • webpack: v1.12.9 → v1.12.10
  • webpack-merge: v0.7.1 → v0.7.2 - fix inclusion of removed changelog dependency

v0.7.0

05 Jan 20:31
Compare
Choose a tag to compare

Fixed:

  • Fall back to nwb's dependencies in Webpack config instead of using an alias so babel-runtime can be picked up when optional: ['runtime'] is used [hopefully fixing the weird /node_modules/node_modules/ issue seen in #37]

Added:

  • Added an --auto-install flag to nwb serve which automatically installs npm dependencies and saves them to your package.json while developing.

nwb serve --auto-install example

Removed:

  • jsNext config no longer defaults to true if not present.

Changed:

  • Use .x for dependencies when generating skeleton project package.json instead of range sigils.

Dependencies:

  • babel-runtime: v5.8.34 → v5.8.29 - downgraded due to a regression in typeof-react-element.js when used in conjunction with optional: ['runtime']
  • karma: v0.13.16 → v0.13.18
  • karma-phantomjs-launcher: v0.2.2 → v0.2.3 - correct cli argument order
  • webpack-merge: v0.7.0 → v0.7.1 - performance improvements

v0.6.4

02 Jan 20:55
Compare
Choose a tag to compare

Fixed:

  • nwb build-umd no longer errors if there is no externals config.

Changed:

  • nwb clean now deletes the coverage/ directory.

Dependencies:

  • inquirer: v0.11.0 → v0.11.1 - fix list overflow bug

v0.6.3

31 Dec 23:11
Compare
Choose a tag to compare

Fixed:

  • Exit the process correctly with a non-zero exit code when an async command fails, such as nwb test [#36] [jihchi]

Dependencies:

  • karma-mocha-reporter: v1.1.4 → v1.1.5 - show error message when karma runner ends with error
  • webpack-merge: v0.5.1 → v0.7.0 - bug fix for merging arrays within nested structures