pizza-for 1.0.2 → 2.0.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.
package/bin/index.js CHANGED
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
-
4
- const howManyPizza = require( "how-many-pizza" );
5
- const yargs = require( "yargs" );
6
- const chalk = require( "chalk" );
7
- const boxen = require( "boxen" );
2
+ import yargs from "yargs/yargs";
3
+ import { hideBin } from "yargs/helpers";
4
+ import howManyPizza from "how-many-pizza";
5
+ import chalk from "chalk";
6
+ import boxen from "boxen";
8
7
 
9
8
  const boxenOptions = {
10
9
  padding: 1,
@@ -12,7 +11,7 @@ const boxenOptions = {
12
11
  borderStyle: "round"
13
12
  };
14
13
 
15
- const options = yargs
14
+ const options = yargs( hideBin( process.argv ) )
16
15
  .usage( "$0 <number-of-people> [--slices-per-person=3] [--slices-per-pizza=8]" )
17
16
  .demand( 1 )
18
17
  .default( "slices-per-pizza", 8 )
@@ -32,6 +31,4 @@ const output = [
32
31
  chalk.cyan( pizzaText )
33
32
  ];
34
33
 
35
- // console.log( `You're going to need at least ${ pizzas } pizzas!` );
36
-
37
34
  console.log( chalk.green( boxen( output.join( " " ), boxenOptions ) ) );
@@ -0,0 +1,12 @@
1
+ import rg from "eslint-config-reverentgeek";
2
+
3
+ export default [
4
+ ...rg.configs[ "node-esm" ],
5
+ {
6
+ rules: {
7
+ "n/no-unpublished-import": [ "error", {
8
+ allowModules: [ "eslint-config-reverentgeek" ]
9
+ } ]
10
+ }
11
+ }
12
+ ];
package/package.json CHANGED
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "name": "pizza-for",
3
- "version": "1.0.2",
3
+ "version": "2.0.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
+ "type": "module",
6
7
  "scripts": {},
7
8
  "keywords": [],
8
9
  "author": "David Neal <david@reverentgeek.com> (https://reverentgeek.com)",
9
10
  "license": "MIT",
10
11
  "dependencies": {
11
- "boxen": "^4.2.0",
12
- "chalk": "^4.1.0",
12
+ "boxen": "^8.0.1",
13
+ "chalk": "^5.3.0",
13
14
  "how-many-pizza": "^1.1.2",
14
15
  "yargs": "^17.4.0"
15
16
  },
16
17
  "devDependencies": {
17
- "eslint": "^8.12.0",
18
- "eslint-config-reverentgeek": "^3.0.0"
18
+ "eslint": "^9.14.0",
19
+ "eslint-config-reverentgeek": "^5.1.0"
19
20
  },
20
21
  "bin": {
21
22
  "pizza-for": "./bin/index.js"
@@ -24,4 +25,4 @@
24
25
  "type": "git",
25
26
  "url": "https://github.com/reverentgeek/pizza-for.git"
26
27
  }
27
- }
28
+ }
package/readme.md CHANGED
@@ -14,7 +14,7 @@ A command-line tool for calculating the number of pizzas you're gonna need for y
14
14
 
15
15
  ## Requirements
16
16
 
17
- To use this application, you will need [Node.js](https://nodejs.org/) version 12 or higher.
17
+ To use this application, you will need [Node.js](https://nodejs.org/) version 20 or higher.
18
18
 
19
19
  ## Installing Locally
20
20
 
package/.eslintrc.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- module.exports = {
4
- extends: [ "reverentgeek/node" ]
5
- };