@anansi/cli 2.0.35 → 2.1.1

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/CHANGELOG.md +14 -0
  2. package/package.json +4 -3
  3. package/run.mjs +7 -5
package/CHANGELOG.md CHANGED
@@ -3,6 +3,20 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ### [2.1.1](https://github.com/ntucker/anansi/compare/@anansi/cli@2.1.0...@anansi/cli@2.1.1) (2023-03-09)
7
+
8
+ **Note:** Version bump only for package @anansi/cli
9
+
10
+ ## [2.1.0](https://github.com/ntucker/anansi/compare/@anansi/cli@2.0.35...@anansi/cli@2.1.0) (2023-03-05)
11
+
12
+ ### 🚀 Features
13
+
14
+ * Support ESM generator-js ([a7714a3](https://github.com/ntucker/anansi/commit/a7714a3e02fa7265c06c4ddee96acfd9b2f5bd85))
15
+
16
+ ### 📦 Package
17
+
18
+ * Update `execa` to v7 ([#1867](https://github.com/ntucker/anansi/issues/1867)) ([04adea9](https://github.com/ntucker/anansi/commit/04adea946dd5eabfd54eb5ffe1ca7241ddc0e6f3))
19
+
6
20
  ### [2.0.35](https://github.com/ntucker/anansi/compare/@anansi/cli@2.0.34...@anansi/cli@2.0.35) (2023-03-05)
7
21
 
8
22
  **Note:** Version bump only for package @anansi/cli
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anansi/cli",
3
- "version": "2.0.35",
3
+ "version": "2.1.1",
4
4
  "description": "Fast React Web Apps",
5
5
  "homepage": "https://github.com/ntucker/anansi/tree/master/packages/cli#readme",
6
6
  "repository": {
@@ -51,11 +51,12 @@
51
51
  "npm": ">= 6.0.0"
52
52
  },
53
53
  "dependencies": {
54
- "@anansi/generator-js": "^10.2.20",
54
+ "@anansi/generator-js": "^11.0.1",
55
55
  "bin-version-check": "^5.0.0",
56
56
  "chalk": "^4.1.2",
57
57
  "commander": "^10.0.0",
58
- "execa": "^5.1.1",
58
+ "execa": "^7.0.0",
59
+ "import-meta-resolve": "^2.2.1",
59
60
  "latest-version": "^7.0.0",
60
61
  "yo": "^4.3.1"
61
62
  },
package/run.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from 'commander';
3
- import execa from 'execa';
3
+ import { execa } from 'execa';
4
4
  import fs from 'fs';
5
- import { createRequire } from 'module';
5
+ import { resolve } from 'import-meta-resolve';
6
6
  import path from 'path';
7
7
  import { dirname } from 'path';
8
8
  import { fileURLToPath } from 'url';
@@ -12,8 +12,6 @@ import { fileURLToPath } from 'url';
12
12
  import { verifyAndPrompt } from './check-version.mjs';
13
13
 
14
14
  const __dirname = dirname(fileURLToPath(import.meta.url));
15
- // need for require.resolve (until import.meta.resolve is not experimental)
16
- const require = createRequire(import.meta.url);
17
15
 
18
16
  const pkg = JSON.parse(
19
17
  fs.readFileSync(path.join(__dirname, './package.json'), 'utf8'),
@@ -43,7 +41,11 @@ program
43
41
  const cwd = options.dir || `./${projectName}`;
44
42
  const yosub = execa(
45
43
  'npx yo',
46
- [require.resolve('@anansi/generator-js'), projectName],
44
+ [
45
+ // get rid of 'file://' prefix
46
+ (await resolve('@anansi/generator-js', import.meta.url)).substring(7),
47
+ projectName,
48
+ ],
47
49
  {
48
50
  stdio: ['pipe', process.stdout, process.stderr],
49
51
  shell: true,