Skip to content

Commit

Permalink
Add file extensions to imports for esmodule build
Browse files Browse the repository at this point in the history
  • Loading branch information
mattphillips committed Jan 25, 2022
1 parent 4c855be commit 3fc53d8
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/added.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isEmpty, isObject, hasOwnProperty } from './utils';
import { isEmpty, isObject, hasOwnProperty } from './utils.js';

const addedDiff = (lhs, rhs) => {

Expand Down
2 changes: 1 addition & 1 deletion src/arrayDiff.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isDate, isEmpty, isObject, hasOwnProperty } from './utils';
import { isDate, isEmpty, isObject, hasOwnProperty } from './utils.js';

const diff = (lhs, rhs) => {
if (lhs === rhs) return {}; // equal return no diff
Expand Down
2 changes: 1 addition & 1 deletion src/deleted.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isEmpty, isObject, hasOwnProperty } from './utils';
import { isEmpty, isObject, hasOwnProperty } from './utils.js';

const deletedDiff = (lhs, rhs) => {
if (lhs === rhs || !isObject(lhs) || !isObject(rhs)) return {};
Expand Down
6 changes: 3 additions & 3 deletions src/detailed.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import addedDiff from './added';
import deletedDiff from './deleted';
import updatedDiff from './updated';
import addedDiff from './added.js';
import deletedDiff from './deleted.js';
import updatedDiff from './updated.js';

const detailedDiff = (lhs, rhs) => ({
added: addedDiff(lhs, rhs),
Expand Down
2 changes: 1 addition & 1 deletion src/diff.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isDate, isEmptyObject, isObject, hasOwnProperty } from './utils';
import { isDate, isEmptyObject, isObject, hasOwnProperty } from './utils.js';

const diff = (lhs, rhs) => {
if (lhs === rhs) return {}; // equal return no diff
Expand Down
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import diff from './diff';
import addedDiff from './added';
import deletedDiff from './deleted';
import updatedDiff from './updated';
import detailedDiff from './detailed';
import diff from './diff.js';
import addedDiff from './added.js';
import deletedDiff from './deleted.js';
import updatedDiff from './updated.js';
import detailedDiff from './detailed.js';

export {
addedDiff,
Expand Down
2 changes: 1 addition & 1 deletion src/preserveArray.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isObject, hasOwnProperty } from './utils';
import { isObject, hasOwnProperty } from './utils.js';

const getLargerArray = (l, r) => l.length > r.length ? l : r;

Expand Down
2 changes: 1 addition & 1 deletion src/updated.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isDate, isEmptyObject, isObject, hasOwnProperty } from './utils';
import { isDate, isEmptyObject, isObject, hasOwnProperty } from './utils.js';

const updatedDiff = (lhs, rhs) => {
if (lhs === rhs) return {};
Expand Down

0 comments on commit 3fc53d8

Please sign in to comment.