@finnair/path 0.6.2 → 1.0.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,38 @@
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.0.0](https://github.com/finnair/v-validation/compare/v0.9.1...v1.0.0) (2022-01-20)
7
+
8
+ **Note:** Version bump only for package @finnair/path
9
+
10
+
11
+
12
+
13
+
14
+ # [0.9.0](https://github.com/finnair/v-validation/compare/v0.8.0...v0.9.0) (2020-09-23)
15
+
16
+ **Note:** Version bump only for package @finnair/path
17
+
18
+
19
+
20
+
21
+
22
+ # [0.8.0](https://github.com/finnair/v-validation/compare/v0.7.0...v0.8.0) (2020-09-09)
23
+
24
+ **Note:** Version bump only for package @finnair/path
25
+
26
+
27
+
28
+
29
+
30
+ # [0.7.0](https://github.com/finnair/v-validation/compare/v0.6.2...v0.7.0) (2020-08-26)
31
+
32
+ **Note:** Version bump only for package @finnair/path
33
+
34
+
35
+
36
+
37
+
6
38
  ## [0.6.2](https://github.com/finnair/v-validation/compare/v0.6.1...v0.6.2) (2020-05-22)
7
39
 
8
40
 
package/dist/Path.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Path = void 0;
3
4
  const identifierPattern = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
4
5
  class Path {
5
6
  constructor(path) {
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UnionMatcher = exports.Node = exports.IndexMatcher = exports.PropertyMatcher = exports.AnyProperty = exports.AnyIndex = exports.PathMatcher = void 0;
3
4
  const Path_1 = require("./Path");
4
5
  const matchers_1 = require("./matchers");
5
- exports.Node = matchers_1.Node;
6
- exports.PropertyMatcher = matchers_1.PropertyMatcher;
7
- exports.IndexMatcher = matchers_1.IndexMatcher;
8
- exports.AnyIndex = matchers_1.AnyIndex;
9
- exports.AnyProperty = matchers_1.AnyProperty;
10
- exports.UnionMatcher = matchers_1.UnionMatcher;
6
+ Object.defineProperty(exports, "Node", { enumerable: true, get: function () { return matchers_1.Node; } });
7
+ Object.defineProperty(exports, "PropertyMatcher", { enumerable: true, get: function () { return matchers_1.PropertyMatcher; } });
8
+ Object.defineProperty(exports, "IndexMatcher", { enumerable: true, get: function () { return matchers_1.IndexMatcher; } });
9
+ Object.defineProperty(exports, "AnyIndex", { enumerable: true, get: function () { return matchers_1.AnyIndex; } });
10
+ Object.defineProperty(exports, "AnyProperty", { enumerable: true, get: function () { return matchers_1.AnyProperty; } });
11
+ Object.defineProperty(exports, "UnionMatcher", { enumerable: true, get: function () { return matchers_1.UnionMatcher; } });
11
12
  class PathMatcher {
12
13
  constructor(expressions) {
13
14
  this.expressions = expressions;
@@ -122,7 +123,7 @@ class PathMatcher {
122
123
  if (type === 'string') {
123
124
  return new matchers_1.PropertyMatcher(component);
124
125
  }
125
- if (matchers_1.isPathExpression(component)) {
126
+ if ((0, matchers_1.isPathExpression)(component)) {
126
127
  return component;
127
128
  }
128
129
  throw new Error(`Unrecognized PathComponent: ${component} of type ${type}`);
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.projection = exports.Projection = void 0;
3
4
  const PathMatcher_1 = require("./PathMatcher");
4
5
  class Projection {
5
6
  constructor(includes, excludes, allowGaps) {
package/dist/index.js CHANGED
@@ -1,10 +1,18 @@
1
1
  "use strict";
2
- function __export(m) {
3
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
- }
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
5
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.Path = void 0;
6
14
  var Path_1 = require("./Path");
7
- exports.Path = Path_1.Path;
8
- __export(require("./PathMatcher"));
9
- __export(require("./matchers"));
10
- __export(require("./Projection"));
15
+ Object.defineProperty(exports, "Path", { enumerable: true, get: function () { return Path_1.Path; } });
16
+ __exportStar(require("./PathMatcher"), exports);
17
+ __exportStar(require("./matchers"), exports);
18
+ __exportStar(require("./Projection"), exports);
package/dist/matchers.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AnyProperty = exports.AnyIndex = exports.UnionMatcher = exports.PropertyMatcher = exports.IndexMatcher = exports.Node = exports.isPathExpression = void 0;
3
4
  const Path_1 = require("./Path");
4
5
  function isPathExpression(component) {
5
6
  return !!component && typeof component.test === 'function' && typeof component.find === 'function';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finnair/path",
3
- "version": "0.6.2",
3
+ "version": "1.0.0",
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": "5d7d3ef518cd93ebb7ec0f28e084a8104a0f773b"
25
+ "gitHead": "bd40a739be8c006e46f0b9f59426f435a971389b"
26
26
  }