@thegetty/quire-cli 1.0.0-rc.19 → 1.0.0-rc.20
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/CHANGELOG.md +10 -0
- package/bin/cli.js +7 -2
- package/package.json +2 -2
- package/src/lib/conf/config.js +7 -1
- package/src/lib/quire/index.js +6 -4
- package/src/main.js +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,16 @@ Changelog entries are classified using the following labels:
|
|
|
12
12
|
- `Fixed`: for any bug fixes
|
|
13
13
|
- `Removed`: for deprecated features removed in this release
|
|
14
14
|
|
|
15
|
+
## [1.0.0-rc.20]
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Replace Node `import` assertions (deprecated) with file operations
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- Quire new command fails with newer version of Node #968
|
|
24
|
+
|
|
15
25
|
## [1.0.0-rc.19]
|
|
16
26
|
|
|
17
27
|
### Added
|
package/bin/cli.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env -S node --no-warnings
|
|
2
|
-
|
|
2
|
+
import { fileURLToPath } from 'node:url'
|
|
3
|
+
import fs from 'node:fs'
|
|
3
4
|
import cli from '#src/main.js'
|
|
4
5
|
import config from '#src/lib/conf/config.js'
|
|
5
|
-
import packageConfig from '#root/package.json' assert { type: 'json' }
|
|
6
6
|
import updateNotifier from 'update-notifier'
|
|
7
7
|
|
|
8
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
9
|
+
|
|
10
|
+
const packagePath = path.join(__dirname, 'package.json')
|
|
11
|
+
const packageConfig = JSON.parse(fs.readFileSync(packagePath, 'utf8'))
|
|
12
|
+
|
|
8
13
|
process.removeAllListeners('warning')
|
|
9
14
|
|
|
10
15
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thegetty/quire-cli",
|
|
3
3
|
"description": "Quire command-line interface",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.20",
|
|
5
5
|
"author": "Getty Digital",
|
|
6
6
|
"license": "SEE LICENSE IN https://github.com/thegetty/quire/blob/main/LICENSE",
|
|
7
7
|
"bugs": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"ajv": "^8.16.0",
|
|
52
52
|
"boxen": "^7.0.1",
|
|
53
53
|
"chalk": "^5.2.0",
|
|
54
|
-
"commander": "^
|
|
54
|
+
"commander": "^12.1.0",
|
|
55
55
|
"conf": "^13.1.0",
|
|
56
56
|
"cross-env": "^7.0.3",
|
|
57
57
|
"del": "^7.0.0",
|
package/src/lib/conf/config.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url'
|
|
2
|
+
import fs from 'node:fs'
|
|
1
3
|
import Conf from 'conf'
|
|
2
4
|
import defaults from './defaults.js'
|
|
3
5
|
import migrations from './migrations.js'
|
|
4
6
|
import schema from './schema.js'
|
|
5
|
-
|
|
7
|
+
|
|
8
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
9
|
+
|
|
10
|
+
const packagePath = path.join(__dirname, 'package.json')
|
|
11
|
+
const packageConfig = JSON.parse(fs.readFileSync(packagePath, 'utf8'))
|
|
6
12
|
|
|
7
13
|
const { name, version } = packageConfig
|
|
8
14
|
|
package/src/lib/quire/index.js
CHANGED
|
@@ -7,16 +7,18 @@ import fetch from 'node-fetch'
|
|
|
7
7
|
import fs from 'fs-extra'
|
|
8
8
|
import git from '#src/lib/git/index.js'
|
|
9
9
|
import inv from 'install-npm-version'
|
|
10
|
-
import packageConfig from '#root/package.json' assert { type: 'json' }
|
|
11
10
|
import path from 'node:path'
|
|
12
11
|
import semver from 'semver'
|
|
13
12
|
|
|
14
|
-
const
|
|
15
|
-
|
|
13
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
14
|
+
|
|
15
|
+
const packagePath = path.join(__dirname, 'package.json')
|
|
16
|
+
const packageConfig = JSON.parse(fs.readFileSync(packagePath, 'utf8'))
|
|
17
|
+
|
|
18
|
+
const { name: PACKAGE_NAME } = packageConfig
|
|
16
19
|
|
|
17
20
|
// Version install path is relative to process working directory
|
|
18
21
|
const INSTALL_PATH = path.join('src', 'lib', 'quire', 'versions')
|
|
19
|
-
const PACKAGE_NAME = '@thegetty/quire-11ty'
|
|
20
22
|
const VERSION_FILE = '.quire'
|
|
21
23
|
|
|
22
24
|
/**
|
package/src/main.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { Argument, Command, Option } from 'commander'
|
|
2
|
+
import { dirname, join } from 'node:path'
|
|
3
|
+
import { fileURLToPath } from 'node:url'
|
|
4
|
+
import fs from 'node:fs'
|
|
2
5
|
import commands from '#src/commands/index.js'
|
|
3
6
|
import config from '#lib/conf/config.js'
|
|
4
|
-
|
|
7
|
+
|
|
8
|
+
const packagePath = join(fileURLToPath(import.meta.url), 'package.json')
|
|
9
|
+
const packageConfig = JSON.parse(fs.readFileSync(packagePath, 'utf8'))
|
|
10
|
+
|
|
11
|
+
const { version } = packageConfig
|
|
5
12
|
|
|
6
13
|
/**
|
|
7
14
|
* Quire CLI implements the command pattern.
|
|
@@ -15,7 +22,7 @@ const program = new Command()
|
|
|
15
22
|
program
|
|
16
23
|
.name('quire')
|
|
17
24
|
.description('Quire command-line interface')
|
|
18
|
-
.version(
|
|
25
|
+
.version(version, '-v, --version', 'output quire version number')
|
|
19
26
|
.configureHelp({
|
|
20
27
|
helpWidth: 80,
|
|
21
28
|
sortOptions: false,
|