deplift 1.2.3 → 1.2.4
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/dist/cjs/index.cjs +5 -1
- package/dist/esm/index.mjs +5 -2
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var path = require('node:path');
|
|
5
|
+
var node_url = require('node:url');
|
|
5
6
|
var promises = require('node:fs/promises');
|
|
6
7
|
var node_child_process = require('node:child_process');
|
|
7
8
|
var fg = require('fast-glob');
|
|
8
9
|
var yargs = require('yargs');
|
|
9
10
|
var helpers = require('yargs/helpers');
|
|
10
11
|
|
|
12
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
13
|
+
const __dirname$1 = path.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href))));
|
|
11
14
|
const defaultIgnore = ['**/node_modules/**', '**/dist/**', '**/coverage/**', '**/build/**', '**/.next/**', '**/.docusaurus/**'];
|
|
12
15
|
const depSections = ['dependencies', 'devDependencies'];
|
|
13
16
|
const stripPrefix = version => version.replace(/^\D+/, '');
|
|
@@ -58,7 +61,8 @@ const parseArgs = async () => {
|
|
|
58
61
|
version: 'unknown'
|
|
59
62
|
};
|
|
60
63
|
try {
|
|
61
|
-
pkg = JSON.parse(await promises.readFile(path.resolve(
|
|
64
|
+
pkg = JSON.parse(await promises.readFile(path.resolve(__dirname$1, '../../package.json'), 'utf8'));
|
|
65
|
+
console.log(`[deplift] v${pkg.version}\n`);
|
|
62
66
|
} catch (_unused2) {}
|
|
63
67
|
const argv = await yargs(helpers.hideBin(process.argv)).option('major', {
|
|
64
68
|
type: 'array',
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import path, { resolve } from 'node:path';
|
|
2
|
+
import path, { dirname, resolve } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
3
4
|
import { readFile, writeFile } from 'node:fs/promises';
|
|
4
5
|
import { execSync } from 'node:child_process';
|
|
5
6
|
import fg from 'fast-glob';
|
|
6
7
|
import yargs from 'yargs';
|
|
7
8
|
import { hideBin } from 'yargs/helpers';
|
|
8
9
|
|
|
10
|
+
const __dirname$1 = dirname(fileURLToPath(import.meta.url));
|
|
9
11
|
const defaultIgnore = ['**/node_modules/**', '**/dist/**', '**/coverage/**', '**/build/**', '**/.next/**', '**/.docusaurus/**'];
|
|
10
12
|
const depSections = ['dependencies', 'devDependencies'];
|
|
11
13
|
const stripPrefix = version => version.replace(/^\D+/, '');
|
|
@@ -56,7 +58,8 @@ const parseArgs = async () => {
|
|
|
56
58
|
version: 'unknown'
|
|
57
59
|
};
|
|
58
60
|
try {
|
|
59
|
-
pkg = JSON.parse(await readFile(resolve(
|
|
61
|
+
pkg = JSON.parse(await readFile(resolve(__dirname$1, '../../package.json'), 'utf8'));
|
|
62
|
+
console.log(`[deplift] v${pkg.version}\n`);
|
|
60
63
|
} catch (_unused2) {}
|
|
61
64
|
const argv = await yargs(hideBin(process.argv)).option('major', {
|
|
62
65
|
type: 'array',
|