Socket
Socket
Sign inDemoInstall

tshy

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tshy - npm Package Compare versions

Comparing version 1.0.0-2 to 1.0.0-3

dist/esm/console.d.ts

7

dist/esm/build.js

@@ -8,2 +8,3 @@ import chalk from 'chalk';

import bins from './bins.js';
import * as console from './console.js';
import dialects from './dialects.js';

@@ -24,2 +25,3 @@ import { fail } from './fail.js';

setFolderDialect('src', 'esm');
console.debug(chalk.cyan.dim('building esm'));
const res = spawnSync('tsc -p .tshy/esm.json', {

@@ -37,2 +39,3 @@ shell: true,

setFolderDialect('src', 'commonjs');
console.debug(chalk.cyan.dim('building commonjs'));
const res = spawnSync('tsc -p .tshy/commonjs.json', {

@@ -55,6 +58,10 @@ shell: true,

}
console.debug(chalk.cyan.dim('moving to ./dist'));
syncContentSync('.tshy-build-tmp', 'dist');
console.debug(chalk.cyan.dim('removing build temp dir'));
rimrafSync('.tshy-build-tmp');
console.debug(chalk.cyan.dim('chmod bins'));
bins();
console.debug(chalk.cyan.dim('write package.json'));
writePackage();
//# sourceMappingURL=build.js.map

2

dist/esm/fail.js
import chalk from 'chalk';
import * as console from './console.js';
export const fail = (message, er) => {

@@ -6,3 +7,4 @@ console.error(chalk.red.bold(message));

console.error(er.message);
console.print();
};
//# sourceMappingURL=fail.js.map

7

dist/esm/index.js
#!/usr/bin/env node
import chalk from 'chalk';
import * as console from './console.js';
import './exports.js';
import pkg from './package.js';
const { exports: exp, tshy } = pkg;
console.error(chalk.yellow.bold('building'));
console.error(chalk.cyan.dim('tshy config'), tshy);
console.error(chalk.cyan.dim('exports'), exp);
console.debug(chalk.yellow.bold('building'), process.cwd());
console.debug(chalk.cyan.dim('tshy config'), tshy);
console.debug(chalk.cyan.dim('exports'), exp);
// have our config, time to build

@@ -10,0 +11,0 @@ await import('./build.js');

// the modules like -cjs.cts that override a module at .ts
import chalk from 'chalk';
import sources from './sources.js';
import * as console from './console.js';
const target = (f, sources) => {

@@ -15,5 +16,5 @@ const ts = f.replace(/\-cjs\.cts$/, '.ts');

if (polyfills.size) {
console.error(chalk.cyan.dim('polyfills detected'), polyfills);
console.debug(chalk.cyan.dim('polyfills detected'), polyfills);
}
export default getPolyfills(sources);
//# sourceMappingURL=polyfills.js.map
import { Dialect } from './types.js';
declare const _default: (where: string, mode?: Dialect) => boolean | void;
declare const _default: (where: string, mode?: Dialect) => void;
export default _default;
//# sourceMappingURL=set-folder-dialect.d.ts.map
import { writeFileSync } from 'fs';
import { rimrafSync } from 'rimraf';
import * as console from './console.js';
import chalk from 'chalk';
const writeDialectPJ = (f, mode) => mode

@@ -8,3 +10,7 @@ ? writeFileSync(f, JSON.stringify({

: rimrafSync(f);
export default (where, mode) => writeDialectPJ(`${where}/package.json`, mode);
export default (where, mode) => {
if (mode)
console.debug(chalk.cyan.dim('set dialect'), { where, mode });
writeDialectPJ(`${where}/package.json`, mode);
};
//# sourceMappingURL=set-folder-dialect.js.map
import chalk from 'chalk';
import { existsSync, writeFileSync } from 'fs';
import { mkdirpSync } from 'mkdirp';
import * as console from './console.js';
// the commonjs build needs to exclude anything that will be polyfilled

@@ -50,5 +51,7 @@ import polyfills from './polyfills.js';

const writeConfig = (name, data) => writeFileSync(`.tshy/${name}.json`, JSON.stringify(data, null, 2) + '\n');
console.error(chalk.cyan.dim('writing tsconfig files...'));
if (!existsSync('tsconfig.json'))
console.debug(chalk.cyan.dim('writing tsconfig files...'));
if (!existsSync('tsconfig.json')) {
console.debug('using existing tsconfig.json');
writeConfig('../tsconfig', recommended);
}
writeConfig('build', build);

@@ -55,0 +58,0 @@ writeConfig('commonjs', commonjs);

{
"name": "tshy",
"version": "1.0.0-2",
"version": "1.0.0-3",
"description": "TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder",

@@ -5,0 +5,0 @@ "author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)",

@@ -100,2 +100,12 @@ # tshy - TypeScript HYbridizer

## Making Noise
On failure, all logs will be printed.
To print error logs and a `success!` message at the end, set
`TSHY_VERBOSE=1` in the environment.
To print debugging and other extra information, set
`TSHY_VERBOSE=2` in the environment.
## Selecting Dialects

@@ -102,0 +112,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc