Skip to content

remove circular dependencies #2124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: 6.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion __tests__/ArraySeq.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Seq } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { Seq } from 'immutable';

describe('ArraySequence', () => {
it('every is true when predicate is true for all entries', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/Comparator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type Comparator, List, OrderedSet, PairSorting, Seq } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { type Comparator, List, OrderedSet, PairSorting, Seq } from 'immutable';

const sourceNumbers: readonly number[] = [3, 4, 5, 6, 7, 9, 10, 12, 90, 92, 95];

Expand Down
4 changes: 2 additions & 2 deletions __tests__/Conversion.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, it } from '@jest/globals';
import fc, { type JsonValue } from 'fast-check';
import {
type Collection,
fromJS,
Expand All @@ -7,8 +9,6 @@ import {
OrderedMap,
Record,
} from 'immutable';
import { describe, expect, it } from '@jest/globals';
import fc, { type JsonValue } from 'fast-check';

describe('Conversion', () => {
// Note: order of keys based on Map's hashing order
Expand Down
2 changes: 1 addition & 1 deletion __tests__/Equality.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { List, Map, Seq, Set, is } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import fc from 'fast-check';
import { List, Map, Seq, Set, is } from 'immutable';

describe('Equality', () => {
function expectIs(left: unknown, right: unknown): void {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/IndexedSeq.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Seq } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { Seq } from 'immutable';

describe('IndexedSequence', () => {
it('maintains skipped offset', () => {
Expand Down
4 changes: 2 additions & 2 deletions __tests__/KeyedSeq.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Range, Seq } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import fc from 'fast-check';
import invariant from '../src/utils/invariant';
import { invariant } from '../src/utils';

describe('KeyedSeq', () => {
it('iterates equivalently', () => {
Expand Down Expand Up @@ -42,7 +42,7 @@ describe('KeyedSeq', () => {
.map((part) => part.skip(10).take(5));

invariant(indexed0, 'indexed0 is not undefined');
invariant(indexed1, 'indexed0 is not undefined');
invariant(indexed1, 'indexed1 is not undefined');

expect(indexed0.entrySeq().toArray()).toEqual([
[0, 21],
Expand Down
4 changes: 2 additions & 2 deletions __tests__/List.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { List, Map, Range, Seq, Set, fromJS } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import fc from 'fast-check';
import { List, Map, Range, Seq, Set, fromJS } from 'immutable';
import { create as createSeed } from 'random-seed';
import invariant from '../src/utils/invariant';
import { invariant } from '../src/utils';

function arrayOfSize(s: number) {
const a = new Array(s);
Expand Down
2 changes: 1 addition & 1 deletion __tests__/ListJS.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { List } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { List } from 'immutable';

const NON_NUMBERS = {
array: ['not', 'a', 'number'],
Expand Down
2 changes: 1 addition & 1 deletion __tests__/Map.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { List, Map, Range, Record, Seq, fromJS, is } from 'immutable';
import { describe, expect, it, jest } from '@jest/globals';
import fc from 'fast-check';
import { List, Map, Range, Record, Seq, fromJS, is } from 'immutable';

describe('Map', () => {
it('converts from object', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/ObjectSeq.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Seq } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { Seq } from 'immutable';

describe('ObjectSequence', () => {
it('maps', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/OrderedMap.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { OrderedMap, Range, Seq } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { OrderedMap, Range, Seq } from 'immutable';

describe('OrderedMap', () => {
it('converts from object', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/OrderedSet.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Map, OrderedSet } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { Map, OrderedSet } from 'immutable';

describe('OrderedSet', () => {
it('provides initial values in a mixed order', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/Predicates.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import {
List,
Map,
Expand All @@ -7,7 +8,6 @@ import {
isImmutable,
isValueObject,
} from 'immutable';
import { describe, expect, it } from '@jest/globals';

describe('isImmutable', () => {
it('behaves as advertised', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/Range.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Range } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import fc from 'fast-check';
import { Range } from 'immutable';

describe('Range', () => {
it('fixed range', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/Record.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { List, Map, Record, Seq, isKeyed } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { List, Map, Record, Seq, isKeyed } from 'immutable';

describe('Record', () => {
it('defines a constructor', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/RecordJS.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Record } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { Record } from 'immutable';

describe('Record', () => {
it('defines a record factory', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/Repeat.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Repeat } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { Repeat } from 'immutable';

describe('Repeat', () => {
it('fixed repeat', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/Seq.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Seq, isCollection, isIndexed, isKeyed } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { Seq, isCollection, isIndexed, isKeyed } from 'immutable';

describe('Seq', () => {
it('returns undefined if empty and first is called without default argument', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/Set.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { List, Map, OrderedSet, Seq, Set, fromJS, is } from 'immutable';
import { describe, expect, it, jest } from '@jest/globals';
import { List, Map, OrderedSet, Seq, Set, fromJS, is } from 'immutable';

describe('Set', () => {
it('accepts array of values', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/Stack.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Seq, Stack } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import fc from 'fast-check';
import { Seq, Stack } from 'immutable';

function arrayOfSize(s: number): Array<number> {
const a = new Array(s);
Expand Down
2 changes: 1 addition & 1 deletion __tests__/concat.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { List, Seq, Set } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { List, Seq, Set } from 'immutable';

describe('concat', () => {
it('concats two sequences', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/count.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Range, Seq } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { Range, Seq } from 'immutable';

describe('count', () => {
it('counts sequences with known lengths', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/find.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Seq } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { Seq } from 'immutable';

describe('find', () => {
it('find returns notSetValue when match is not found', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/flatten.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Collection, List, Range, Seq, fromJS } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { Collection, List, Range, Seq, fromJS } from 'immutable';

describe('flatten', () => {
it('flattens sequences one level deep', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/fromJS.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { List, Map, Set, fromJS, isCollection } from 'immutable';
import { runInNewContext } from 'vm';
import { describe, expect, it } from '@jest/globals';
import { List, Map, Set, fromJS, isCollection } from 'immutable';

describe('fromJS', () => {
it('convert Array to Immutable.List', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/functional/get.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { get, Map, List, Range } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import invariant from '../../src/utils/invariant';
import { invariant } from '../../src/utils';

describe('get', () => {
it('for immutable structure', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/functional/has.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { List, Map, Range, has } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { List, Map, Range, has } from 'immutable';

describe('has', () => {
it('for immutable structure', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/functional/remove.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { List, Map, remove } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { List, Map, remove } from 'immutable';

describe('remove', () => {
it('for immutable structure', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/functional/set.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { set } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { set } from 'immutable';

describe('set', () => {
it('for immutable structure', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/functional/update.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { update } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { update } from 'immutable';

describe('update', () => {
it('for immutable structure', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/get.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Range } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { Range } from 'immutable';

describe('get', () => {
it('gets any index', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/getIn.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { List, Map, fromJS, getIn } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { List, Map, fromJS, getIn } from 'immutable';

describe('getIn', () => {
it('deep get', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/groupBy.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import {
Collection,
List,
Expand All @@ -9,7 +10,6 @@ import {
Stack,
isOrdered,
} from 'immutable';
import { describe, expect, it } from '@jest/globals';

describe('groupBy', () => {
it.each`
Expand Down
2 changes: 1 addition & 1 deletion __tests__/hasIn.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { List, Map, fromJS, hasIn } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { List, Map, fromJS, hasIn } from 'immutable';

describe('hasIn', () => {
it('deep has', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/hash.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { hash } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import fc from 'fast-check';
import { hash } from 'immutable';

describe('hash', () => {
it('stable hash of well known values', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/interpose.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Range } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { Range } from 'immutable';

describe('interpose', () => {
it('separates with a value', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/issues.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import {
List,
Map,
Expand All @@ -8,7 +9,6 @@ import {
Set,
fromJS,
} from 'immutable';
import { describe, expect, it } from '@jest/globals';

describe('Issue #1175', () => {
it('invalid hashCode() response should not infinitly recurse', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/join.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Seq } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import fc from 'fast-check';
import { Seq } from 'immutable';

describe('join', () => {
it('string-joins sequences with commas by default', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/merge.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import {
List,
Map,
Expand All @@ -8,7 +9,6 @@ import {
mergeDeep,
mergeDeepWith,
} from 'immutable';
import { describe, expect, it } from '@jest/globals';

describe('merge', () => {
it('merges two maps', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/minmax.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Seq, is } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import fc from 'fast-check';
import { Seq, is } from 'immutable';

const genHeterogeneousishArray = fc.oneof(
fc.sparseArray(fc.string()),
Expand Down
2 changes: 1 addition & 1 deletion __tests__/partition.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { beforeEach, describe, expect, it, jest } from '@jest/globals';
import {
Map as IMap,
Set as ISet,
Expand All @@ -11,7 +12,6 @@ import {
isSeq,
isSet,
} from 'immutable';
import { beforeEach, describe, expect, it, jest } from '@jest/globals';

describe('partition', () => {
let isOdd: jest.Mock<(x: number) => number>;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/slice.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { List, Range, Seq } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import fc from 'fast-check';
import { List, Range, Seq } from 'immutable';

describe('slice', () => {
it('slices a sequence', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/sort.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { List, OrderedMap, Range, Seq } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { List, OrderedMap, Range, Seq } from 'immutable';

describe('sort', () => {
it('sorts a sequence', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/splice.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { List, Range, Seq } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import fc from 'fast-check';
import { List, Range, Seq } from 'immutable';

describe('splice', () => {
it('splices a sequence only removing elements', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/transformerProtocol.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { List, Map, Set, Stack } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import { List, Map, Set, Stack } from 'immutable';
import * as t from 'transducers-js';

describe('Transformer Protocol', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/updateIn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
updateIn,
} from 'immutable';
import { describe, expect, it } from '@jest/globals';
import invariant from '../src/utils/invariant';
import { invariant } from '../src/utils';

describe('updateIn', () => {
it('deep edit', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/zip.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { List, Range, Seq } from 'immutable';
import { describe, expect, it } from '@jest/globals';
import fc from 'fast-check';
import { List, Range, Seq } from 'immutable';
import { expectToBeDefined } from './ts-utils';

describe('zip', () => {
Expand Down
Loading