Skip to content
Merged
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: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# upgrade to prettier 3
0355483c301dba5e215e2c3d113125a274444e38
# sort imports with eslint
67a4fa91a0fe147656886e8dc0227f2c24185b6e
2 changes: 1 addition & 1 deletion __tests__/Comparator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from '@jest/globals';
import { List, OrderedSet, Seq, type Comparator, PairSorting } from 'immutable';
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
2 changes: 1 addition & 1 deletion __tests__/Conversion.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it } from '@jest/globals';
import fc, { type JsonValue } from 'fast-check';
import {
type Collection,
fromJS,
Expand All @@ -8,7 +9,6 @@ import {
OrderedMap,
Record,
} from 'immutable';
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 { describe, expect, it } from '@jest/globals';
import { is, List, Map, Seq, Set } from 'immutable';
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__/KeyedSeq.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from '@jest/globals';
import { Range, Seq } from 'immutable';
import fc from 'fast-check';
import { Range, Seq } from 'immutable';
import invariant from '../src/utils/invariant';

describe('KeyedSeq', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/List.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from '@jest/globals';
import { fromJS, List, Map, Range, Seq, Set } from 'immutable';
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';

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 { describe, expect, it, jest } from '@jest/globals';
import { fromJS, is, List, Map, Range, Record, Seq } from 'immutable';
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__/OrderedSet.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from '@jest/globals';
import { OrderedSet, Map } from 'immutable';
import { Map, OrderedSet } from 'immutable';

describe('OrderedSet', () => {
it('provides initial values in a mixed order', () => {
Expand Down
6 changes: 3 additions & 3 deletions __tests__/Predicates.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { describe, expect, it } from '@jest/globals';
import {
is,
isImmutable,
isValueObject,
List,
Map,
Set,
Stack,
is,
isImmutable,
isValueObject,
} from 'immutable';

describe('isImmutable', () => {
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 { describe, expect, it } from '@jest/globals';
import { Range } from 'immutable';
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 { describe, expect, it } from '@jest/globals';
import { isKeyed, List, Map, Record, Seq } from 'immutable';
import { List, Map, Record, Seq, isKeyed } from 'immutable';

describe('Record', () => {
it('defines a constructor', () => {
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 { describe, expect, it } from '@jest/globals';
import { isCollection, isIndexed, isKeyed, Seq } from 'immutable';
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 { describe, expect, it, jest } from '@jest/globals';
import { fromJS, is, List, Map, OrderedSet, Seq, Set } from 'immutable';
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 { describe, expect, it } from '@jest/globals';
import { Seq, Stack } from 'immutable';
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__/flatten.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from '@jest/globals';
import { Collection, fromJS, List, Range, Seq } from 'immutable';
import { Collection, List, Range, Seq, fromJS } from 'immutable';

describe('flatten', () => {
it('flattens sequences one level deep', () => {
Expand Down
4 changes: 2 additions & 2 deletions __tests__/fromJS.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from '@jest/globals';
import { runInNewContext } from 'vm';
import { List, Map, Set, isCollection, fromJS } from 'immutable';
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/has.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from '@jest/globals';
import { has, Map, List, Range } from 'immutable';
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 { describe, expect, it } from '@jest/globals';
import { remove, List, Map } from 'immutable';
import { List, Map, remove } from 'immutable';

describe('remove', () => {
it('for immutable structure', () => {
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 { describe, expect, it } from '@jest/globals';
import { fromJS, getIn, List, Map } from 'immutable';
import { List, Map, fromJS, getIn } from 'immutable';

describe('getIn', () => {
it('deep get', () => {
Expand Down
6 changes: 3 additions & 3 deletions __tests__/groupBy.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { describe, expect, it } from '@jest/globals';
import {
Collection,
List,
Map,
Seq,
isOrdered,
OrderedMap,
List,
OrderedSet,
Seq,
Set,
Stack,
isOrdered,
} from 'immutable';

describe('groupBy', () => {
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 { describe, expect, it } from '@jest/globals';
import { fromJS, hasIn, List, Map } from 'immutable';
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 { describe, expect, it } from '@jest/globals';
import { hash } from 'immutable';
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__/issues.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { describe, expect, it } from '@jest/globals';
import {
fromJS,
List,
Map,
OrderedMap,
OrderedSet,
Record,
Seq,
Set,
fromJS,
} from 'immutable';

describe('Issue #1175', () => {
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 { describe, expect, it } from '@jest/globals';
import { Seq } from 'immutable';
import fc from 'fast-check';
import { Seq } from 'immutable';

describe('join', () => {
it('string-joins sequences with commas by default', () => {
Expand Down
6 changes: 3 additions & 3 deletions __tests__/merge.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { describe, expect, it } from '@jest/globals';
import {
fromJS,
List,
Map,
Record,
Set,
fromJS,
merge,
mergeDeep,
mergeDeepWith,
Record,
Set,
} from 'immutable';

describe('merge', () => {
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 { describe, expect, it } from '@jest/globals';
import { is, Seq } from 'immutable';
import fc from 'fast-check';
import { Seq, is } from 'immutable';

const genHeterogeneousishArray = fc.oneof(
fc.sparseArray(fc.string()),
Expand Down
8 changes: 4 additions & 4 deletions __tests__/partition.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { beforeEach, describe, expect, it, jest } from '@jest/globals';
import {
Map as IMap,
Set as ISet,
List,
Seq,
isAssociative,
isIndexed,
isKeyed,
isList,
isMap,
isSeq,
isSet,
List,
Map as IMap,
Seq,
Set as ISet,
} from 'immutable';

describe('partition', () => {
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 { describe, expect, it } from '@jest/globals';
import { List, Range, Seq } from 'immutable';
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__/splice.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from '@jest/globals';
import { List, Range, Seq } from 'immutable';
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,6 +1,6 @@
import { describe, expect, it } from '@jest/globals';
import * as t from 'transducers-js';
import { List, Map, Set, Stack } from 'immutable';
import * as t from 'transducers-js';

describe('Transformer Protocol', () => {
it('transduces Stack without initial values', () => {
Expand Down
4 changes: 2 additions & 2 deletions __tests__/updateIn.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { describe, expect, it } from '@jest/globals';
import {
fromJS,
List,
Map,
type MapOf,
removeIn,
Seq,
Set,
fromJS,
removeIn,
setIn,
updateIn,
} from 'immutable';
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 { describe, expect, it } from '@jest/globals';
import { List, Range, Seq } from 'immutable';
import fc from 'fast-check';
import { List, Range, Seq } from 'immutable';
import { expectToBeDefined } from './ts-utils';

describe('zip', () => {
Expand Down
12 changes: 10 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pluginJs from '@eslint/js';
import globals from 'globals';
import pluginJest from 'eslint-plugin-jest';
import importPlugin from 'eslint-plugin-import';
import pluginJest from 'eslint-plugin-jest';
import pluginReact from 'eslint-plugin-react';
import globals from 'globals';
import {
config as tseslintConfig,
configs as tseslintConfigs,
Expand Down Expand Up @@ -64,6 +64,14 @@ export default tseslintConfig(
argsIgnorePattern: '^_',
},
],
'sort-imports': 'off',
'import/order': [
'error',
{
alphabetize: { order: 'asc' },
// warnOnUnassignedImports: true,
},
],
},
},

Expand Down
2 changes: 1 addition & 1 deletion resources/benchmark.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var Benchmark = require('benchmark');
var child_process = require('child_process');
var fs = require('fs');
var path = require('path');
var vm = require('vm');
var Benchmark = require('benchmark');

function promisify(fn) {
return function () {
Expand Down
2 changes: 1 addition & 1 deletion resources/jestPreprocessor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var typescript = require('typescript');
const makeSynchronous = require('make-synchronous');
var typescript = require('typescript');

const TYPESCRIPT_OPTIONS = {
noEmitOnError: true,
Expand Down
6 changes: 3 additions & 3 deletions src/Collection.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Seq, KeyedSeq, IndexedSeq, SetSeq } from './Seq';
import { IndexedSeq, KeyedSeq, Seq, SetSeq } from './Seq';
import { isAssociative } from './predicates/isAssociative';
import { isCollection } from './predicates/isCollection';
import { isKeyed } from './predicates/isKeyed';
import { isIndexed } from './predicates/isIndexed';
import { isAssociative } from './predicates/isAssociative';
import { isKeyed } from './predicates/isKeyed';

export class Collection {
constructor(value) {
Expand Down
Loading
Loading