Skip to content

Commit 47ead1a

Browse files
committed
Fix ES^ module issues
Signed-off-by: Abhinav Pandey <abhinav.pandey.met22@itbhu.ac.in>
1 parent ce8c11a commit 47ead1a

File tree

6 files changed

+7
-31
lines changed

6 files changed

+7
-31
lines changed

jest.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
/* eslint-disable no-undef */
2-
module.exports = {
1+
export default {
32
preset: 'ts-jest',
43
testEnvironment: 'node',
54
testMatch: ['**/__tests__/**/*.ts?(x)', '**/?(*.)+(spec|test).ts?(x)'],

package-lock.json

Lines changed: 1 addition & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/commands/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { readEnvFile, writeEnvFile, parseEnvFile } from './envManager.js';
1+
import { readEnvFile, writeEnvFile, parseEnvFile } from './envManager';
22
import fs from 'fs';
33
import path from 'path';
44

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env node
22
import yargs from 'yargs';
33
import { hideBin } from 'yargs/helpers';
4-
import { setEnv, getEnv, deleteEnv, importEnv } from './commands/commands.js';
4+
import { setEnv, getEnv, deleteEnv, importEnv } from './commands/commands';
55

66
yargs(hideBin(process.argv))
77
.command('set <key> <value>', 'Set an environment variable', {}, (argv) => {

tests/commands.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { setEnv, getEnv, deleteEnv } from '../src/commands/commands.js';
2-
import { readEnvFile } from '../src/commands/envManager.js';
1+
import { setEnv, getEnv, deleteEnv } from '../src/commands/commands';
2+
import { readEnvFile } from '../src/commands/envManager';
33

44
describe('Commands', () => {
55
const testKey = 'TEST_KEY';

tests/envManager.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { readEnvFile, writeEnvFile } from '../src/commands/envManager.js';
1+
import { readEnvFile, writeEnvFile } from "../src/commands/envManager";
22

33
describe('EnvManager', () => {
44
const testKey = 'MANAGER_TEST_KEY';

0 commit comments

Comments
 (0)