Skip to content

Commit

Permalink
Merge pull request #815 from orbitjs/build-deps
Browse files Browse the repository at this point in the history
Update all build deps
  • Loading branch information
dgeb authored Feb 17, 2021
2 parents 1e5d290 + 7025060 commit 5257535
Show file tree
Hide file tree
Showing 32 changed files with 966 additions and 1,822 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"devDependencies": {
"@orbit/prettier-config": "^1.0.0",
"lerna": "^3.22.1",
"prettier": "^2.1.1",
"typedoc": "^0.17.7",
"typedoc-plugin-lerna-packages": "^0.3.0"
"prettier": "^2.2.1",
"typedoc": "^0.20.25",
"typedoc-plugin-lerna-packages": "^0.3.1"
},
"prettier": "@orbit/prettier-config",
"volta": {
Expand Down
7 changes: 0 additions & 7 deletions packages/@orbit/build/babel.config.json

This file was deleted.

27 changes: 11 additions & 16 deletions packages/@orbit/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,19 @@
"repository": "https://github.com/orbitjs/orbit",
"license": "MIT",
"dependencies": {
"@babel/core": "^7.10.1",
"@babel/plugin-proposal-decorators": "^7.10.1",
"@babel/plugin-syntax-import-meta": "^7.10.1",
"@babel/preset-typescript": "^7.10.1",
"@orbit/prettier-config": "^1.0.0",
"@snowpack/plugin-babel": "^1.0.0",
"@types/qunit": "^2.9.1",
"@typescript-eslint/eslint-plugin": "^3.3.0",
"@typescript-eslint/parser": "^3.3.0",
"eslint": "^7.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"prettier": "^2.1.1",
"qunit": "^2.10.0",
"snowpack": "^2.6.4",
"@types/qunit": "^2.11.1",
"@typescript-eslint/eslint-plugin": "^4.15.1",
"@typescript-eslint/parser": "^4.15.1",
"eslint": "^7.20.0",
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-prettier": "^3.3.1",
"prettier": "^2.2.1",
"qunit": "^2.14.0",
"snowpack": "^3.0.11",
"testem": "^3.2.0",
"typescript": "^3.9.5",
"walk-sync": "^2.1.0"
"typescript": "^4.1.5",
"walk-sync": "^2.2.0"
},
"prettier": "@orbit/prettier-config"
}
13 changes: 5 additions & 8 deletions packages/@orbit/build/snowpack.config.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
"devOptions": {
"bundle": false,
"buildOptions": {
"out": "tests-build"
},
"plugins": ["@snowpack/plugin-babel"],
"scripts": {
"mount:static": "mount tests-static --to /",
"mount:src": "mount src --to /_dist_/src",
"mount:test": "mount test --to /_dist_/test",
"build:js,jsx,ts,tsx": "@snowpack/plugin-babel"
"mount": {
"tests-static": "/",
"src": "/_dist_/src",
"test": "/_dist_/test"
}
}
3 changes: 0 additions & 3 deletions packages/@orbit/coordinator/babel.config.json

This file was deleted.

3 changes: 0 additions & 3 deletions packages/@orbit/core/babel.config.json

This file was deleted.

11 changes: 4 additions & 7 deletions packages/@orbit/core/test/task-processor-test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Orbit } from '../src/main';
import { Task, Performer } from '../src/task';
import { TaskProcessor } from '../src/task-processor';
import { delay } from './support/timing';

const { module, test } = QUnit;

Expand All @@ -21,16 +22,12 @@ module('TaskProcessor', function () {
assert.expect(5);

const target: Performer = {
perform(task: Task): Promise<string> {
async perform(task: Task): Promise<string> {
assert.equal(task.type, 'doSomething', 'perform invoked with task');
assert.ok(processor.started, 'processor started');
assert.ok(!processor.settled, 'processor not settled');
return new Promise(function (resolve: (value?: string) => void) {
function respond() {
resolve(':)');
}
Orbit.globals.setTimeout(respond, 1);
});
await delay(1);
return ':)';
}
};

Expand Down
3 changes: 0 additions & 3 deletions packages/@orbit/data/babel.config.json

This file was deleted.

77 changes: 49 additions & 28 deletions packages/@orbit/data/test/source-interfaces/pullable-test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Query, QueryOrExpressions } from '../../src/query';
import { Query } from '../../src/query';
import { Source } from '../../src/source';
import { buildTransform } from '../../src/transform';
import { RequestOptions } from '../../src/request';
Expand All @@ -7,7 +7,7 @@ import {
isPullable,
Pullable
} from '../../src/source-interfaces/pullable';
import { FullResponse, ResponseHints } from '../../src/response';
import { ResponseHints } from '../../src/response';
import {
FindRecords,
RecordResponse,
Expand Down Expand Up @@ -288,34 +288,55 @@ module('@pullable', function (hooks) {
]
};

source.on('beforePull', async function (
query: Query<RecordQueryExpression>,
hints: ResponseHints<RecordData, RecordResponse>
) {
assert.equal(++order, 1, 'beforePull triggered first');
assert.deepEqual(hints, {}, 'beforePull is passed empty `hints` object');
h = hints;
hints.data = [
{ type: 'planet', id: 'venus' },
{ type: 'planet', id: 'mars' }
];
});
source.on(
'beforePull',
async function (
query: Query<RecordQueryExpression>,
hints: ResponseHints<RecordData, RecordResponse>
) {
assert.equal(++order, 1, 'beforePull triggered first');
assert.deepEqual(
hints,
{},
'beforePull is passed empty `hints` object'
);
h = hints;
hints.data = [
{ type: 'planet', id: 'venus' },
{ type: 'planet', id: 'mars' }
];
}
);

source.on('beforePull', async function (
query: Query<RecordQueryExpression>,
hints: ResponseHints<RecordData, RecordResponse>
) {
assert.equal(++order, 2, 'beforePull triggered second');
assert.strictEqual(hints, h, 'beforePull is passed same hints instance');
});
source.on(
'beforePull',
async function (
query: Query<RecordQueryExpression>,
hints: ResponseHints<RecordData, RecordResponse>
) {
assert.equal(++order, 2, 'beforePull triggered second');
assert.strictEqual(
hints,
h,
'beforePull is passed same hints instance'
);
}
);

source.on('beforePull', async function (
query: Query<RecordQueryExpression>,
hints: ResponseHints<RecordData, RecordResponse>
) {
assert.equal(++order, 3, 'beforePull triggered third');
assert.strictEqual(hints, h, 'beforePull is passed same hints instance');
});
source.on(
'beforePull',
async function (
query: Query<RecordQueryExpression>,
hints: ResponseHints<RecordData, RecordResponse>
) {
assert.equal(++order, 3, 'beforePull triggered third');
assert.strictEqual(
hints,
h,
'beforePull is passed same hints instance'
);
}
);

source._pull = async function (
query: Query<RecordQueryExpression>,
Expand Down
86 changes: 53 additions & 33 deletions packages/@orbit/data/test/source-interfaces/pushable-test.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import { buildTransform, Transform } from '../../src/transform';
import { Source } from '../../src/source';
import { ResponseHints } from '../../src/response';
import { Source } from '../../src/source';
import {
pushable,
isPushable,
pushable,
Pushable
} from '../../src/source-interfaces/pushable';
import { buildTransform, Transform } from '../../src/transform';
import {
AddRecordOperation,
RecordData,
RecordResponse,
RecordOperation,
RecordTransformBuilder,
AddRecordOperation,
UpdateRecordOperation
RecordResponse,
RecordTransformBuilder
} from '../support/record-data';

const { module, test } = QUnit;
Expand Down Expand Up @@ -318,34 +317,55 @@ module('@pushable', function (hooks) {
};
let h: ResponseHints<RecordData, RecordResponse>;

source.on('beforePush', async function (
transform: Transform<RecordOperation>,
hints: ResponseHints<RecordData, RecordResponse>
) {
assert.equal(++order, 1, 'beforePush triggered first');
assert.deepEqual(hints, {}, 'beforePush is passed empty `hints` object');
h = hints;
hints.data = [
{ type: 'planet', id: 'venus' },
{ type: 'planet', id: 'mars' }
];
});
source.on(
'beforePush',
async function (
transform: Transform<RecordOperation>,
hints: ResponseHints<RecordData, RecordResponse>
) {
assert.equal(++order, 1, 'beforePush triggered first');
assert.deepEqual(
hints,
{},
'beforePush is passed empty `hints` object'
);
h = hints;
hints.data = [
{ type: 'planet', id: 'venus' },
{ type: 'planet', id: 'mars' }
];
}
);

source.on('beforePush', async function (
transform: Transform<RecordOperation>,
hints: ResponseHints<RecordData, RecordResponse>
) {
assert.equal(++order, 2, 'beforePush triggered second');
assert.strictEqual(hints, h, 'beforePush is passed same hints instance');
});
source.on(
'beforePush',
async function (
transform: Transform<RecordOperation>,
hints: ResponseHints<RecordData, RecordResponse>
) {
assert.equal(++order, 2, 'beforePush triggered second');
assert.strictEqual(
hints,
h,
'beforePush is passed same hints instance'
);
}
);

source.on('beforePush', async function (
transform: Transform<RecordOperation>,
hints: ResponseHints<RecordData, RecordResponse>
) {
assert.equal(++order, 3, 'beforePush triggered third');
assert.strictEqual(hints, h, 'beforePush is passed same hints instance');
});
source.on(
'beforePush',
async function (
transform: Transform<RecordOperation>,
hints: ResponseHints<RecordData, RecordResponse>
) {
assert.equal(++order, 3, 'beforePush triggered third');
assert.strictEqual(
hints,
h,
'beforePush is passed same hints instance'
);
}
);

source._push = async function (
transform: Transform<RecordOperation>,
Expand Down
Loading

0 comments on commit 5257535

Please sign in to comment.