Skip to content

Commit

Permalink
fix(esm): add .js extension to imports
Browse files Browse the repository at this point in the history
This will output ESM valid imports.
  • Loading branch information
omichelsen committed Jul 13, 2024
1 parent da8ee8a commit 71ba51f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/compare.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { compareVersions } from './compareVersions';
import { CompareOperator } from './utils';
import { compareVersions } from './compareVersions.js';
import { CompareOperator } from './utils.js';

/**
* Compare [semver](https://semver.org/) version strings using the specified operator.
Expand Down
2 changes: 1 addition & 1 deletion src/compareVersions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { compareSegments, validateAndParse } from './utils';
import { compareSegments, validateAndParse } from './utils.js';

/**
* Compare [semver](https://semver.org/) version strings to find greater, equal or lesser.
Expand Down
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export { compare } from './compare';
export { compareVersions } from './compareVersions';
export { satisfies } from './satisfies';
export { CompareOperator } from './utils';
export { validate, validateStrict } from './validate';
export { compare } from './compare.js';
export { compareVersions } from './compareVersions.js';
export { satisfies } from './satisfies.js';
export { CompareOperator } from './utils.js';
export { validate, validateStrict } from './validate.js';
4 changes: 2 additions & 2 deletions src/satisfies.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { compare } from './compare';
import { CompareOperator, compareSegments, validateAndParse } from './utils';
import { compare } from './compare.js';
import { CompareOperator, compareSegments, validateAndParse } from './utils.js';

/**
* Match [npm semver](https://docs.npmjs.com/cli/v6/using-npm/semver) version range.
Expand Down
2 changes: 1 addition & 1 deletion src/validate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { semver } from './utils';
import { semver } from './utils.js';

/**
* Validate [semver](https://semver.org/) version strings.
Expand Down

0 comments on commit 71ba51f

Please sign in to comment.