Skip to content

Commit

Permalink
Fix ES^ module issues
Browse files Browse the repository at this point in the history
Signed-off-by: Abhinav Pandey <[email protected]>
  • Loading branch information
Sweetdevil144 committed Jul 13, 2024
1 parent ce8c11a commit 47ead1a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 31 deletions.
3 changes: 1 addition & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable no-undef */
module.exports = {
export default {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/__tests__/**/*.ts?(x)', '**/?(*.)+(spec|test).ts?(x)'],
Expand Down
25 changes: 1 addition & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/commands/commands.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readEnvFile, writeEnvFile, parseEnvFile } from './envManager.js';
import { readEnvFile, writeEnvFile, parseEnvFile } from './envManager';
import fs from 'fs';
import path from 'path';

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
import { setEnv, getEnv, deleteEnv, importEnv } from './commands/commands.js';
import { setEnv, getEnv, deleteEnv, importEnv } from './commands/commands';

yargs(hideBin(process.argv))
.command('set <key> <value>', 'Set an environment variable', {}, (argv) => {
Expand Down
4 changes: 2 additions & 2 deletions tests/commands.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { setEnv, getEnv, deleteEnv } from '../src/commands/commands.js';
import { readEnvFile } from '../src/commands/envManager.js';
import { setEnv, getEnv, deleteEnv } from '../src/commands/commands';
import { readEnvFile } from '../src/commands/envManager';

describe('Commands', () => {
const testKey = 'TEST_KEY';
Expand Down
2 changes: 1 addition & 1 deletion tests/envManager.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readEnvFile, writeEnvFile } from '../src/commands/envManager.js';
import { readEnvFile, writeEnvFile } from "../src/commands/envManager";

describe('EnvManager', () => {
const testKey = 'MANAGER_TEST_KEY';
Expand Down

0 comments on commit 47ead1a

Please sign in to comment.