@teambit/legacy-bit-id 1.0.4 → 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.
Files changed (40) hide show
  1. package/bit-id.spec.ts +225 -0
  2. package/bit-id.ts +314 -0
  3. package/bit-ids.spec.ts +96 -0
  4. package/bit-ids.ts +195 -0
  5. package/dist/bit-id.js +290 -344
  6. package/dist/bit-id.js.map +1 -1
  7. package/dist/bit-id.spec.js +224 -349
  8. package/dist/bit-id.spec.js.map +1 -1
  9. package/dist/bit-ids.d.ts +52 -0
  10. package/dist/bit-ids.js +174 -0
  11. package/dist/bit-ids.js.map +1 -0
  12. package/dist/bit-ids.spec.d.ts +1 -0
  13. package/dist/bit-ids.spec.js +92 -0
  14. package/dist/bit-ids.spec.js.map +1 -0
  15. package/dist/exceptions/index.js +15 -71
  16. package/dist/exceptions/index.js.map +1 -1
  17. package/dist/exceptions/invalid-bit-id.js +6 -21
  18. package/dist/exceptions/invalid-bit-id.js.map +1 -1
  19. package/dist/exceptions/invalid-id-chunk.js +6 -21
  20. package/dist/exceptions/invalid-id-chunk.js.map +1 -1
  21. package/dist/exceptions/invalid-name.js +6 -21
  22. package/dist/exceptions/invalid-name.js.map +1 -1
  23. package/dist/exceptions/invalid-scope-name-from-remote.js +7 -18
  24. package/dist/exceptions/invalid-scope-name-from-remote.js.map +1 -1
  25. package/dist/exceptions/invalid-scope-name.js +7 -23
  26. package/dist/exceptions/invalid-scope-name.js.map +1 -1
  27. package/dist/index.d.ts +2 -1
  28. package/dist/index.js +41 -90
  29. package/dist/index.js.map +1 -1
  30. package/dist/tsconfig.json +32 -0
  31. package/dist/utils/is-valid-id-chunk.js +8 -10
  32. package/dist/utils/is-valid-id-chunk.js.map +1 -1
  33. package/dist/utils/is-valid-id-chunk.spec.js +21 -32
  34. package/dist/utils/is-valid-id-chunk.spec.js.map +1 -1
  35. package/dist/utils/is-valid-scope-name.js +5 -8
  36. package/dist/utils/is-valid-scope-name.js.map +1 -1
  37. package/index.ts +18 -0
  38. package/package.json +5 -13
  39. package/tsconfig.json +2 -10
  40. /package/dist/{preview-1698204020177.js → preview-1706301986259.js} +0 -0
@@ -1,25 +1,10 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- function _bitError() {
8
- const data = require("@teambit/bit-error");
9
- _bitError = function () {
10
- return data;
11
- };
12
- return data;
13
- }
14
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
16
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
17
- class InvalidName extends _bitError().BitError {
18
- constructor(componentName) {
19
- super(`error: "${componentName}" is invalid, component names can only contain alphanumeric, lowercase characters, and the following ["-", "_", "$", "!", "/"]`);
20
- _defineProperty(this, "componentName", void 0);
21
- }
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const bit_error_1 = require("@teambit/bit-error");
4
+ class InvalidName extends bit_error_1.BitError {
5
+ constructor(componentName) {
6
+ super(`error: "${componentName}" is invalid, component names can only contain alphanumeric, lowercase characters, and the following ["-", "_", "$", "!", "/"]`);
7
+ }
22
8
  }
23
9
  exports.default = InvalidName;
24
-
25
10
  //# sourceMappingURL=invalid-name.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_bitError","data","require","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","InvalidName","BitError","constructor","componentName","exports","default"],"sources":["invalid-name.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\n\nexport default class InvalidName extends BitError {\n componentName: string;\n\n constructor(componentName: string) {\n super(\n `error: \"${componentName}\" is invalid, component names can only contain alphanumeric, lowercase characters, and the following [\"-\", \"_\", \"$\", \"!\", \"/\"]`\n );\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8C,SAAAE,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV,GAAA;AAAA,SAAAS,aAAAE,KAAA,EAAAC,IAAA,eAAAD,KAAA,iBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAAG,MAAA,CAAAC,WAAA,OAAAF,IAAA,KAAAG,SAAA,QAAAC,GAAA,GAAAJ,IAAA,CAAAK,IAAA,CAAAP,KAAA,EAAAC,IAAA,2BAAAK,GAAA,sBAAAA,GAAA,YAAAE,SAAA,4DAAAP,IAAA,gBAAAF,MAAA,GAAAU,MAAA,EAAAT,KAAA;AAE/B,MAAMU,WAAW,SAASC,oBAAQ,CAAC;EAGhDC,WAAWA,CAACC,aAAqB,EAAE;IACjC,KAAK,CACF,WAAUA,aAAc,gIAC3B,CAAC;IAAC1B,eAAA;EACJ;AACF;AAAC2B,OAAA,CAAAC,OAAA,GAAAL,WAAA"}
1
+ {"version":3,"file":"invalid-name.js","sourceRoot":"","sources":["../../exceptions/invalid-name.ts"],"names":[],"mappings":";;AAAA,kDAA8C;AAE9C,MAAqB,WAAY,SAAQ,oBAAQ;IAG/C,YAAY,aAAqB;QAC/B,KAAK,CACH,WAAW,aAAa,gIAAgI,CACzJ,CAAC;IACJ,CAAC;CACF;AARD,8BAQC"}
@@ -1,24 +1,13 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- function _bitError() {
8
- const data = require("@teambit/bit-error");
9
- _bitError = function () {
10
- return data;
11
- };
12
- return data;
13
- }
14
- class InvalidScopeNameFromRemote extends _bitError().BitError {
15
- constructor(scopeName) {
16
- super(`cannot find scope '${scopeName}'.
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const bit_error_1 = require("@teambit/bit-error");
4
+ class InvalidScopeNameFromRemote extends bit_error_1.BitError {
5
+ constructor(scopeName) {
6
+ super(`cannot find scope '${scopeName}'.
17
7
  if you are targeting a self-hosted scope, please ensure the scope is configured in your remotes (via "bit remote" command) and that the scope name is correct.
18
8
  if this is a scope on bit.cloud please add the organization name before the scope (yourOrg.some-scope-name)`);
19
- this.scopeName = scopeName;
20
- }
9
+ this.scopeName = scopeName;
10
+ }
21
11
  }
22
12
  exports.default = InvalidScopeNameFromRemote;
23
-
24
13
  //# sourceMappingURL=invalid-scope-name-from-remote.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_bitError","data","require","InvalidScopeNameFromRemote","BitError","constructor","scopeName","exports","default"],"sources":["invalid-scope-name-from-remote.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\n\nexport default class InvalidScopeNameFromRemote extends BitError {\n constructor(readonly scopeName: string) {\n super(`cannot find scope '${scopeName}'.\nif you are targeting a self-hosted scope, please ensure the scope is configured in your remotes (via \"bit remote\" command) and that the scope name is correct.\nif this is a scope on bit.cloud please add the organization name before the scope (yourOrg.some-scope-name)`);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEe,MAAME,0BAA0B,SAASC,oBAAQ,CAAC;EAC/DC,WAAWA,CAAUC,SAAiB,EAAE;IACtC,KAAK,CAAE,sBAAqBA,SAAU;AAC1C;AACA,4GAA4G,CAAC;IAAC,KAHvFA,SAAiB,GAAjBA,SAAiB;EAItC;AACF;AAACC,OAAA,CAAAC,OAAA,GAAAL,0BAAA"}
1
+ {"version":3,"file":"invalid-scope-name-from-remote.js","sourceRoot":"","sources":["../../exceptions/invalid-scope-name-from-remote.ts"],"names":[],"mappings":";;AAAA,kDAA8C;AAE9C,MAAqB,0BAA2B,SAAQ,oBAAQ;IAC9D,YAAqB,SAAiB;QACpC,KAAK,CAAC,sBAAsB,SAAS;;4GAEmE,CAAC,CAAC;QAHvF,cAAS,GAAT,SAAS,CAAQ;IAItC,CAAC;CACF;AAND,6CAMC"}
@@ -1,27 +1,11 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- function _bitError() {
8
- const data = require("@teambit/bit-error");
9
- _bitError = function () {
10
- return data;
11
- };
12
- return data;
13
- }
14
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
16
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
17
- class InvalidScopeName extends _bitError().BitError {
18
- constructor(scopeName, id, variant) {
19
- const variantStr = variant ? `configured in variant "${variant}" ` : '';
20
- super(`error: "${id || scopeName}" ${variantStr}is invalid, component scope names can only contain alphanumeric, lowercase characters, and the following ["-", "_", "$", "!"]`);
21
- _defineProperty(this, "scopeName", void 0);
22
- _defineProperty(this, "id", void 0);
23
- }
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const bit_error_1 = require("@teambit/bit-error");
4
+ class InvalidScopeName extends bit_error_1.BitError {
5
+ constructor(scopeName, id, variant) {
6
+ const variantStr = variant ? `configured in variant "${variant}" ` : '';
7
+ super(`error: "${id || scopeName}" ${variantStr}is invalid, component scope names can only contain alphanumeric, lowercase characters, and the following ["-", "_", "$", "!"]`);
8
+ }
24
9
  }
25
10
  exports.default = InvalidScopeName;
26
-
27
11
  //# sourceMappingURL=invalid-scope-name.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_bitError","data","require","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","InvalidScopeName","BitError","constructor","scopeName","id","variant","variantStr","exports","default"],"sources":["invalid-scope-name.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\n\nexport default class InvalidScopeName extends BitError {\n scopeName: string;\n id: string;\n\n constructor(scopeName: string, id?: string, variant?: string) {\n const variantStr = variant ? `configured in variant \"${variant}\" ` : '';\n super(\n `error: \"${\n id || scopeName\n }\" ${variantStr}is invalid, component scope names can only contain alphanumeric, lowercase characters, and the following [\"-\", \"_\", \"$\", \"!\"]`\n );\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8C,SAAAE,gBAAAC,GA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C1D,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,0BAA0B,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACxE,KAAK,CACH,WACE,EAAE,IAAI,SACR,KAAK,UAAU,+HAA+H,CAC/I,CAAC;IACJ,CAAC;CACF;AAZD,mCAYC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import BitId, { BitIdProps, VERSION_DELIMITER, BitIdStr } from './bit-id';
2
+ import BitIds from './bit-ids';
2
3
  import { InvalidName, InvalidScopeName, InvalidScopeNameFromRemote } from './exceptions';
3
4
  import isValidScopeName from './utils/is-valid-scope-name';
4
5
  import isValidIdChunk from './utils/is-valid-id-chunk';
5
- export { BitId, BitIdProps, BitIdStr, VERSION_DELIMITER, isValidScopeName, isValidIdChunk, InvalidName, InvalidScopeName, InvalidScopeNameFromRemote, };
6
+ export { BitId, BitIds, BitIdProps, BitIdStr, VERSION_DELIMITER, isValidScopeName, isValidIdChunk, InvalidName, InvalidScopeName, InvalidScopeNameFromRemote, };
package/dist/index.js CHANGED
@@ -1,92 +1,43 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "BitId", {
7
- enumerable: true,
8
- get: function () {
9
- return _bitId().default;
10
- }
11
- });
12
- Object.defineProperty(exports, "BitIdProps", {
13
- enumerable: true,
14
- get: function () {
15
- return _bitId().BitIdProps;
16
- }
17
- });
18
- Object.defineProperty(exports, "BitIdStr", {
19
- enumerable: true,
20
- get: function () {
21
- return _bitId().BitIdStr;
22
- }
23
- });
24
- Object.defineProperty(exports, "InvalidName", {
25
- enumerable: true,
26
- get: function () {
27
- return _exceptions().InvalidName;
28
- }
29
- });
30
- Object.defineProperty(exports, "InvalidScopeName", {
31
- enumerable: true,
32
- get: function () {
33
- return _exceptions().InvalidScopeName;
34
- }
35
- });
36
- Object.defineProperty(exports, "InvalidScopeNameFromRemote", {
37
- enumerable: true,
38
- get: function () {
39
- return _exceptions().InvalidScopeNameFromRemote;
40
- }
41
- });
42
- Object.defineProperty(exports, "VERSION_DELIMITER", {
43
- enumerable: true,
44
- get: function () {
45
- return _bitId().VERSION_DELIMITER;
46
- }
47
- });
48
- Object.defineProperty(exports, "isValidIdChunk", {
49
- enumerable: true,
50
- get: function () {
51
- return _isValidIdChunk().default;
52
- }
53
- });
54
- Object.defineProperty(exports, "isValidScopeName", {
55
- enumerable: true,
56
- get: function () {
57
- return _isValidScopeName().default;
58
- }
59
- });
60
- function _bitId() {
61
- const data = _interopRequireWildcard(require("./bit-id"));
62
- _bitId = function () {
63
- return data;
64
- };
65
- return data;
66
- }
67
- function _exceptions() {
68
- const data = require("./exceptions");
69
- _exceptions = function () {
70
- return data;
71
- };
72
- return data;
73
- }
74
- function _isValidScopeName() {
75
- const data = _interopRequireDefault(require("./utils/is-valid-scope-name"));
76
- _isValidScopeName = function () {
77
- return data;
78
- };
79
- return data;
80
- }
81
- function _isValidIdChunk() {
82
- const data = _interopRequireDefault(require("./utils/is-valid-id-chunk"));
83
- _isValidIdChunk = function () {
84
- return data;
85
- };
86
- return data;
87
- }
88
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
89
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
90
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
91
-
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.InvalidScopeNameFromRemote = exports.InvalidScopeName = exports.InvalidName = exports.isValidIdChunk = exports.isValidScopeName = exports.VERSION_DELIMITER = exports.BitIds = exports.BitId = void 0;
30
+ const bit_id_1 = __importStar(require("./bit-id"));
31
+ exports.BitId = bit_id_1.default;
32
+ Object.defineProperty(exports, "VERSION_DELIMITER", { enumerable: true, get: function () { return bit_id_1.VERSION_DELIMITER; } });
33
+ const bit_ids_1 = __importDefault(require("./bit-ids"));
34
+ exports.BitIds = bit_ids_1.default;
35
+ const exceptions_1 = require("./exceptions");
36
+ Object.defineProperty(exports, "InvalidName", { enumerable: true, get: function () { return exceptions_1.InvalidName; } });
37
+ Object.defineProperty(exports, "InvalidScopeName", { enumerable: true, get: function () { return exceptions_1.InvalidScopeName; } });
38
+ Object.defineProperty(exports, "InvalidScopeNameFromRemote", { enumerable: true, get: function () { return exceptions_1.InvalidScopeNameFromRemote; } });
39
+ const is_valid_scope_name_1 = __importDefault(require("./utils/is-valid-scope-name"));
40
+ exports.isValidScopeName = is_valid_scope_name_1.default;
41
+ const is_valid_id_chunk_1 = __importDefault(require("./utils/is-valid-id-chunk"));
42
+ exports.isValidIdChunk = is_valid_id_chunk_1.default;
92
43
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_bitId","data","_interopRequireWildcard","require","_exceptions","_isValidScopeName","_interopRequireDefault","_isValidIdChunk","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"sources":["index.ts"],"sourcesContent":["import BitId, { BitIdProps, VERSION_DELIMITER, BitIdStr } from './bit-id';\nimport { InvalidName, InvalidScopeName, InvalidScopeNameFromRemote } from './exceptions';\nimport isValidScopeName from './utils/is-valid-scope-name';\nimport isValidIdChunk from './utils/is-valid-id-chunk';\n\nexport {\n BitId,\n BitIdProps,\n BitIdStr,\n VERSION_DELIMITER,\n isValidScopeName,\n isValidIdChunk,\n InvalidName,\n InvalidScopeName,\n InvalidScopeNameFromRemote,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;A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,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAf,GAAA,EAAAgB,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAhB,GAAA,CAAAgB,GAAA,SAAAL,MAAA,CAAAT,OAAA,GAAAF,GAAA,MAAAQ,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAArB,GAAA,EAAAW,MAAA,YAAAA,MAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAA0E;AAOxE,gBAPK,gBAAK,CAOL;AAIL,kGAX0B,0BAAiB,OAW1B;AAVnB,wDAA+B;AAO7B,iBAPK,iBAAM,CAOL;AANR,6CAAyF;AAYvF,4FAZO,wBAAW,OAYP;AACX,iGAboB,6BAAgB,OAapB;AAChB,2GAdsC,uCAA0B,OActC;AAb5B,sFAA2D;AASzD,2BATK,6BAAgB,CASL;AARlB,kFAAuD;AASrD,yBATK,2BAAc,CASL"}
@@ -0,0 +1,32 @@
1
+ {
2
+ "compilerOptions": {
3
+ "lib": [
4
+ "es2019",
5
+ "DOM",
6
+ "ES6",
7
+ "DOM.Iterable"
8
+ ],
9
+ "target": "es2015",
10
+ "module": "CommonJS",
11
+ "jsx": "react",
12
+ "allowJs": true,
13
+ "composite": true,
14
+ "declaration": true,
15
+ "sourceMap": true,
16
+ "skipLibCheck": true,
17
+ "experimentalDecorators": true,
18
+ "outDir": "dist",
19
+ "moduleResolution": "node",
20
+ "esModuleInterop": true,
21
+ "rootDir": ".",
22
+ "resolveJsonModule": true
23
+ },
24
+ "exclude": [
25
+ "dist",
26
+ "package.json"
27
+ ],
28
+ "include": [
29
+ "**/*",
30
+ "**/*.json"
31
+ ]
32
+ }
@@ -1,16 +1,14 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = isValidIdChunk;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
7
3
  const validationRegExp = /^[-_a-z0-9/]+$/;
8
4
  const validationRegExpDisallowSlash = /^[-_a-z0-9]+$/;
9
5
  function isValidIdChunk(val, allowSlash = true) {
10
- if (typeof val !== 'string') return false;
11
- if (val.includes('//')) return false;
12
- const regex = allowSlash ? validationRegExp : validationRegExpDisallowSlash;
13
- return regex.test(val);
6
+ if (typeof val !== 'string')
7
+ return false;
8
+ if (val.includes('//'))
9
+ return false;
10
+ const regex = allowSlash ? validationRegExp : validationRegExpDisallowSlash;
11
+ return regex.test(val);
14
12
  }
15
-
13
+ exports.default = isValidIdChunk;
16
14
  //# sourceMappingURL=is-valid-id-chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["validationRegExp","validationRegExpDisallowSlash","isValidIdChunk","val","allowSlash","includes","regex","test"],"sources":["is-valid-id-chunk.ts"],"sourcesContent":["const validationRegExp = /^[-_a-z0-9/]+$/;\nconst validationRegExpDisallowSlash = /^[-_a-z0-9]+$/;\n\nexport default function isValidIdChunk(val: any, allowSlash = true): boolean {\n if (typeof val !== 'string') return false;\n if (val.includes('//')) return false;\n const regex = allowSlash ? validationRegExp : validationRegExpDisallowSlash;\n return regex.test(val);\n}\n"],"mappings":";;;;;;AAAA,MAAMA,gBAAgB,GAAG,gBAAgB;AACzC,MAAMC,6BAA6B,GAAG,eAAe;AAEtC,SAASC,cAAcA,CAACC,GAAQ,EAAEC,UAAU,GAAG,IAAI,EAAW;EAC3E,IAAI,OAAOD,GAAG,KAAK,QAAQ,EAAE,OAAO,KAAK;EACzC,IAAIA,GAAG,CAACE,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK;EACpC,MAAMC,KAAK,GAAGF,UAAU,GAAGJ,gBAAgB,GAAGC,6BAA6B;EAC3E,OAAOK,KAAK,CAACC,IAAI,CAACJ,GAAG,CAAC;AACxB"}
1
+ {"version":3,"file":"is-valid-id-chunk.js","sourceRoot":"","sources":["../../utils/is-valid-id-chunk.ts"],"names":[],"mappings":";;AAAA,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAC1C,MAAM,6BAA6B,GAAG,eAAe,CAAC;AAEtD,SAAwB,cAAc,CAAC,GAAQ,EAAE,UAAU,GAAG,IAAI;IAChE,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC1C,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACrC,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,6BAA6B,CAAC;IAC5E,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AALD,iCAKC"}
@@ -1,36 +1,25 @@
1
1
  "use strict";
2
-
3
- function _chai() {
4
- const data = require("chai");
5
- _chai = function () {
6
- return data;
7
- };
8
- return data;
9
- }
10
- function _isValidIdChunk() {
11
- const data = _interopRequireDefault(require("./is-valid-id-chunk"));
12
- _isValidIdChunk = function () {
13
- return data;
14
- };
15
- return data;
16
- }
17
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const chai_1 = require("chai");
7
+ const is_valid_id_chunk_1 = __importDefault(require("./is-valid-id-chunk"));
18
8
  describe('isValidIdChunk', () => {
19
- it('should disallow non string inputs', () => {
20
- (0, _chai().expect)((0, _isValidIdChunk().default)(123)).to.be.false;
21
- (0, _chai().expect)((0, _isValidIdChunk().default)(123, true)).to.be.false;
22
- });
23
- it('should allow a string that consist of small letters', () => {
24
- (0, _chai().expect)((0, _isValidIdChunk().default)('abc')).to.be.true;
25
- (0, _chai().expect)((0, _isValidIdChunk().default)('abc', true)).to.be.true;
26
- });
27
- it('should disallow a string that has a capital letter', () => {
28
- (0, _chai().expect)((0, _isValidIdChunk().default)('Abc')).to.be.false;
29
- (0, _chai().expect)((0, _isValidIdChunk().default)('Abc', true)).to.be.false;
30
- });
31
- it('should disallow a string that has two slashes one after another', () => {
32
- (0, _chai().expect)((0, _isValidIdChunk().default)('abc//', true)).to.be.false;
33
- });
9
+ it('should disallow non string inputs', () => {
10
+ (0, chai_1.expect)((0, is_valid_id_chunk_1.default)(123)).to.be.false;
11
+ (0, chai_1.expect)((0, is_valid_id_chunk_1.default)(123, true)).to.be.false;
12
+ });
13
+ it('should allow a string that consist of small letters', () => {
14
+ (0, chai_1.expect)((0, is_valid_id_chunk_1.default)('abc')).to.be.true;
15
+ (0, chai_1.expect)((0, is_valid_id_chunk_1.default)('abc', true)).to.be.true;
16
+ });
17
+ it('should disallow a string that has a capital letter', () => {
18
+ (0, chai_1.expect)((0, is_valid_id_chunk_1.default)('Abc')).to.be.false;
19
+ (0, chai_1.expect)((0, is_valid_id_chunk_1.default)('Abc', true)).to.be.false;
20
+ });
21
+ it('should disallow a string that has two slashes one after another', () => {
22
+ (0, chai_1.expect)((0, is_valid_id_chunk_1.default)('abc//', true)).to.be.false;
23
+ });
34
24
  });
35
-
36
25
  //# sourceMappingURL=is-valid-id-chunk.spec.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_chai","data","require","_isValidIdChunk","_interopRequireDefault","obj","__esModule","default","describe","it","expect","isValidIdChunk","to","be","false","true"],"sources":["is-valid-id-chunk.spec.ts"],"sourcesContent":["import { expect } from 'chai';\n\nimport isValidIdChunk from './is-valid-id-chunk';\n\ndescribe('isValidIdChunk', () => {\n it('should disallow non string inputs', () => {\n expect(isValidIdChunk(123)).to.be.false;\n expect(isValidIdChunk(123, true)).to.be.false;\n });\n it('should allow a string that consist of small letters', () => {\n expect(isValidIdChunk('abc')).to.be.true;\n expect(isValidIdChunk('abc', true)).to.be.true;\n });\n it('should disallow a string that has a capital letter', () => {\n expect(isValidIdChunk('Abc')).to.be.false;\n expect(isValidIdChunk('Abc', true)).to.be.false;\n });\n it('should disallow a string that has two slashes one after another', () => {\n expect(isValidIdChunk('abc//', true)).to.be.false;\n });\n});\n"],"mappings":";;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,gBAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,eAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAiD,SAAAG,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEjDG,QAAQ,CAAC,gBAAgB,EAAE,MAAM;EAC/BC,EAAE,CAAC,mCAAmC,EAAE,MAAM;IAC5C,IAAAC,cAAM,EAAC,IAAAC,yBAAc,EAAC,GAAG,CAAC,CAAC,CAACC,EAAE,CAACC,EAAE,CAACC,KAAK;IACvC,IAAAJ,cAAM,EAAC,IAAAC,yBAAc,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAACC,EAAE,CAACC,EAAE,CAACC,KAAK;EAC/C,CAAC,CAAC;EACFL,EAAE,CAAC,qDAAqD,EAAE,MAAM;IAC9D,IAAAC,cAAM,EAAC,IAAAC,yBAAc,EAAC,KAAK,CAAC,CAAC,CAACC,EAAE,CAACC,EAAE,CAACE,IAAI;IACxC,IAAAL,cAAM,EAAC,IAAAC,yBAAc,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAACC,EAAE,CAACC,EAAE,CAACE,IAAI;EAChD,CAAC,CAAC;EACFN,EAAE,CAAC,oDAAoD,EAAE,MAAM;IAC7D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AAC,IAAA,2BAAc,EAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QAC1C,IAAA,aAAM,EAAC,IAAA,2BAAc,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;IAClD,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,iEAAiE,EAAE,GAAG,EAAE;QACzE,IAAA,aAAM,EAAC,IAAA,2BAAc,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,14 +1,11 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = isValidScopeName;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
7
3
  // the '.' can be in the middle, not at the beginning and not at the end and only once.
8
4
  const validationRegExp = /^[$\-_!a-z0-9]+[.]?[$\-_!a-z0-9]+$/;
9
5
  function isValidScopeName(val) {
10
- if (typeof val !== 'string') return false;
11
- return validationRegExp.test(val);
6
+ if (typeof val !== 'string')
7
+ return false;
8
+ return validationRegExp.test(val);
12
9
  }
13
-
10
+ exports.default = isValidScopeName;
14
11
  //# sourceMappingURL=is-valid-scope-name.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["validationRegExp","isValidScopeName","val","test"],"sources":["is-valid-scope-name.ts"],"sourcesContent":["// the '.' can be in the middle, not at the beginning and not at the end and only once.\nconst validationRegExp = /^[$\\-_!a-z0-9]+[.]?[$\\-_!a-z0-9]+$/;\n\nexport default function isValidScopeName(val: any): boolean {\n if (typeof val !== 'string') return false;\n return validationRegExp.test(val);\n}\n"],"mappings":";;;;;;AAAA;AACA,MAAMA,gBAAgB,GAAG,oCAAoC;AAE9C,SAASC,gBAAgBA,CAACC,GAAQ,EAAW;EAC1D,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE,OAAO,KAAK;EACzC,OAAOF,gBAAgB,CAACG,IAAI,CAACD,GAAG,CAAC;AACnC"}
1
+ {"version":3,"file":"is-valid-scope-name.js","sourceRoot":"","sources":["../../utils/is-valid-scope-name.ts"],"names":[],"mappings":";;AAAA,uFAAuF;AACvF,MAAM,gBAAgB,GAAG,oCAAoC,CAAC;AAE9D,SAAwB,gBAAgB,CAAC,GAAQ;IAC/C,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC1C,OAAO,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC;AAHD,mCAGC"}
package/index.ts ADDED
@@ -0,0 +1,18 @@
1
+ import BitId, { BitIdProps, VERSION_DELIMITER, BitIdStr } from './bit-id';
2
+ import BitIds from './bit-ids';
3
+ import { InvalidName, InvalidScopeName, InvalidScopeNameFromRemote } from './exceptions';
4
+ import isValidScopeName from './utils/is-valid-scope-name';
5
+ import isValidIdChunk from './utils/is-valid-id-chunk';
6
+
7
+ export {
8
+ BitId,
9
+ BitIds,
10
+ BitIdProps,
11
+ BitIdStr,
12
+ VERSION_DELIMITER,
13
+ isValidScopeName,
14
+ isValidIdChunk,
15
+ InvalidName,
16
+ InvalidScopeName,
17
+ InvalidScopeNameFromRemote,
18
+ };
package/package.json CHANGED
@@ -1,19 +1,17 @@
1
1
  {
2
2
  "name": "@teambit/legacy-bit-id",
3
- "version": "1.0.4",
3
+ "version": "1.1.1",
4
4
  "homepage": "https://bit.cloud/teambit/component/legacy-bit-id",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "legacy-bit-id",
9
- "version": "1.0.4"
9
+ "version": "1.1.1"
10
10
  },
11
11
  "dependencies": {
12
12
  "decamelize": "1.2.0",
13
13
  "lodash": "4.17.21",
14
14
  "semver": "7.5.2",
15
- "core-js": "^3.0.0",
16
- "@babel/runtime": "7.20.0",
17
15
  "@teambit/component-version": "1.0.3",
18
16
  "@teambit/bit-error": "0.0.404"
19
17
  },
@@ -23,17 +21,11 @@
23
21
  "@types/lodash": "4.14.165",
24
22
  "@types/semver": "7.3.4",
25
23
  "@types/mocha": "9.1.0",
24
+ "@types/jest": "26.0.20",
26
25
  "@types/node": "12.20.4",
27
- "@types/react": "^17.0.8",
28
- "@types/react-dom": "^17.0.5",
29
- "@types/jest": "^26.0.0",
30
- "@types/testing-library__jest-dom": "5.9.5"
31
- },
32
- "peerDependencies": {
33
- "@teambit/legacy": "1.0.584",
34
- "react": "^16.8.0 || ^17.0.0",
35
- "react-dom": "^16.8.0 || ^17.0.0"
26
+ "@babel/runtime": "7.20.0"
36
27
  },
28
+ "peerDependencies": {},
37
29
  "license": "Apache-2.0",
38
30
  "private": false,
39
31
  "engines": {
package/tsconfig.json CHANGED
@@ -4,8 +4,7 @@
4
4
  "es2019",
5
5
  "DOM",
6
6
  "ES6",
7
- "DOM.Iterable",
8
- "ScriptHost"
7
+ "DOM.Iterable"
9
8
  ],
10
9
  "target": "es2015",
11
10
  "module": "CommonJS",
@@ -20,14 +19,7 @@
20
19
  "moduleResolution": "node",
21
20
  "esModuleInterop": true,
22
21
  "rootDir": ".",
23
- "resolveJsonModule": true,
24
- "emitDeclarationOnly": true,
25
- "emitDecoratorMetadata": true,
26
- "allowSyntheticDefaultImports": true,
27
- "strictPropertyInitialization": false,
28
- "strict": true,
29
- "noImplicitAny": false,
30
- "preserveConstEnums": true
22
+ "resolveJsonModule": true
31
23
  },
32
24
  "exclude": [
33
25
  "dist",