Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
falsandtru committed Apr 22, 2023
1 parent 27032fc commit 99b877c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 27 deletions.
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,28 @@
"devDependencies": {
"@types/mocha": "10.0.1",
"@types/power-assert": "1.5.8",
"@typescript-eslint/parser": "^5.48.2",
"@typescript-eslint/parser": "^5.59.0",
"babel-loader": "^9.1.2",
"babel-plugin-unassert": "^3.2.0",
"concurrently": "^7.6.0",
"eslint": "^8.32.0",
"eslint-plugin-redos": "^4.4.2",
"eslint-webpack-plugin": "^3.2.0",
"glob": "^8.1.0",
"karma": "^6.4.1",
"karma-chrome-launcher": "^3.1.1",
"concurrently": "^8.0.1",
"eslint": "^8.39.0",
"eslint-plugin-redos": "^4.4.5",
"eslint-webpack-plugin": "^4.0.1",
"glob": "^10.2.1",
"karma": "^6.4.2",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage": "^2.2.0",
"karma-firefox-launcher": "^2.1.2",
"karma-mocha": "^2.0.1",
"karma-power-assert": "^1.0.0",
"mocha": "^10.2.0",
"npm-check-updates": "^16.6.2",
"semver": "^7.3.8",
"spica": "0.0.718",
"npm-check-updates": "^16.10.9",
"semver": "^7.5.0",
"spica": "0.0.721",
"ts-loader": "^9.4.2",
"typescript": "4.9.4",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"typescript": "5.0.4",
"webpack": "^5.80.0",
"webpack-cli": "^5.0.2",
"webpack-merge": "^5.8.0"
},
"scripts": {
Expand Down
11 changes: 4 additions & 7 deletions src/layer/data/es/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,20 @@ abstract class EventRecord<K extends string, V extends EventRecordValue> {
public readonly prop: Prop<V> | '';
}
export class UnstoredEventRecord<K extends string, V extends EventRecordValue> extends EventRecord<K, V> {
private readonly EVENT_RECORD!: this;
declare private readonly EVENT_RECORD: this;
constructor(
key: K,
value: Partial<V>,
type: EventRecordType = EventRecordType.Put,
date: number = Date.now()
) {
super(makeEventId(0), type, key, value, date);
this.EVENT_RECORD;
// Must not have id property.
if (this.id !== 0) throw new TypeError(`ClientChannel: UnstoredEventRecord: Invalid event id: ${this.id}`);
}
}
export abstract class StoredEventRecord<K extends string, V extends EventRecordValue> extends EventRecord<K, V> {
protected readonly EVENT_RECORD!: this;
declare protected readonly EVENT_RECORD: this;
constructor(
id: EventId,
key: K,
Expand All @@ -86,7 +85,7 @@ export abstract class StoredEventRecord<K extends string, V extends EventRecordV
}
}
export class LoadedEventRecord<K extends string, V extends EventRecordValue> extends StoredEventRecord<K, V> {
protected override readonly EVENT_RECORD!: this;
declare protected readonly EVENT_RECORD: this;
constructor(
{
id,
Expand All @@ -97,11 +96,10 @@ export class LoadedEventRecord<K extends string, V extends EventRecordValue> ext
}: LoadedEventRecord<K, V>
) {
super(id, key, value, type, date);
this.EVENT_RECORD;
}
}
export class SavedEventRecord<K extends string, V extends EventRecordValue> extends StoredEventRecord<K, V> {
protected override readonly EVENT_RECORD!: this;
declare protected readonly EVENT_RECORD: this;
constructor(
id: EventId,
key: K,
Expand All @@ -110,7 +108,6 @@ export class SavedEventRecord<K extends string, V extends EventRecordValue> exte
date: number
) {
super(id, key, value, type, date);
this.EVENT_RECORD;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/layer/data/es/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export abstract class EventStore<K extends string, V extends EventStore.Value> {
.add(record(event));
const ev = event;
tx.addEventListener('complete', () => {
assert(req.result > 0);
assert(req.result as number > 0);
revert();
const event = new SavedEventRecord(makeEventId(req.result as number), ev.key, ev.value, ev.type, ev.date);
this.memory
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"target": "ES2021",
"lib": [
"ES2021",
"ES2022",
"DOM",
"DOM.Iterable"
],
Expand All @@ -18,6 +18,7 @@
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"suppressImplicitAnyIndexErrors": true,
"ignoreDeprecations": "5.0",
"noFallthroughCasesInSwitch": true,
"noErrorTruncation": true,
"forceConsistentCasingInFileNames": true
Expand Down
8 changes: 4 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = env => {
resolve: {
extensions: ['.ts', '.js'],
},
entry: glob.sync('./{src,test}/**/*.ts'),
entry: glob.sync('./{src,test}/**/*.ts', { absolute: true }),
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'dist'),
Expand Down Expand Up @@ -75,7 +75,7 @@ module.exports = env => {
return merge(config);
case 'lint':
return merge(config, {
entry: glob.sync('./!(node_modules)/**/*.ts'),
entry: glob.sync('./!(node_modules)/**/*.ts', { absolute: true }),
plugins: [
new ESLintPlugin({
extensions: ['ts'],
Expand All @@ -84,7 +84,7 @@ module.exports = env => {
});
case 'bench':
return merge(config, {
entry: glob.sync('./benchmark/**/*.ts'),
entry: glob.sync('./benchmark/**/*.ts', { absolute: true }),
module: {
rules: [
{
Expand All @@ -103,7 +103,7 @@ module.exports = env => {
});
case 'dist':
return merge(config, {
entry: glob.sync('./index.ts'),
entry: glob.sync('./index.ts', { absolute: true }),
module: {
rules: [
{
Expand Down

0 comments on commit 99b877c

Please sign in to comment.