Skip to content

Commit

Permalink
[misc] update module paths to be esm compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhyde committed May 29, 2024
1 parent 47b93e3 commit 07aa702
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions source/dice.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { parse } from '~/parser'
import { rand } from '~/random/native'
import { type RollResult, type RollSpec } from '~/type'
import { sortAsc, sortDesc, sum } from '~/utils/array'
import { parse } from '~/parser.ts'
import { rand } from '~/random/native.ts'
import { type RollResult, type RollSpec } from '~/type.ts'
import { sortAsc, sortDesc, sum } from '~/utils/array.ts'

/**
* Roll number of dice based on the provided notation and return the sum of all rolls.
Expand Down
6 changes: 3 additions & 3 deletions source/dice.unit.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Roll, roll } from '~/dice'
import * as parser from '~/parser'
import * as random from '~/random/native'
import { Roll, roll } from '~/dice.ts'
import * as parser from '~/parser.ts'
import * as random from '~/random/native.ts'

describe('dice', () => {
afterEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/parser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type RollSpec } from '~/type'
import { type RollSpec } from '~/type.ts'

const regex = /^(?:(?<quantity>\d+)|)(?<separator>d|z)(?<sides>[1-9]\d*)(?<modifiers>(?:[-+]\d+)*)?$/i

Expand Down
4 changes: 2 additions & 2 deletions source/parser.unit.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { parse } from '~/parser'
import { type RollSpec } from '~/type'
import { parse } from '~/parser.ts'
import { type RollSpec } from '~/type.ts'

describe('parse', () => {
const validInputs: Array<{ input: string; expected: RollSpec }> = [
Expand Down

0 comments on commit 07aa702

Please sign in to comment.