Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@naturalcycles/cli

Package Overview
Dependencies
Maintainers
3
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@naturalcycles/cli - npm Package Compare versions

Comparing version 1.0.5 to 1.1.0

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# [1.1.0](https://github.com/NaturalCycles/cli/compare/v1.0.5...v1.1.0) (2020-04-04)
### Features
* auto-complete .ts extension ([ddc0cc7](https://github.com/NaturalCycles/cli/commit/ddc0cc71b8313328d326c80313f0d263dbdfd015))
## [1.0.5](https://github.com/NaturalCycles/cli/compare/v1.0.4...v1.0.5) (2020-04-04)

@@ -2,0 +9,0 @@

25

dist/bin/tsn.js

@@ -19,13 +19,4 @@ #!/usr/bin/env node

const projectTsconfigPath = await ensureProjectTsconfigScripts();
let [, , scriptPath = '', ..._processArgs] = process.argv;
const [, , _scriptPath = '', ..._processArgs] = process.argv;
const cwd = process.cwd();
// Prepend ./scripts/ if needed
if (!scriptPath.startsWith('scripts/') &&
!scriptPath.startsWith('./') &&
!scriptPath.startsWith('/')) {
const newPath = './scripts/' + scriptPath;
if (fs.existsSync(newPath)) {
scriptPath = newPath;
}
}
require('loud-rejection/register');

@@ -47,6 +38,14 @@ require('dotenv/config');

}
// Resolve path
// ./scripts/ ... .ts
let scriptPath = [
_scriptPath,
`${_scriptPath}.ts`,
`./scripts/${_scriptPath}`,
`./scripts/${_scriptPath}.ts`,
].find(fs.existsSync);
scriptPath = require.resolve(`${cwd}/${scriptPath}`);
console.log({
scriptPath,
});
// console.log({
// scriptPath,
// })
// Should be loadable now due to tsnode being initialized already

@@ -53,0 +52,0 @@ require(scriptPath);

"use strict";
// This file exists, because otherwise tsc skips the bin folder and path becomes wrong:(

@@ -40,3 +40,3 @@ {

},
"version": "1.0.5",
"version": "1.1.0",
"description": "CLI utils to be installed globally via 'npm i -g'",

@@ -43,0 +43,0 @@ "author": "Natural Cycles Team",

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