Skip to content

Commit

Permalink
chore(cli): move to lerna and scoped packages (#434)
Browse files Browse the repository at this point in the history
* fix(loader,plugin): fix generators path bug

* cli(refactor): improve folder structure (#371)

* cli(refactor): improve folder structure

* chore(linting): fix linter errors

* cli(filepath): use local import instead

* cli(migrate): refactor error handling

* chore(review): fix review comments

* chore(review): fix review comments

* chore(review): fix review comments

* chore(version): v.2.0.14

* Add break as commit type and listed the type of commit in the documentation (#379)

* docs(commits): listed the list of type of commits available

* cli(init): mode support to config (#364)

* cli(init): mode support to config

* cli(bugfix): Allow mode "none" in CLI (#381)

* cli(init): use extractMiniCSSPlugin (#363)

* cli(init): skip redundant question

* cli(init): use mini-css-extract-plugin

* Retrieve information for CLI option from webpack schema options file (#392)

* cli(refactor): fetch available modes directly from webpack options schema

* cli(refactor): Retrieve information from webpackOptionSchema

* cli(add): write configuration to yeoman file (#348)

* misc(add): variable parity, prettify

* cli(add): write config to yeoman-rc

* misc(add): improve generator questions

* fix(init): output file name for single output (#403)

improved output filename

* cli(migrate): Update migration question (#402)

* cli(init): webpack4 ready (#356)

* cli(init): webpack4 ready

* cli(init): remove unused variable, still @next on etwp

* cli(init): Allow to use default entry in `init`

* cli(init): Fix typo in comment

* cli(init): Optimization transform and tests

* cli(init): Fix non-optimized option for splitChunks

* cli(init): Add cachingGroup per entry, don't show name in prod

* cli(init): Add cachingGroup's defaults, fix entry

* cli(init): Add a link to where the defaults live

* cli(init): Remove default caching group definition from example

* Add NoEmitOnErrorsPlugin transformation (#399)

* ast(migrate): handle no emit on error

* ast(migrate): handle module concatenation and named modules

* ast(migrate): handle module concatenation and named modules

* fix(ast): checks validity of an identifier (#360)

added test cases for validate identifier

* cli(entry): quotes sanitization (#337)

* chore: minor doc fixes

* cli(entry): quotes sanitization

* tests(entry): add test case for double quotes

* tests(entry): update snapshots

* misc(utils): entry - variable parity

* misc(prop-types): sort

* cli(entry): multiple entries quotes sanitization

* chore(versioning): v 2.0.15

* chore(versioning): push new package version

* cli(fix): remove reference to specific version during migration (#410)

* fix: remove reference to specific version during migration

* fix: rephrase update message

* chore(docs): updated old references to the extract text plugin (#412)

* chore(dev): added break to the list of type of commit

* init(fix): removed references to extract text plugin

* fix(commit): rollback

* cli(migration): update UglifyJS transformation (#416)

* cli(migration): Update UglifyJS migration file to fit webpack4 configuration

* cli(migration): Add cases where require variable does not need to exist

* cli(migration): Add transformation for usage of webpack.otimization.UglifyPlugin

* cli(tests): Update test snapshots after updating transformation

* cli(fix): fix expressionContent being null

* cli(refactor): remove plugins array if empty

Created function on ast-utils so every other transformation can use this.

* tests: add tests for new ast-utils method

* fix: fix test names and jsdoc

* fix: update maxSize for utils folder

* ast(cli): Recursively parse AST (#341)

* ast(refactor): wip refactor

* ast(refactor): wip refactor

* ast(init): refactor

* test(refactor): refactor test suite

* tests(define): swap args

* ast(parsing): refactor stuff

* ast(init): refactor

* ast(init): refactor tests

* chore(tests): remove some unneeded tests

* chore(pkg): update package.json

* chore(project): clear up project structure

* chore(cli): remove unneded files

* chore(git): add gitignore to yeoman file

* chore(deps): update pkg.json

* tests(snapshots): update snapshots

* tests(jest): use empty module for snapshots

* tests(snap): only test one prop

* chore(publishing): add semantic-release (#415)

* chore(release): [WIP] add semantic-release

* test(ci): wip

* test(ci): add node versions

* test(ci): remove extra test

* tests(ci): revise

* tests(ci): only push to npm on master

* tests(ci): use matrix on jobs

* tests(ci): revise

* tests(ci): update

* tests(ci): test

* tests(ci): test

* tests(ci): p

* tests(ci): update travis.yml

* chore(release): revise travis

* misc(yeoman): update yeoman

* chore(travis): revise travis

* misc(travis): revise travis.yml

* chore(travis): remove redundant code

* chore(pkg): add keywords

* 2.1.1

* 2.1.2

* cli(cmds): revise yargs command (#422)

* use yargs.command instead of yargs.option for sub-commands

* cli(node): Add node flags to CLI (#377)

* feat: add support for node flags

* tests: Fix node-flags test

* misc: Fix test failing due to not-found webpack-cli

* misc: remove comment

* misc: refactor removing unecessary args

* tests: add more tests to prevent argument collision

* cli(cmds): remove strict

* fix(node): remove node option for now

* chore(lerna): refactor

* chore(lerna): refactor

* chore(refactor): refactor stuff

* chore(package): update pkg.lock

* chore(templates): Update issue templates (#432)

Adds fancy templates

* ast(init): add topScope prop

* ast(merge): re-add merge prop

* cli(lerna): refactor

* chore(lerna): refactor

* chore(lerna): update

* chore(lint): revise

* chore(refactor): refactor

* chore(tests): use lerna for tests

* chore(travis): don't cache me outside

* chore(pkg): remove prefer global

* chore(release): v.2.1.3

* chore(package.lock): update pkg.lock

* fix(loader,plugin): fix generators path bug

* chore(version): v.2.0.14

* Add break as commit type and listed the type of commit in the documentation (#379)

* docs(commits): listed the list of type of commits available

* cli(bugfix): Allow mode "none" in CLI (#381)

* cli(init): use extractMiniCSSPlugin (#363)

* cli(init): skip redundant question

* cli(init): use mini-css-extract-plugin

* Retrieve information for CLI option from webpack schema options file (#392)

* cli(refactor): fetch available modes directly from webpack options schema

* cli(refactor): Retrieve information from webpackOptionSchema

* cli(add): write configuration to yeoman file (#348)

* misc(add): variable parity, prettify

* cli(add): write config to yeoman-rc

* misc(add): improve generator questions

* fix(init): output file name for single output (#403)

improved output filename

* cli(migrate): Update migration question (#402)

* fix(ast): checks validity of an identifier (#360)

added test cases for validate identifier

* chore(versioning): v 2.0.15

* chore(versioning): push new package version

* cli(fix): remove reference to specific version during migration (#410)

* fix: remove reference to specific version during migration

* fix: rephrase update message

* chore(docs): updated old references to the extract text plugin (#412)

* chore(dev): added break to the list of type of commit

* init(fix): removed references to extract text plugin

* fix(commit): rollback

* misc(yeoman): update yeoman

* cli(cmds): revise yargs command (#422)

* use yargs.command instead of yargs.option for sub-commands

* cli(node): Add node flags to CLI (#377)

* feat: add support for node flags

* tests: Fix node-flags test

* misc: Fix test failing due to not-found webpack-cli

* misc: remove comment

* misc: refactor removing unecessary args

* tests: add more tests to prevent argument collision

* cli(cmds): remove strict

* fix(node): remove node option for now

* chore(templates): Update issue templates (#432)

Adds fancy templates

* cli(lerna): refactor

* chore(lerna): refactor

* chore(pkg): remove prefer global

* chore(travis): Add encrypted private ssh key

* fix(pkg): test auto setup

* cli(init): revise installation steps (#441)

* cli(init): revise installation steps

* chore(formatting): format code

* cli(tests): refactor tests

* chore(travis): run lockfile cmds on tests (#444)

* Update dependencies to enable Greenkeeper 🌴 (#443)

chore(greenkeeper): Update dependencies to enable Greenkeeper 🌴

* chore(docs): update readme

* chore(travis): add Node.js 10 (#425)

* chore(travis): move npm ci to install task (#424)

* chore(travis): move npm ci to install task

* chore: trigger new build

* chore: upgrade Node.js for Appveyor to 8

* chore: remove redundanct npm install command
  • Loading branch information
evenstensberg committed May 14, 2018
1 parent bdf7e5a commit fa452a0
Show file tree
Hide file tree
Showing 250 changed files with 31,084 additions and 38,916 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: "{build}"
environment:
fast_finish: true
matrix:
- nodejs_version: "6"
- nodejs_version: "8"
platform: x86

build: off
Expand Down
1 change: 1 addition & 0 deletions .cz-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
// sort type values in asc
types: [
{ value: "ast", name: "ast: init, migrate, add, etc" },
{ value: "break", name: "break: changes that break the behaviour of the cli" },
{ value: "chore", name: "chore: Updating deps, docs, linting, etc" },
{ value: "cli", name: "cli: Core CLI things" },
{ value: "docs", name: "docs: Documentation" },
Expand Down
8 changes: 7 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ module.exports = {
{
"allowModules": [
"webpack",
"webpack-dev-server"
"webpack-dev-server",
"@webpack-cli/generators",
"@webpack-cli/init",
"@webpack-cli/migrate",
"@webpack-cli/utils",
"@webpack-cli/generate-loader",
"@webpack-cli/generate-plugin"
]
}
],
Expand Down
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: "[BUG]: \U0001F41EReport"
about: "Template for \U0001F98E's you encounter with webpack-cli"

---

**Describe the bug**

A 💯 way to do this is to provide your configuration via a GitHub gist and/or to use markdown when describing which commands you used when the error occurred! Be precise and clear in your description of the bug.

**What is the current behavior?**

This is where you elaborate on the current behavior of the cli, how it behaves normally differing from the previous version/build you did.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Please paste the results of `webpack-cli info` here, and mention other relevant information*

**Additional context**
Add any other context about the problem here like linking to an similar issue you might think is the cause.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: "[FEATURE]: Feature request \U0001F914"
about: "Suggest ideas you wish webpack-cli had \U0001F680"

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
23 changes: 23 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
test
coverage
lib
.travis.yml
.eslintrc*
.fitcommitjsrc.json
.vscode
.editorconfig
.eslintignore
__testfixtures__
*.test.js
*.input.js
types.js
*.spec.js
docs
jsdoc.json
.appveyor.yml
.codecov.yml
*.snap
open-bot.yml
.nyc_output
git_deploy_key.enc
*.md
48 changes: 35 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
sudo: false
notifications:
email: false
language: node_js
node_js:
- "8"
- "7"
- "6"

matrix:
include:
Expand All @@ -8,6 +15,9 @@ matrix:
- os: linux
node_js: "stable"
env: JOB_PART=integration
- os: linux
node_js: "10"
env: JOB_PART=integration
- os: linux
node_js: "8"
env: JOB_PART=integration
Expand All @@ -17,23 +27,35 @@ matrix:
- os: linux
node_js: "6"
env: JOB_PART=integration
sudo: false

notifications:
email: false

before_install:
- npm i -g npm
# Decrypt the git_deploy_key.enc key into /tmp/git_deploy_key
- openssl aes-256-cbc -K $encrypted_04be16cef0a7_key -iv $encrypted_04be16cef0a7_iv -in git_deploy_key.enc -out /tmp/git_deploy_key -d
# Make sure only the current user can read the private key
- chmod 600 /tmp/git_deploy_key
# Create a script to return the passphrase environment variable to ssh-add
- echo 'echo ${SSH_PASSPHRASE}' > /tmp/askpass && chmod +x /tmp/askpass
# Start the authentication agent
- eval "$(ssh-agent -s)"
# Add the key to the authentication agent
- DISPLAY=":0.0" SSH_ASKPASS="/tmp/askpass" setsid ssh-add /tmp/git_deploy_key </dev/null

- '[[ $(node -v) =~ ^v9.*$ ]] || npm install -g npm@latest' # skipped when using node 9

install:
- npm ci
- npm install --global codecov
- npm install --global eslint
- npm install -g codecov
- npm install -g eslint
- npm install -g greenkeeper-lockfile@1

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload

script:
- npm run travis:$JOB_PART
- commitlint-travis
jobs:
include:
- stage: commit lint
script: commitlint-travis
- stage: NPM release
if: branch = master
node_js: "lts/*"
script: npm run travis-deploy-once "npm run semantic-release"
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
<a name="2.0.14"></a>
# 2.0.14 (2018-04-05)
[Full Changelog](https://github.com/webpack/webpack-cli/compare/2.0.13...2.0.14)

## New Features

* use npm ci for tests (#367) ([#368](https://github.com/webpack/webpack-cli/pull/368))
* add envinfo as `webpack-cli info` command ([51ab19f](https://github.com/webpack/webpack-cli/commit/51ab19f))
* --entry should override config.entry (#155) ([#358](https://github.com/webpack/webpack-cli/pull/358))

## Chore

* coverage: added reporters inside package.json ([c7d80fb](https://github.com/webpack/webpack-cli/commit/c7d80fb))
* upgrade: webpack 4.2 and other dependencies ([#362](https://github.com/webpack/webpack-cli/pull/362))
* version: v.2.0.13 ([2222f1d](https://github.com/webpack/webpack-cli/commit/2222f1d))

## CLI

* refactor: improve folder structure ([#371](https://github.com/webpack/webpack-cli/pull/371))

## Fix

* loader,plugin: fix generators path bug ([b4bfafb](https://github.com/webpack/webpack-cli/commit/b4bfafb))

<a name="2.0.13"></a>
# 2.0.13 (2018-03-22)
[Full Changelog](https://github.com/webpack/webpack-cli/compare/2.0.12...2.0.13)
Expand Down
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,17 @@ format that includes a **type** and a **subject**:
<footer>
```

This is the list of *type* of commits that we accept:
* ast
* chore
* cli
* docs
* feat
* fix
* misc
* tests
* break

The **header** is mandatory.

Any line of the commit message cannot be longer 100 characters. This allows the message to be easier
Expand Down
2 changes: 1 addition & 1 deletion INIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This answers to the output directory of your application. The output directory i

3. `Are you going to use this in production? (Y/n)`

If you answer `Yes` to this, we add [`ExtractTextPlugin`](https://github.com/webpack-contrib/extract-text-webpack-plugin) to your project. This means that your style files will be separated in production from the bundles where they are used. If you answer `No`, we will not use the plugin, and `Question 6` will be ignored by default.
If you answer `Yes` to this, we add [`MinCssExtractPlugin`](https://github.com/webpack-contrib/mini-css-extract-plugin) to your project. This means that your style files will be separated in production from the bundles where they are used. If you answer `No`, we will not use the plugin, and `Question 6` will be ignored by default.

4. `Will you be using ES2015? (Y/n)`

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
[![Dependency Status](https://david-dm.org/webpack/webpack-cli.svg)](https://david-dm.org/webpack/webpack-cli)
[![Code Climate](https://codeclimate.com/github/webpack/webpack-cli/badges/gpa.svg)](https://codeclimate.com/github/webpack/webpack-cli)
[![chat on gitter](https://badges.gitter.im/webpack/webpack.svg)](https://gitter.im/webpack/webpack)
[![Greenkeeper badge](https://badges.greenkeeper.io/webpack/webpack-cli.svg)](https://greenkeeper.io/)

# Webpack CLI

Expand Down
27 changes: 15 additions & 12 deletions bin/webpack.js → cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@
(function() {
// wrap in IIFE to be able to use return

const resolveCwd = require("resolve-cwd");
// Local version replace global one
const localCLI = resolveCwd.silent("webpack-cli/bin/webpack");
if (localCLI && localCLI !== __filename) {
require(localCLI);
const importLocal = require("import-local");
// Prefer the local installation of webpack-cli
if (importLocal(__filename)) {
return;
}

require("v8-compile-cache");
const ErrorHelpers = require("./errorHelpers");
const ErrorHelpers = require("./utils/errorHelpers");

const NON_COMPILATION_ARGS = [
"init",
Expand All @@ -43,20 +41,23 @@
});

if (NON_COMPILATION_CMD) {
// eslint-disable-next-line
require("../lib/index")(NON_COMPILATION_CMD, process.argv);
// TODO: prompt if package isn't installed, run installed package otherwise.
//return require(`./commands/${NON_COMPILATION_CMD}`)(...process.argv);
return;
}

const yargs = require("yargs").usage(`webpack-cli ${require("../package.json").version}
const yargs = require("yargs").usage(`webpack-cli ${
require("./package.json").version
}
Usage: webpack-cli [options]
webpack-cli [options] --entry <entry> --output <output>
webpack-cli [options] <entries...> --output <output>
webpack-cli <command> [options]
For more information, see https://webpack.js.org/api/cli/.`);

require("./config-yargs")(yargs);
require("./utils/config-yargs")(yargs);

const DISPLAY_GROUP = "Stats options:";
const BASIC_GROUP = "Basic options:";
Expand Down Expand Up @@ -236,7 +237,7 @@ For more information, see https://webpack.js.org/api/cli/.`);

let options;
try {
options = require("./convert-argv")(argv);
options = require("./utils/convert-argv")(argv);
} catch (err) {
if (err.name !== "ValidationError") {
throw err;
Expand Down Expand Up @@ -482,7 +483,9 @@ For more information, see https://webpack.js.org/api/cli/.`);
} else if (stats.hash !== lastHash) {
lastHash = stats.hash;
const statsString = stats.toString(outputOptions);
const delimiter = outputOptions.buildDelimiter ? `${outputOptions.buildDelimiter}\n` : "";
const delimiter = outputOptions.buildDelimiter
? `${outputOptions.buildDelimiter}\n`
: "";
if (statsString) stdout.write(`${statsString}\n${delimiter}`);
}
if (!options.watch && stats.hasErrors()) {
Expand Down
Loading

0 comments on commit fa452a0

Please sign in to comment.