@apollo-annotation/common 1.0.1 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apollo-annotation/common",
3
- "version": "1.0.1",
3
+ "version": "1.1.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/GMOD/Apollo3.git",
@@ -13,13 +13,13 @@
13
13
  "build": "tsc --build"
14
14
  },
15
15
  "dependencies": {
16
- "@apollo-annotation/schemas": "^1.0.1",
17
- "@jbrowse/core": "^4.1.1",
16
+ "@apollo-annotation/schemas": "^1.1.1",
17
+ "@jbrowse/core": "^4.3.0",
18
18
  "bson-objectid": "^2.0.4",
19
19
  "tslib": "^2.3.1"
20
20
  },
21
21
  "devDependencies": {
22
- "@apollo-annotation/mst": "^1.0.1",
22
+ "@apollo-annotation/mst": "^1.1.1",
23
23
  "@gmod/gff": "^2.1.0",
24
24
  "@nestjs/common": "^10.1.0",
25
25
  "@nestjs/core": "^10.1.0",
@@ -29,8 +29,8 @@
29
29
  "typescript": "^5.5.3"
30
30
  },
31
31
  "peerDependencies": {
32
- "@jbrowse/mobx-state-tree": "^5.5.0",
33
- "@mui/material": "^7.3.7",
32
+ "@jbrowse/mobx-state-tree": "^5.8.7",
33
+ "@mui/material": "^7.3.11",
34
34
  "@mui/x-data-grid": "^8.0.0",
35
35
  "mobx": "^6.6.1",
36
36
  "mobx-react": "^7.2.1",
@@ -3,7 +3,6 @@
3
3
  import type { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
4
4
  import type { Feature } from '@apollo-annotation/schemas'
5
5
  import ObjectID from 'bson-objectid'
6
- import type { Types } from 'mongoose'
7
6
 
8
7
  import {
9
8
  AssemblySpecificChange,
@@ -106,7 +105,7 @@ export abstract class FeatureChange extends AssemblySpecificChange {
106
105
  const refSeq =
107
106
  typeof feature.refSeq === 'string'
108
107
  ? feature.refSeq
109
- : (feature.refSeq as unknown as Types.ObjectId).toHexString()
108
+ : feature.refSeq.toHexString()
110
109
 
111
110
  return {
112
111
  // eslint-disable-next-line @typescript-eslint/no-misused-spread
@@ -119,10 +118,7 @@ export abstract class FeatureChange extends AssemblySpecificChange {
119
118
 
120
119
  addChild(parentFeature: Feature, child: AnnotationFeatureSnapshot) {
121
120
  if (!parentFeature.attributes?._id) {
122
- let { attributes } = parentFeature
123
- if (!attributes) {
124
- attributes = {}
125
- }
121
+ let { attributes = {} } = parentFeature
126
122
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
127
123
  attributes = {
128
124
  _id: [parentFeature._id.toString()],
@@ -132,9 +128,7 @@ export abstract class FeatureChange extends AssemblySpecificChange {
132
128
  parentFeature.attributes = attributes
133
129
  }
134
130
  const { _id } = child
135
- if (!parentFeature.children) {
136
- parentFeature.children = new Map()
137
- }
131
+ parentFeature.children ??= new Map()
138
132
  parentFeature.children.set(_id, {
139
133
  allIds: [],
140
134
  ...child,