@inquirer/password 0.0.19-alpha.0 → 0.0.20-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/demo.js +1 -1
  2. package/index.js +4 -4
  3. package/package.json +5 -4
package/demo.js CHANGED
@@ -1,4 +1,4 @@
1
- const password = require('.');
1
+ import password from './index.js';
2
2
 
3
3
  (async () => {
4
4
  let answer;
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
- const input = require('@inquirer/input');
2
- const chalk = require('chalk');
1
+ import input from '@inquirer/input';
2
+ import chalk from 'chalk';
3
3
 
4
- module.exports = (config, ...args) => {
4
+ export default (config, ...args) => {
5
5
  if (config.transformer) {
6
6
  throw new Error(
7
7
  'Inquirer password prompt do not support custom transformer function. Use the input prompt instead.'
@@ -12,7 +12,7 @@ module.exports = (config, ...args) => {
12
12
  {
13
13
  ...config, // Make sure we do not display the default password
14
14
  default: undefined,
15
- transformer: (input, { isFinal }) => {
15
+ transformer(input, { isFinal }) {
16
16
  if (config.mask) {
17
17
  return String(config.mask).repeat(input.length);
18
18
  }
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@inquirer/password",
3
- "version": "0.0.19-alpha.0",
3
+ "type": "module",
4
+ "version": "0.0.20-alpha.0",
4
5
  "description": "Inquirer password prompt",
5
6
  "main": "index.js",
6
7
  "repository": "SBoudrias/Inquirer.js",
@@ -18,11 +19,11 @@
18
19
  "license": "MIT",
19
20
  "homepage": "https://github.com/SBoudrias/Inquirer.js/blob/master/packages/password/README.md",
20
21
  "dependencies": {
21
- "@inquirer/input": "^0.0.20-alpha.0",
22
- "chalk": "^4.1.1"
22
+ "@inquirer/input": "^0.0.21-alpha.0",
23
+ "chalk": "^5.0.1"
23
24
  },
24
25
  "publishConfig": {
25
26
  "access": "public"
26
27
  },
27
- "gitHead": "83b807522ca6e10ab90a6921eac9d9655e2dac38"
28
+ "gitHead": "cd0d1465327c0e98a89c937a80b7c473b6d00f74"
28
29
  }