@finnair/path 2.0.0 → 3.0.0-alpha.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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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
+ # [3.0.0-alpha.1](https://github.com/finnair/v-validation/compare/v2.0.0...v3.0.0-alpha.1) (2022-09-26)
7
+
8
+ **Note:** Version bump only for package @finnair/path
9
+
10
+
11
+
12
+
13
+
6
14
  # [2.0.0](https://github.com/finnair/v-validation/compare/v1.1.0...v2.0.0) (2022-09-08)
7
15
 
8
16
  **Note:** Version bump only for package @finnair/path
package/dist/Path.js CHANGED
@@ -5,6 +5,8 @@ const identifierPattern = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
5
5
  class Path {
6
6
  constructor(path) {
7
7
  this.path = path;
8
+ Object.freeze(this.path);
9
+ Object.freeze(this);
8
10
  }
9
11
  index(index) {
10
12
  Path.validateIndex(index);
@@ -15,6 +15,8 @@ class PathMatcher {
15
15
  let allowGaps = false;
16
16
  expressions.forEach(expression => (allowGaps = allowGaps || expression.allowGaps));
17
17
  this.allowGaps = allowGaps;
18
+ Object.freeze(this.expressions);
19
+ Object.freeze(this);
18
20
  }
19
21
  find(root, first) {
20
22
  if (this.expressions.length === 0) {
@@ -7,6 +7,9 @@ class Projection {
7
7
  this.includes = includes;
8
8
  this.excludes = excludes;
9
9
  this.allowGaps = allowGaps;
10
+ Object.freeze(this.includes);
11
+ Object.freeze(this.excludes);
12
+ Object.freeze(this);
10
13
  }
11
14
  map(input) {
12
15
  let output;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finnair/path",
3
- "version": "2.0.0",
3
+ "version": "3.0.0-alpha.1",
4
4
  "private": false,
5
5
  "description": "Simple object path as array of strings and numbers",
6
6
  "main": "dist/index.js",
@@ -22,5 +22,5 @@
22
22
  "scripts": {
23
23
  "build": "tsc -b ."
24
24
  },
25
- "gitHead": "432759665b664859d5ed80e4b573432abdb23afc"
25
+ "gitHead": "34e2b0697aaee247e03b7a65d677c7b766a7fbca"
26
26
  }