-
-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update yeoman-environment to v4.0.0 (#793)
* update yeoman-environment to v4.0.0 * update supported node versions * remove npm update from workflow
- Loading branch information
Showing
21 changed files
with
6,966 additions
and
2,588 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,13 +20,12 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
node-version: [12.x, 14.x, 16.x] | ||
node-version: [18.x, 20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install -g npm@latest | ||
- run: npm ci | ||
- run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
#! /usr/bin/env node | ||
'use strict'; | ||
const env = require('yeoman-environment').createEnv(); | ||
const tabtab = require('tabtab')({ | ||
name: 'yo', | ||
cache: !process.env.YO_TEST | ||
}); | ||
const Completer = require('./completer'); | ||
|
||
const completer = new Completer(env); | ||
(async () => { | ||
// eslint-disable-next-line node/no-unsupported-features/es-syntax | ||
const {createEnv} = await import('yeoman-environment'); | ||
const completer = new Completer(createEnv()); | ||
|
||
tabtab.completer = completer; | ||
tabtab.completer = completer; | ||
|
||
// Lookup installed generator in yeoman environment, | ||
// respond completion results with each generator | ||
tabtab.on('yo', completer.complete.bind(completer)); | ||
// Lookup installed generator in yeoman environment, | ||
// respond completion results with each generator | ||
tabtab.on('yo', completer.complete.bind(completer)); | ||
|
||
// Register complete command | ||
tabtab.start(); | ||
// Register complete command | ||
tabtab.start(); | ||
})(); | ||
|
||
module.exports = tabtab; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function namespaceToName(namespace) { | ||
return namespace.split(':')[0]; | ||
} | ||
|
||
module.exports = { | ||
namespaceToName | ||
}; |
Oops, something went wrong.