Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e288057f4 | |||
| c5bbc1ca26 |
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2026-03-24 - 1.3.0 - feat(config)
|
||||||
|
switch compile target configuration from npmextra to smartconfig
|
||||||
|
|
||||||
|
- replace the @push.rocks/npmextra dependency with @push.rocks/smartconfig
|
||||||
|
- load compileTargets via Smartconfig and update CLI and runtime messages to reference smartconfig.json
|
||||||
|
|
||||||
## 2026-03-15 - 1.2.0 - feat(readme)
|
## 2026-03-15 - 1.2.0 - feat(readme)
|
||||||
document config-based compile targets via npmextra.json
|
document config-based compile targets via npmextra.json
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@git.zone/tsdeno",
|
"name": "@git.zone/tsdeno",
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A helper tool for deno compile that strips package.json to prevent devDependency bloat in compiled binaries.",
|
"description": "A helper tool for deno compile that strips package.json to prevent devDependency bloat in compiled binaries.",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@push.rocks/early": "^4.0.4",
|
"@push.rocks/early": "^4.0.4",
|
||||||
"@push.rocks/npmextra": "^5.3.3",
|
"@push.rocks/smartconfig": "^6.0.0",
|
||||||
"@push.rocks/smartcli": "^4.0.20",
|
"@push.rocks/smartcli": "^4.0.20",
|
||||||
"@push.rocks/smartfs": "^1.5.0",
|
"@push.rocks/smartfs": "^1.5.0",
|
||||||
"@push.rocks/smartshell": "^3.3.7"
|
"@push.rocks/smartshell": "^3.3.7"
|
||||||
|
|||||||
26
pnpm-lock.yaml
generated
26
pnpm-lock.yaml
generated
@@ -11,12 +11,12 @@ importers:
|
|||||||
'@push.rocks/early':
|
'@push.rocks/early':
|
||||||
specifier: ^4.0.4
|
specifier: ^4.0.4
|
||||||
version: 4.0.4
|
version: 4.0.4
|
||||||
'@push.rocks/npmextra':
|
|
||||||
specifier: ^5.3.3
|
|
||||||
version: 5.3.3
|
|
||||||
'@push.rocks/smartcli':
|
'@push.rocks/smartcli':
|
||||||
specifier: ^4.0.20
|
specifier: ^4.0.20
|
||||||
version: 4.0.20
|
version: 4.0.20
|
||||||
|
'@push.rocks/smartconfig':
|
||||||
|
specifier: ^6.0.0
|
||||||
|
version: 6.0.0
|
||||||
'@push.rocks/smartfs':
|
'@push.rocks/smartfs':
|
||||||
specifier: ^1.5.0
|
specifier: ^1.5.0
|
||||||
version: 1.5.0
|
version: 1.5.0
|
||||||
@@ -888,6 +888,9 @@ packages:
|
|||||||
'@push.rocks/smartclickhouse@2.2.0':
|
'@push.rocks/smartclickhouse@2.2.0':
|
||||||
resolution: {integrity: sha512-eTzKiREIPSzL1kPkVyD6vEbn+WV/DvQqDjP67VlhNlQGbRcemnJG/eLrUUR1ytmdIqnsZGEK6UYBgyj5nhzLNQ==}
|
resolution: {integrity: sha512-eTzKiREIPSzL1kPkVyD6vEbn+WV/DvQqDjP67VlhNlQGbRcemnJG/eLrUUR1ytmdIqnsZGEK6UYBgyj5nhzLNQ==}
|
||||||
|
|
||||||
|
'@push.rocks/smartconfig@6.0.0':
|
||||||
|
resolution: {integrity: sha512-ohXwJdbDXV2budErnZKWBOz01YkjP6gJsZ7QM9+6Wsh+r7O1CVT3JpV+mD8xJWy5tZRHI+3B9L8z0+WkIDtKzw==}
|
||||||
|
|
||||||
'@push.rocks/smartcrypto@2.0.4':
|
'@push.rocks/smartcrypto@2.0.4':
|
||||||
resolution: {integrity: sha512-1+/5bsjyataf5uUkUNnnVXGRAt+gHVk1KDzozjTqgqJxHvQk1d9fVDohL6CxUhUucTPtu5VR5xNBiV8YCDuGyw==}
|
resolution: {integrity: sha512-1+/5bsjyataf5uUkUNnnVXGRAt+gHVk1KDzozjTqgqJxHvQk1d9fVDohL6CxUhUucTPtu5VR5xNBiV8YCDuGyw==}
|
||||||
|
|
||||||
@@ -4793,6 +4796,23 @@ snapshots:
|
|||||||
'@push.rocks/smarturl': 3.1.0
|
'@push.rocks/smarturl': 3.1.0
|
||||||
'@push.rocks/webrequest': 4.0.5
|
'@push.rocks/webrequest': 4.0.5
|
||||||
|
|
||||||
|
'@push.rocks/smartconfig@6.0.0':
|
||||||
|
dependencies:
|
||||||
|
'@push.rocks/qenv': 6.1.3
|
||||||
|
'@push.rocks/smartfile': 11.2.7
|
||||||
|
'@push.rocks/smartjson': 5.2.0
|
||||||
|
'@push.rocks/smartlog': 3.2.1
|
||||||
|
'@push.rocks/smartpath': 6.0.0
|
||||||
|
'@push.rocks/smartpromise': 4.2.3
|
||||||
|
'@push.rocks/smartrx': 3.0.10
|
||||||
|
'@push.rocks/taskbuffer': 3.5.0
|
||||||
|
'@tsclass/tsclass': 9.4.0
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- '@nuxt/kit'
|
||||||
|
- react
|
||||||
|
- supports-color
|
||||||
|
- vue
|
||||||
|
|
||||||
'@push.rocks/smartcrypto@2.0.4':
|
'@push.rocks/smartcrypto@2.0.4':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@push.rocks/smartpromise': 4.2.3
|
'@push.rocks/smartpromise': 4.2.3
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@git.zone/tsdeno',
|
name: '@git.zone/tsdeno',
|
||||||
version: '1.2.0',
|
version: '1.3.0',
|
||||||
description: 'A helper tool for deno compile that strips package.json to prevent devDependency bloat in compiled binaries.'
|
description: 'A helper tool for deno compile that strips package.json to prevent devDependency bloat in compiled binaries.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import * as path from 'path';
|
|||||||
export { path };
|
export { path };
|
||||||
|
|
||||||
// @push.rocks scope
|
// @push.rocks scope
|
||||||
import * as npmextra from '@push.rocks/npmextra';
|
import * as npmextra from '@push.rocks/smartconfig';
|
||||||
import * as smartcli from '@push.rocks/smartcli';
|
import * as smartcli from '@push.rocks/smartcli';
|
||||||
import { SmartFs, SmartFsProviderNode } from '@push.rocks/smartfs';
|
import { SmartFs, SmartFsProviderNode } from '@push.rocks/smartfs';
|
||||||
import * as smartshell from '@push.rocks/smartshell';
|
import * as smartshell from '@push.rocks/smartshell';
|
||||||
|
|||||||
@@ -59,18 +59,18 @@ export class TsDeno {
|
|||||||
* The package.json hide/restore wraps the entire loop.
|
* The package.json hide/restore wraps the entire loop.
|
||||||
*/
|
*/
|
||||||
public async compileFromConfig(): Promise<void> {
|
public async compileFromConfig(): Promise<void> {
|
||||||
const npmextraInstance = new plugins.npmextra.Npmextra(this.cwd);
|
const npmextraInstance = new plugins.npmextra.Smartconfig(this.cwd);
|
||||||
const config = npmextraInstance.dataFor<ITsdenoConfig>('@git.zone/tsdeno', {
|
const config = npmextraInstance.dataFor<ITsdenoConfig>('@git.zone/tsdeno', {
|
||||||
compileTargets: [],
|
compileTargets: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
if (config.compileTargets.length === 0) {
|
if (config.compileTargets.length === 0) {
|
||||||
console.error('tsdeno: no compileTargets found in npmextra.json under "@git.zone/tsdeno"');
|
console.error('tsdeno: no compileTargets found in smartconfig.json under "@git.zone/tsdeno"');
|
||||||
console.error('tsdeno: either pass args directly or add config to npmextra.json');
|
console.error('tsdeno: either pass args directly or add config to smartconfig.json');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`tsdeno: found ${config.compileTargets.length} compile target(s) in npmextra.json`);
|
console.log(`tsdeno: found ${config.compileTargets.length} compile target(s) in smartconfig.json`);
|
||||||
|
|
||||||
const packageJsonPath = plugins.path.join(this.cwd, 'package.json');
|
const packageJsonPath = plugins.path.join(this.cwd, 'package.json');
|
||||||
const backupPath = plugins.path.join(this.cwd, 'package.json.bak');
|
const backupPath = plugins.path.join(this.cwd, 'package.json.bak');
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ tsdenoCli.standardCommand().subscribe(async (argvArg) => {
|
|||||||
console.log(`@git.zone/tsdeno v${commitinfo.version}`);
|
console.log(`@git.zone/tsdeno v${commitinfo.version}`);
|
||||||
console.log('');
|
console.log('');
|
||||||
console.log('Usage:');
|
console.log('Usage:');
|
||||||
console.log(' tsdeno compile Compile all targets from npmextra.json');
|
console.log(' tsdeno compile Compile all targets from smartconfig.json');
|
||||||
console.log(' tsdeno compile [deno compile args...] Compile with explicit args (passthrough)');
|
console.log(' tsdeno compile [deno compile args...] Compile with explicit args (passthrough)');
|
||||||
console.log('');
|
console.log('');
|
||||||
console.log('When no args are given, tsdeno reads compileTargets from npmextra.json.');
|
console.log('When no args are given, tsdeno reads compileTargets from smartconfig.json.');
|
||||||
console.log('The compile command temporarily removes package.json before running');
|
console.log('The compile command temporarily removes package.json before running');
|
||||||
console.log('deno compile, preventing devDependencies from bloating the binary.');
|
console.log('deno compile, preventing devDependencies from bloating the binary.');
|
||||||
console.log('--node-modules-dir=none is added automatically.');
|
console.log('--node-modules-dir=none is added automatically.');
|
||||||
@@ -24,7 +24,7 @@ tsdenoCli.addCommand('compile').subscribe(async (argvArg) => {
|
|||||||
const rawArgs = process.argv.slice(3);
|
const rawArgs = process.argv.slice(3);
|
||||||
|
|
||||||
if (rawArgs.length === 0) {
|
if (rawArgs.length === 0) {
|
||||||
// No args — read targets from npmextra.json
|
// No args — read targets from smartconfig.json
|
||||||
await tsDeno.compileFromConfig();
|
await tsDeno.compileFromConfig();
|
||||||
} else {
|
} else {
|
||||||
// Args provided — passthrough to deno compile
|
// Args provided — passthrough to deno compile
|
||||||
|
|||||||
Reference in New Issue
Block a user