Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: yeoman/generator
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dae9aa7f2e38969f4542b44c3903a140c639c59b
Choose a base ref
...
head repository: yeoman/generator
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: aad5fac0dfb6a9492cda445a4fbf11260170395b
Choose a head ref

Commits on Apr 30, 2018

  1. Copy the full SHA
    0d97e24 View commit details

Commits on May 21, 2018

  1. Make tests robust (#1072)

    * Do not warn about nested callbacks in tests
    
    The tests are always deeper nested than regular files. So accept
    deeper nesting in these files.
    
    * Make the tests robust
    
    Currently the tests often fail because of timeouts. This increases
    the maximum timeout for these tests to prevent that from happening.
    BridgeAR authored and SBoudrias committed May 21, 2018
    Copy the full SHA
    b4f1bfc View commit details

Commits on Jun 30, 2018

  1. npm audit fix

    SBoudrias committed Jun 30, 2018
    Copy the full SHA
    314a52c View commit details
  2. Copy the full SHA
    91b297c View commit details
  3. Copy the full SHA
    5fca282 View commit details
  4. Copy the full SHA
    29880bd View commit details
  5. Breaking: Remove callbacks/promises from install APIs (Fix #1077)

    And rename runInstall to scheduleInstallTask
    
    This work is done to remove a very common area where new Yeoman users
    get stuck. The install tasks do not actually run the installation, it
    only schedule the installation to run later in the run loop.
    
    This caused a lot of issues with users creating dead-loops in their
    generators, and it was really not an obvious error to fix.
    
    The proper way to handle actions after the installation process if to
    add a hook into the `end` phase.
    SBoudrias committed Jun 30, 2018
    Copy the full SHA
    240a666 View commit details
  6. Copy the full SHA
    4f3c6e8 View commit details
  7. Copy the full SHA
    b1e62ec View commit details

Commits on Jul 1, 2018

  1. 3.0.0

    SBoudrias committed Jul 1, 2018
    Copy the full SHA
    682ea68 View commit details

Commits on Jul 5, 2018

  1. Fix test on Windows (#1078)

    .gitattributes makes all .js files use LF as EOL. This change makes
    the tests pass on Windows.
    bzoz authored and SBoudrias committed Jul 5, 2018
    Copy the full SHA
    68d7da1 View commit details

Commits on Jul 24, 2018

  1. scheduleInstallTask should fail incase installer fails and --force-in…

    …stall option set Fix #1080 (#1081)
    regevbr authored and SBoudrias committed Jul 24, 2018
    Copy the full SHA
    74ada52 View commit details
  2. 3.1.0

    SBoudrias committed Jul 24, 2018
    Copy the full SHA
    db0e153 View commit details

Commits on Jul 28, 2018

  1. force-install is not used properly #1082 (#1083)

    * force-install is not used properly #1082
    
    * force-install is not used properly #1082
    regevbr authored and SBoudrias committed Jul 28, 2018
    Copy the full SHA
    93ad4e0 View commit details
  2. 3.1.1

    SBoudrias committed Jul 28, 2018
    Copy the full SHA
    392fd5d View commit details

Commits on Jul 29, 2018

  1. Copy the full SHA
    1cd1031 View commit details

Commits on Dec 22, 2018

  1. Overload composeWith method to allow a generator class along its path (

    …#1099)
    
    * #composeWith generator class + path, ignore yarn.lock, add vscode launch config for debugging
    
    * ESLint autofix in pretest
    
    * Removed  eslint autofix
    
    * composeWith(object...) better error info
    
    * Switched from yarn to npm ci to fix travis build eslint errors
    
    * Bumped eslint and prettier to fix bad syntax error inconsistent across Node versions
    MarcoScabbiolo authored and SBoudrias committed Dec 22, 2018
    Copy the full SHA
    ac944f7 View commit details
  2. Bump dev dependencies

    SBoudrias committed Dec 22, 2018
    Copy the full SHA
    1fd0d5f View commit details
  3. Bump dependencies

    SBoudrias committed Dec 22, 2018
    Copy the full SHA
    8111562 View commit details
  4. 3.2.0

    SBoudrias committed Dec 22, 2018
    Copy the full SHA
    3bbeef0 View commit details

Commits on May 7, 2019

  1. Copy the full SHA
    f7f7755 View commit details

Commits on May 8, 2019

  1. Bump dev dependencies

    SBoudrias committed May 8, 2019
    Copy the full SHA
    715fd36 View commit details
  2. Copy the full SHA
    cf6bcec View commit details
  3. Bump dependencies

    SBoudrias committed May 8, 2019
    Copy the full SHA
    9daf15e View commit details
  4. Copy the full SHA
    f240d1a View commit details
  5. 4.0.0

    SBoudrias committed May 8, 2019
    Copy the full SHA
    7d48623 View commit details

Commits on May 28, 2019

  1. Upgrade to mem-fs-editor@6

    SBoudrias committed May 28, 2019
    Copy the full SHA
    0666f19 View commit details
  2. 4.0.1

    SBoudrias committed May 28, 2019
    Copy the full SHA
    12ca8b0 View commit details

Commits on Sep 1, 2019

  1. fix: mistake regular file that contains utf8 characters for binary fi…

    …le (#1119)
    
    * fix: mistake regular file that contains utf8 characters for binary file
    
    WHen a regular file contains utf8 characters outside ascii charset,
    the `istextorbinary` would return wrong result. See the testcase in test/util.js.
    
    To solve this, we should use the `extension detection` instead.
    The author had explained [here](bevry/istextorbinary#9 (comment))
    
    * chore: add .prettierrc
    edvardchen authored and SBoudrias committed Sep 1, 2019
    Copy the full SHA
    345518b View commit details
  2. 4.0.2

    SBoudrias committed Sep 1, 2019
    Copy the full SHA
    120a6cd View commit details

Commits on Sep 21, 2019

  1. Copy the full SHA
    3eecec4 View commit details
  2. Expose addMethod (#1121)

    * Expose addMethod as queueMethod.
    
    * Add test for queueMethod
    mshima authored and SBoudrias committed Sep 21, 2019
    Copy the full SHA
    d18a384 View commit details

Commits on Sep 26, 2019

  1. Implement abort option. (#1120)

    This option when set to true, we will abort on first conflict. (used for
    testing reproducibility)
    mshima authored and SBoudrias committed Sep 26, 2019
    Copy the full SHA
    7b05f03 View commit details
  2. 4.1.0

    SBoudrias committed Sep 26, 2019
    Copy the full SHA
    ed138c6 View commit details

Commits on Oct 15, 2019

  1. Print diff on bailling. (#1126)

    mshima authored and SBoudrias committed Oct 15, 2019
    Copy the full SHA
    fd0dc5e View commit details
  2. Add support to array on composeWith (#1125)

    * Add support to array on composeWith
    
    * Add composeWith workflow test.
    
    * Add test to verify if config set in one storage instance is updated on
    another.
    mshima authored and SBoudrias committed Oct 15, 2019
    Copy the full SHA
    272920a View commit details
  3. Copy the full SHA
    23031e2 View commit details
  4. Call getter binding the generator. (#1129)

    This allows generator property getter's to use 'this' variable.
    mshima authored and SBoudrias committed Oct 15, 2019
    Copy the full SHA
    4674176 View commit details

Commits on Oct 27, 2019

  1. Support importing Generators with default exports (#1133)

    * Support importing Generators with default exports
    
    This behaviour is likely as in the yeoman/environments Generator factory 
    
    https://github.com/yeoman/environment/blob/v2.5.0/lib/environment.js#L425
    
    * Use correct formatting
    mfal authored and SBoudrias committed Oct 27, 2019
    Copy the full SHA
    a2026cd View commit details
  2. Set runningState on generator. (#1130)

    * Set runningState on generator.
    
    * Make runningState cleanup Node.js < 10 compatible
    mshima authored and SBoudrias committed Oct 27, 2019
    Copy the full SHA
    ec7ef60 View commit details
  3. Migrate from detect-conflict to diff (JsDiff) (#1132)

    * Change bail test to a constructor
    
    * Reimplement detect-conflict with diff
    
    * Add skipRegenerate option to conflicter.
    
    This will skip a rewrite on identical files.
    
    * Bail on create new file too.
    
    * Update conflicter.js
    
    * Update index.js
    mshima authored and SBoudrias committed Oct 27, 2019
    Copy the full SHA
    1689eba View commit details
  4. 4.2.0

    SBoudrias committed Oct 27, 2019
    Copy the full SHA
    27416e8 View commit details

Commits on Nov 2, 2019

  1. Bump mixin-deep from 1.3.1 to 1.3.2 (#1136)

    Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
    - [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
    - [Commits](jonschlinkert/mixin-deep@1.3.1...1.3.2)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and UlisesGascon committed Nov 2, 2019
    Copy the full SHA
    78b81de View commit details
  2. Bump lodash from 4.17.11 to 4.17.13 (#1138)

    Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.13.
    - [Release notes](https://github.com/lodash/lodash/releases)
    - [Commits](lodash/lodash@4.17.11...4.17.13)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and UlisesGascon committed Nov 2, 2019
    Copy the full SHA
    9ea6b6d View commit details
  3. Bump lodash.merge from 4.6.1 to 4.6.2 (#1137)

    Bumps [lodash.merge](https://github.com/lodash/lodash) from 4.6.1 to 4.6.2.
    - [Release notes](https://github.com/lodash/lodash/releases)
    - [Commits](https://github.com/lodash/lodash/commits)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and UlisesGascon committed Nov 2, 2019
    Copy the full SHA
    95fcbd6 View commit details
  4. Bump eslint-utils from 1.3.1 to 1.4.3 (#1139)

    Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.3.
    - [Release notes](https://github.com/mysticatea/eslint-utils/releases)
    - [Commits](mysticatea/eslint-utils@v1.3.1...v1.4.3)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and UlisesGascon committed Nov 2, 2019
    Copy the full SHA
    866cea1 View commit details

Commits on Dec 15, 2019

  1. Copy the full SHA
    14651ca View commit details
  2. 4.3.0

    SBoudrias committed Dec 15, 2019
    Copy the full SHA
    b9ea81a View commit details

Commits on Dec 23, 2019

  1. Add issues templates. (#1144)

    mshima authored Dec 23, 2019
    Copy the full SHA
    99f0360 View commit details

Commits on Dec 24, 2019

  1. Add dry-run option (#1141)

    mshima authored and SBoudrias committed Dec 24, 2019
    Copy the full SHA
    4c2a675 View commit details
Showing with 26,631 additions and 8,304 deletions.
  1. +3 −0 .editorconfig
  2. +2 −0 .eslintignore
  3. +3 −0 .github/FUNDING.yml
  4. +8 −0 .github/ISSUE_TEMPLATE/bug_report.md
  5. +1 −0 .github/ISSUE_TEMPLATE/config.yml
  6. +8 −0 .github/ISSUE_TEMPLATE/feature_request.md
  7. +12 −0 .github/dependabot.yml
  8. +29 −0 .github/workflows/ci.yml
  9. +56 −0 .github/workflows/gh_pages.yml
  10. +68 −0 .github/workflows/integration.yml
  11. +17 −0 .github/workflows/stale.yml
  12. +3 −0 .gitignore
  13. +5 −0 .prettierignore-doc
  14. +3 −0 .prettierrc
  15. +3 −4 .travis.yml
  16. +23 −0 .vscode/launch.json
  17. +17 −0 .xo-config.json
  18. +0 −9 benchmark/module.js
  19. +8 −7 jsdoc.json
  20. +248 −0 lib/actions/fs.js
  21. +13 −19 lib/actions/help.js
  22. +108 −92 lib/actions/install.js
  23. +53 −0 lib/actions/package-json.js
  24. +21 −14 lib/actions/spawn-command.js
  25. +6 −2 lib/actions/user.js
  26. +949 −303 lib/index.js
  27. +0 −48 lib/util/binary-diff.js
  28. +0 −203 lib/util/conflicter.js
  29. +4 −4 lib/util/deprecate.js
  30. +7 −5 lib/util/prompt-suggestion.js
  31. +151 −19 lib/util/storage.js
  32. +21,933 −6,896 package-lock.json
  33. +42 −67 package.json
  34. +856 −179 test/base.js
  35. +0 −236 test/conflicter.js
  36. +8 −2 test/deprecate.js
  37. +239 −0 test/environment.js
  38. +1 −0 test/fixtures/file-contains-utf8.yml
  39. +1 −1 test/fixtures/foo-copy.js
  40. +22 −0 test/fixtures/generator-defaults/app/index.js
  41. +3 −0 test/fixtures/generator-defaults/app/options.js
  42. +9 −0 test/fixtures/generator-defaults/app/prompts.js
  43. +2 −0 test/fixtures/generator-defaults/app/templates/foo-template.js
  44. +12 −0 test/fixtures/generator-defaults/package.json
  45. +3 −2 test/fixtures/generator-mocha/main.js
  46. +340 −0 test/fs.js
  47. +371 −0 test/generators-compose-workflow.js
  48. +118 −2 test/generators.js
  49. +287 −82 test/install.js
  50. +37 −0 test/integration.js
  51. +110 −0 test/package-json.js
  52. +136 −72 test/prompt-suggestion.js
  53. +40 −10 test/spawn-command.js
  54. +224 −20 test/storage.js
  55. +8 −6 test/user.js
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -6,3 +6,6 @@ indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.nyc_output
test/fixtures
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

open_collective: yeoman
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: needs triage
assignees: ''

---
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: needs triage, enhancement
assignees: ''

---
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 0

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: NPM Test

on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
branches:
- '*'

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [12.x, 14.x]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.1.4
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g npm@latest
- run: npm ci
- run: npm test
56 changes: 56 additions & 0 deletions .github/workflows/gh_pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Update api docs
on:
push:
branches:
- docs
release:
types: [published]
workflow_dispatch:

jobs:
build:
name: Update api docs
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2.1.4
- run: npm install -g npm@latest
- uses: actions/checkout@v2
with:
path: source
- uses: actions/checkout@v2
with:
ref: gh-pages
path: yeoman-generator-doc
- name: Update jsdoc
working-directory: source
run: |
npm ci
npm run doc
sed -i -e 's:^[[:space:]]*<!--[[:space:]]*$::g' -e 's:^[[:space:]]*-->[[:space:]]*$::g' ../yeoman-generator-doc/global.html
npm install prettier@latest
npm run doc:prettier
- name: Create commit
working-directory: yeoman-generator-doc
if: always()
run: |
git add .
git config --local user.email ""
git config --local user.name "Github Actions"
git commit -a -m "Update api for ${{github.event.release.name}}" || true
- name: Create Pull Request
if: always()
id: cpr
uses: peter-evans/create-pull-request@v3.8.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Update api for ${{github.event.release.name}}'
title: 'Update api for ${{github.event.release.name}}'
body: |
Update api docs
labels: automated pr
branch: gh-pages-master
path: yeoman-generator-doc
- name: Check outputs
run: |
echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}"
echo "Pull Request Number - ${{ steps.cpr.outputs.pr_number }}"
68 changes: 68 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Integration Build

on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
branches:
- '*'

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node-version: [14.x]

steps:
- name: Checkout yeoman-test
uses: actions/checkout@v2
with:
repository: yeoman/yeoman-test
path: yeoman-test

- name: Checkout yeoman-generator
uses: actions/checkout@v2
with:
path: yeoman-generator

- name: Checkout yeoman-environment
uses: actions/checkout@v2
with:
repository: mshima/environment
path: yeoman-environment

- uses: actions/setup-node@v2.1.4
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g npm@latest

- name: Run yeoman-test test
run: |
cd $GITHUB_WORKSPACE/yeoman-test
npm ci
npm install ${{ github.repository }}#$GITHUB_SHA
npm install yeoman/environment#main
npm test
- name: Run yeoman-generator test
if: always()
run: |
cd $GITHUB_WORKSPACE/yeoman-generator
npm ci
npm install yeoman/yeoman-test#main
npm install yeoman/environment#main
npm test
- name: Run yeoman-environment test
if: always()
run: |
cd $GITHUB_WORKSPACE/yeoman-environment
npm ci
npm install ${{ github.repository }}#$GITHUB_SHA
npm install yeoman/yeoman-test#main
npm test
17 changes: 17 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Close stale issues"
on:
schedule:
- cron: "0 0 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3.0.16
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open with no activity. Remove stale label or comment or this will be closed'
days-before-stale: 30
days-before-close: 5
stale-issue-label: 'stale'
exempt-issue-labels: 'not stale'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules
coverage
.nyc_output
yarn.lock
.project

5 changes: 5 additions & 0 deletions .prettierignore-doc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.git
**/scripts/**
**/styles/**

3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
sudo: false
language: node_js
node_js:
- 6
- 8
- node
- 14
- 12
after_success:
- npm run coverage
- ./deploy.sh
@@ -16,6 +15,6 @@ env:
- DOCS_DIR: ../yeoman-generator-doc
- GH_OWNER: yeoman
- GH_PROJECT_NAME: generator
- DEPLOY_ON_NODE_VERSION: 6
- DEPLOY_ON_NODE_VERSION: 14
- secure: >-
Hv7gACQoYGtesz1NTJYRHjGCimEJEjj4bQP2iTpDUUbfAiYe/4QPemoyDEFjRxbu5m2uoYwMk0AQrW7DnQhNAhl7u24jYnRgQyd/2GOx3xZgjwnao27gsrTHss4IyXEaS2h3kRuIVSD+xibz/lwZm+erHOQ9VOwvCQkOKnILXW8=
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Mocha All",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": ["--timeout", "999999", "--colors", "${workspaceFolder}/test"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
{
"type": "node",
"request": "launch",
"name": "Mocha Current File",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": ["--timeout", "999999", "--colors", "${file}"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
]
}
17 changes: 17 additions & 0 deletions .xo-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"space": true,
"envs": ["es2020", "node", "mocha"],
"prettier": true,
"rules": {
"promise/prefer-await-to-then": "off",
"prefer-rest-params": "off",
"node/prefer-promises/fs": "off",
"eslint-comments/no-unused-disable": "off",
"eslint-comments/disable-enable-pair": "off",
"unicorn/no-fn-reference-in-iterator": "off",
"prefer-spread": "off",
"default-param-last": "off",
"unicorn/explicit-length-check": "off"
}
}

9 changes: 0 additions & 9 deletions benchmark/module.js

This file was deleted.

15 changes: 8 additions & 7 deletions jsdoc.json
Original file line number Diff line number Diff line change
@@ -11,14 +11,15 @@
},
"templates": {
"logo": {
"url": "https://raw.githubusercontent.com/yeoman/yeoman.github.io/source/app/assets/img/logo.png",
"width": "127px",
"height": "14px"
"url": "https://raw.githubusercontent.com/yeoman/yeoman.github.io/source/app/assets/img/logo.png",
"width": "127px",
"height": "14px"
},
"name": "Generator",
"footerText": "BSD license Copyright (c) Google"
"footerText": "BSD license Copyright (c) Google",
"default": {
"includeDate": false
}
},
"plugins": [
"plugins/markdown"
]
"plugins": ["plugins/markdown"]
}
Loading