Skip to content

Commit

Permalink
refactor: use imports map for npm packages
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
  • Loading branch information
jerome-benoit committed Dec 23, 2023
1 parent dc5e456 commit e7fc096
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion benchmarks/benchmarks-utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
rmSync,
writeFileSync,
} from 'node:fs'
import Benchmark from 'npm:benchmark'
import Benchmark from 'benchmark'
import {
DynamicThreadPool,
FixedThreadPool,
Expand Down
2 changes: 2 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"singleQuote": true
},
"imports": {
"benchmark": "npm:benchmark@^2.1.4",
"expect": "npm:expect@^29.7.0",
"$std/": "https://deno.land/std@0.210.0/"
},
"lock": false
Expand Down
2 changes: 1 addition & 1 deletion tests/circular-array.test.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'npm:expect'
import { expect } from 'expect'
import {
CircularArray,
DEFAULT_CIRCULAR_ARRAY_SIZE,
Expand Down
2 changes: 1 addition & 1 deletion tests/deque.test.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'npm:expect'
import { expect } from 'expect'
import { Deque } from '../src/deque.ts'

Deno.test('Deque test suite', async (t) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/pools/abstract-pool.test.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assertSpyCalls, returnsNext, stub } from '$std/testing/mock.ts'
import { EventEmitter } from 'node:events'
import { expect } from 'npm:expect'
import { expect } from 'expect'
import {
DynamicThreadPool,
FixedThreadPool,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'npm:expect'
import { expect } from 'expect'
import {
DynamicThreadPool,
FixedThreadPool,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'npm:expect'
import { expect } from 'expect'
import { FixedThreadPool } from '../../../src/mod.ts'
import { generateRandomInteger } from '../../test-utils.mjs'
import { WeightedRoundRobinWorkerChoiceStrategy } from '../../../src/pools/selection-strategies/weighted-round-robin-worker-choice-strategy.ts'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertSpyCalls, returnsNext, stub } from '$std/testing/mock.ts'
import { expect } from 'npm:expect'
import { expect } from 'expect'
import {
DynamicThreadPool,
FixedThreadPool,
Expand Down
2 changes: 1 addition & 1 deletion tests/pools/thread/dynamic.test.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'npm:expect'
import { expect } from 'expect'
import { DynamicThreadPool, PoolEvents } from '../../../src/mod.ts'
import { TaskFunctions } from '../../test-types.mjs'
import { sleep, waitWorkerNodeEvents } from '../../test-utils.mjs'
Expand Down
2 changes: 1 addition & 1 deletion tests/pools/thread/fixed.test.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'npm:expect'
import { expect } from 'expect'
import { FixedThreadPool, PoolEvents } from '../../../src/mod.ts'
import { TaskFunctions } from '../../test-types.mjs'
import { waitPoolEvents, waitWorkerNodeEvents } from '../../test-utils.mjs'
Expand Down
2 changes: 1 addition & 1 deletion tests/pools/utils.test.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'npm:expect'
import { expect } from 'expect'
import {
CircularArray,
DEFAULT_CIRCULAR_ARRAY_SIZE,
Expand Down
2 changes: 1 addition & 1 deletion tests/pools/worker-node.test.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'npm:expect'
import { expect } from 'expect'
import { WorkerTypes } from '../../src/mod.ts'
import { DEFAULT_TASK_NAME } from '../../src/utils.ts'
import { CircularArray } from '../../src/circular-array.ts'
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.test.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os from 'node:os'
import { randomInt } from 'node:crypto'
import { expect } from 'npm:expect'
import { expect } from 'expect'
import { availableParallelism, KillBehaviors, WorkerTypes } from '../src/mod.ts'
import {
average,
Expand Down
2 changes: 1 addition & 1 deletion tests/worker/abstract-worker.test.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertSpyCalls, stub } from '$std/testing/mock.ts'
import { expect } from 'npm:expect'
import { expect } from 'expect'
import { KillBehaviors, ThreadWorker } from '../../src/mod.ts'
import { DEFAULT_TASK_NAME, EMPTY_FUNCTION } from '../../src/utils.ts'

Expand Down
2 changes: 1 addition & 1 deletion tests/worker/thread-worker.test.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertSpyCalls, stub } from '$std/testing/mock.ts'
import { expect } from 'npm:expect'
import { expect } from 'expect'
import { ThreadWorker } from '../../src/mod.ts'
import { DEFAULT_TASK_NAME } from '../../src/utils.ts'

Expand Down

0 comments on commit e7fc096

Please sign in to comment.