From d633a647df0d4a4f4a910c87f6a590ec5cd7a3d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erdem=20K=C3=B6=C5=9Fk?= Date: Thu, 23 Nov 2023 23:34:56 +0300 Subject: [PATCH] [feat] Changed parser for es6 javascript. It was prevent install import packages --- bin/index.ts | 2 +- index.ts | 3 --- package.json | 5 +++-- tsconfig.json | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 index.ts diff --git a/bin/index.ts b/bin/index.ts index 398c184..14d0b5d 100755 --- a/bin/index.ts +++ b/bin/index.ts @@ -2,7 +2,7 @@ import { Command as CommanderCommand } from 'commander' import inquirer from 'inquirer' import inquirerPrompt from 'inquirer-autocomplete-prompt' import chalk from 'chalk' -import packages from '../package.json' +import packages from '../package.json' assert { type: 'json' } import { CommandInvoker, diff --git a/index.ts b/index.ts deleted file mode 100644 index 562bd94..0000000 --- a/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node - -import('./bin/index') diff --git a/package.json b/package.json index 04143be..5fb7274 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,12 @@ "name": "envolve", "version": "1.1.3", "description": "Envolve CLI is a powerful tool for managing environment variables in your projects. It allows you to easily create, update, compare, and sync environment files across different services.", - "main": "index.ts", + "main": "bin/index.ts", + "type": "module", "scripts": { "build": "tsc", "lint": "tsc --noEmit && eslint \"**/*.{js,ts}\" --quiet --fix", - "serve": "node dist/index.js", + "serve": "node --no-warnings --experimental-specifier-resolution=node dist/bin/index.js", "start": "tsc && npm run serve", "test": "jest --forceExit --verbose --detectOpenHandles --coverage --coverageReporters=text-summary" }, diff --git a/tsconfig.json b/tsconfig.json index 64bf7c5..8f445e7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,10 @@ { "compilerOptions": { - "module": "commonjs", + "module": "ESNext", "strictNullChecks": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, - "target": "es6", + "target": "ES6", "noImplicitAny": true, "moduleResolution": "node", "sourceMap": true,