@proteinjs/app-version-common 1.0.22 → 1.1.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.1.0](https://github.com/proteinjs/notifications/compare/@proteinjs/app-version-common@1.0.22...@proteinjs/app-version-common@1.1.0) (2026-04-08)
7
+
8
+
9
+ ### Features
10
+
11
+ * auto-reload on window refocus after 30s when update is pending ([ac4900c](https://github.com/proteinjs/notifications/commit/ac4900c7d15c21f0e20c428939cde2f15d4528f8))
12
+
13
+
14
+
15
+
16
+
6
17
  ## 1.0.1 (2024-08-02)
7
18
 
8
19
 
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Brent Bahry
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -18,7 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  require("@proteinjs/reflection");
19
19
  require("@proteinjs/service");
20
20
  /** Generate Source Graph */
21
- const sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/app-version-common/LatestVersionRequiringUpdate\",\"value\":{\"packageName\":\"@proteinjs/app-version-common\",\"name\":\"LatestVersionRequiringUpdate\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa4/packages/proteinjs/packages/notifications/packages/app-version/common/src/LatestVersionRequiringUpdate.ts\",\"qualifiedName\":\"@proteinjs/app-version-common/LatestVersionRequiringUpdate\",\"properties\":[{\"name\":\"version\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"@proteinjs/app-version-common/VersionCheckerService\",\"value\":{\"packageName\":\"@proteinjs/app-version-common\",\"name\":\"VersionCheckerService\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa4/packages/proteinjs/packages/notifications/packages/app-version/common/src/services/VersionCheckerService.ts\",\"qualifiedName\":\"@proteinjs/app-version-common/VersionCheckerService\",\"properties\":[],\"methods\":[{\"name\":\"needToUpdate\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<boolean>\",\"filePath\":null,\"qualifiedName\":\"/Promise<boolean>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"currentVersion\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/service\",\"name\":\"Service\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/service/Service\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/service/Service\"}],\"edges\":[{\"v\":\"@proteinjs/app-version-common/LatestVersionRequiringUpdate\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/app-version-common/VersionCheckerService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"}]}";
21
+ const sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/app-version-common/LatestVersionRequiringUpdate\",\"value\":{\"packageName\":\"@proteinjs/app-version-common\",\"name\":\"LatestVersionRequiringUpdate\",\"filePath\":\"/home/runner/work/notifications/notifications/packages/app-version/common/src/LatestVersionRequiringUpdate.ts\",\"qualifiedName\":\"@proteinjs/app-version-common/LatestVersionRequiringUpdate\",\"properties\":[{\"name\":\"version\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"@proteinjs/app-version-common/VersionCheckerService\",\"value\":{\"packageName\":\"@proteinjs/app-version-common\",\"name\":\"VersionCheckerService\",\"filePath\":\"/home/runner/work/notifications/notifications/packages/app-version/common/src/services/VersionCheckerService.ts\",\"qualifiedName\":\"@proteinjs/app-version-common/VersionCheckerService\",\"properties\":[],\"methods\":[{\"name\":\"needToUpdate\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<boolean>\",\"filePath\":null,\"qualifiedName\":\"/Promise<boolean>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"currentVersion\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/service\",\"name\":\"Service\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/service/Service\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/service/Service\"}],\"edges\":[{\"v\":\"@proteinjs/app-version-common/LatestVersionRequiringUpdate\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/app-version-common/VersionCheckerService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"}]}";
22
22
  /** Generate Source Links */
23
23
  const sourceLinks = {};
24
24
  /** Load Source Graph and Links */
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,iCAA+B;AAC/B,8BAA4B;AAG5B,4BAA4B;AAE5B,MAAM,WAAW,GAAG,+jFAA+jF,CAAC;AAGplF,4BAA4B;AAG5B,MAAM,WAAW,GAAG,EACnB,CAAC;AAGF,kCAAkC;AAElC,sDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,iCAA+B;AAC/B,8BAA4B;AAG5B,4BAA4B;AAE5B,MAAM,WAAW,GAAG,igFAAigF,CAAC;AAGthF,4BAA4B;AAG5B,MAAM,WAAW,GAAG,EACnB,CAAC;AAGF,kCAAkC;AAElC,sDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
@@ -10,8 +10,9 @@ export declare const getLatestVersionRequiringUpdate: () => LatestVersionRequiri
10
10
  */
11
11
  export interface LatestVersionRequiringUpdate extends Loadable {
12
12
  /**
13
- * If the user's bundle version is lower than this version, the `AppVersionUpdateBanner`
14
- * will be displayed until they reload the page.
13
+ * If the user's bundle version is lower than this version, the user will be
14
+ * notified that an update is available (and auto-updated on next navigation
15
+ * or tab refocus).
15
16
  */
16
17
  version: string;
17
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LatestVersionRequiringUpdate.d.ts","sourceRoot":"","sources":["../../src/LatestVersionRequiringUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAoB,MAAM,uBAAuB,CAAC;AAEnE,eAAO,MAAM,+BAA+B,oCAGzC,CAAC;AAEJ;;;;;;;GAOG;AACH,MAAM,WAAW,4BAA6B,SAAQ,QAAQ;IAC5D;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB"}
1
+ {"version":3,"file":"LatestVersionRequiringUpdate.d.ts","sourceRoot":"","sources":["../../src/LatestVersionRequiringUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAoB,MAAM,uBAAuB,CAAC;AAEnE,eAAO,MAAM,+BAA+B,oCAGzC,CAAC;AAEJ;;;;;;;GAOG;AACH,MAAM,WAAW,4BAA6B,SAAQ,QAAQ;IAC5D;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -6,7 +6,7 @@ import '@proteinjs/service';
6
6
 
7
7
  /** Generate Source Graph */
8
8
 
9
- const sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/app-version-common/LatestVersionRequiringUpdate\",\"value\":{\"packageName\":\"@proteinjs/app-version-common\",\"name\":\"LatestVersionRequiringUpdate\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa4/packages/proteinjs/packages/notifications/packages/app-version/common/src/LatestVersionRequiringUpdate.ts\",\"qualifiedName\":\"@proteinjs/app-version-common/LatestVersionRequiringUpdate\",\"properties\":[{\"name\":\"version\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"@proteinjs/app-version-common/VersionCheckerService\",\"value\":{\"packageName\":\"@proteinjs/app-version-common\",\"name\":\"VersionCheckerService\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa4/packages/proteinjs/packages/notifications/packages/app-version/common/src/services/VersionCheckerService.ts\",\"qualifiedName\":\"@proteinjs/app-version-common/VersionCheckerService\",\"properties\":[],\"methods\":[{\"name\":\"needToUpdate\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<boolean>\",\"filePath\":null,\"qualifiedName\":\"/Promise<boolean>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"currentVersion\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/service\",\"name\":\"Service\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/service/Service\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/service/Service\"}],\"edges\":[{\"v\":\"@proteinjs/app-version-common/LatestVersionRequiringUpdate\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/app-version-common/VersionCheckerService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"}]}";
9
+ const sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/app-version-common/LatestVersionRequiringUpdate\",\"value\":{\"packageName\":\"@proteinjs/app-version-common\",\"name\":\"LatestVersionRequiringUpdate\",\"filePath\":\"/home/runner/work/notifications/notifications/packages/app-version/common/src/LatestVersionRequiringUpdate.ts\",\"qualifiedName\":\"@proteinjs/app-version-common/LatestVersionRequiringUpdate\",\"properties\":[{\"name\":\"version\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"@proteinjs/app-version-common/VersionCheckerService\",\"value\":{\"packageName\":\"@proteinjs/app-version-common\",\"name\":\"VersionCheckerService\",\"filePath\":\"/home/runner/work/notifications/notifications/packages/app-version/common/src/services/VersionCheckerService.ts\",\"qualifiedName\":\"@proteinjs/app-version-common/VersionCheckerService\",\"properties\":[],\"methods\":[{\"name\":\"needToUpdate\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<boolean>\",\"filePath\":null,\"qualifiedName\":\"/Promise<boolean>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"currentVersion\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/service\",\"name\":\"Service\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/service/Service\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/service/Service\"}],\"edges\":[{\"v\":\"@proteinjs/app-version-common/LatestVersionRequiringUpdate\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/app-version-common/VersionCheckerService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"}]}";
10
10
 
11
11
 
12
12
  /** Generate Source Links */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proteinjs/app-version-common",
3
- "version": "1.0.22",
3
+ "version": "1.1.0",
4
4
  "description": "App version runtime-agnostic components",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -38,5 +38,6 @@
38
38
  "typescript": "5.2.2"
39
39
  },
40
40
  "main": "./dist/generated/index.js",
41
- "types": "./dist/generated/index.d.ts"
41
+ "types": "./dist/generated/index.d.ts",
42
+ "gitHead": "49080ab46d73cfda8c5893e3964d7a594fa973ea"
42
43
  }
@@ -15,8 +15,9 @@ export const getLatestVersionRequiringUpdate = () =>
15
15
  */
16
16
  export interface LatestVersionRequiringUpdate extends Loadable {
17
17
  /**
18
- * If the user's bundle version is lower than this version, the `AppVersionUpdateBanner`
19
- * will be displayed until they reload the page.
18
+ * If the user's bundle version is lower than this version, the user will be
19
+ * notified that an update is available (and auto-updated on next navigation
20
+ * or tab refocus).
20
21
  */
21
22
  version: string;
22
23
  }