Skip to content

Commit

Permalink
fix(scripture): strict esm/type imports
Browse files Browse the repository at this point in the history
  • Loading branch information
CarsonF committed Nov 16, 2024
1 parent fce580c commit 7240f5f
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion packages/scripture/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// eslint-disable-next-line import/no-default-export
export { default } from '../../jest.config';
export { default } from '../../jest.config.js';
6 changes: 3 additions & 3 deletions packages/scripture/src/books.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BookList, BookLookupMap } from './raw-book-data';
import { Range } from './scripture-range';
import { ScriptureReference } from './scripture-reference.type';
import { BookList, BookLookupMap } from './raw-book-data.js';
import type { Range } from './scripture-range.js';
import type { ScriptureReference } from './scripture-reference.type.js';

const inspect = Symbol.for('nodejs.util.inspect.custom');

Expand Down
16 changes: 8 additions & 8 deletions packages/scripture/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export * from './books';
export * from './scripture-reference.type';
export * from './scripture-range';
export * from './label-of-verse-range';
export * from './label-of-verse-ranges';
export * from './parser';
export * from './split-range-by-book';
export * from './merge-to-minimal-set';
export * from './books.js';
export * from './scripture-reference.type.js';
export * from './scripture-range.js';
export * from './label-of-verse-range.js';
export * from './label-of-verse-ranges.js';
export * from './parser.js';
export * from './split-range-by-book.js';
export * from './merge-to-minimal-set.js';
4 changes: 2 additions & 2 deletions packages/scripture/src/label-of-verse-range.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from '@jest/globals';
import { labelOfVerseRange } from './label-of-verse-range';
import { parseScripture } from './parser';
import { labelOfVerseRange } from './label-of-verse-range.js';
import { parseScripture } from './parser.js';

describe('labelOfVerseRange', () => {
it.each([
Expand Down
4 changes: 2 additions & 2 deletions packages/scripture/src/label-of-verse-range.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verse, VerseLike } from './books';
import { mapRange, Range } from './scripture-range';
import { Verse, type VerseLike } from './books.js';
import { mapRange, type Range } from './scripture-range.js';

export const labelOfVerseRange = (
ref: Range<VerseLike>,
Expand Down
4 changes: 2 additions & 2 deletions packages/scripture/src/label-of-verse-ranges.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from '@jest/globals';
import { labelOfVerseRanges } from './label-of-verse-ranges';
import { parseScripture } from './parser';
import { labelOfVerseRanges } from './label-of-verse-ranges.js';
import { parseScripture } from './parser.js';

describe('labelOfVerseRanges', () => {
it.each([
Expand Down
10 changes: 5 additions & 5 deletions packages/scripture/src/label-of-verse-ranges.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Verse, VerseLike } from './books';
import { labelOfVerseRange } from './label-of-verse-range';
import { mergeVerseRanges } from './merge-to-minimal-set';
import { mapRange, Range } from './scripture-range';
import { ScriptureReference } from './scripture-reference.type';
import { Verse, type VerseLike } from './books.js';
import { labelOfVerseRange } from './label-of-verse-range.js';
import { mergeVerseRanges } from './merge-to-minimal-set.js';
import { mapRange, type Range } from './scripture-range.js';
import { type ScriptureReference } from './scripture-reference.type.js';

export const labelOfVerseRanges = (
verseRanges: ReadonlyArray<Range<VerseLike>>,
Expand Down
4 changes: 2 additions & 2 deletions packages/scripture/src/merge-to-minimal-set.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from '@jest/globals';
import { labelOfVerseRanges } from './label-of-verse-ranges';
import { parseScripture } from './parser';
import { labelOfVerseRanges } from './label-of-verse-ranges.js';
import { parseScripture } from './parser.js';

describe('mergeVerseRanges', () => {
it.each([
Expand Down
4 changes: 2 additions & 2 deletions packages/scripture/src/merge-to-minimal-set.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verse, VerseLike } from './books';
import { mapRange, Range } from './scripture-range';
import { Verse, type VerseLike } from './books.js';
import { mapRange, type Range } from './scripture-range.js';

/**
* Merges verse ranges into an equivalent minimal set of verse ranges.
Expand Down
4 changes: 2 additions & 2 deletions packages/scripture/src/parser.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from '@jest/globals';
import { parseScripture } from './parser';
import { mapRange } from './scripture-range';
import { parseScripture } from './parser.js';
import { mapRange } from './scripture-range.js';

describe('parseScripture', () => {
it.each([
Expand Down
6 changes: 3 additions & 3 deletions packages/scripture/src/parser.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Book, Verse } from './books';
import { mergeVerseRanges } from './merge-to-minimal-set';
import { Range } from './scripture-range';
import { Book, Verse } from './books.js';
import { mergeVerseRanges } from './merge-to-minimal-set.js';
import type { Range } from './scripture-range.js';

export const tryParseScripture = (input: string | null | undefined) => {
if (!input?.trim()) {
Expand Down
4 changes: 2 additions & 2 deletions packages/scripture/src/split-range-by-book.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Verse } from './books';
import { Range } from './scripture-range';
import { Verse } from './books.js';
import type { Range } from './scripture-range.js';

export const splitRangeByBook = (
range: Range<Verse>,
Expand Down

0 comments on commit 7240f5f

Please sign in to comment.