@ms-cloudpack/path-string-parsing 1.1.1 → 1.1.2

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.
@@ -14,7 +14,7 @@ import { safeRelativePath } from './safeRelativePath.js';
14
14
  export function parseImportString(importString = '') {
15
15
  const matches = importString.match(
16
16
  // 1: packageName 2: version 3: importPath
17
- /^\/?((?:@[-\w.]+\/)?[-\w.]+)(?:@([-\w.]+))?(?:\/([-\w./]+))?/) || [];
17
+ /^\/?((?:@[-\w.:]+\/)?[-\w.:]+)(?:@([-\w.]+))?(?:\/([-\w./]+))?/) || [];
18
18
  return {
19
19
  packageName: matches[1] || '.',
20
20
  version: matches[2] || '',
@@ -1 +1 @@
1
- {"version":3,"file":"parseImportString.js","sourceRoot":"","sources":["../src/parseImportString.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAazD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAAC,YAAY,GAAG,EAAE;IACjD,MAAM,OAAO,GACX,YAAY,CAAC,KAAK;IAChB,0DAA0D;IAC1D,8DAA8D,CAC/D,IAAI,EAAE,CAAC;IAEV,OAAO;QACL,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,GAAG;QAC9B,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE;QACzB,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;KACzC,CAAC;AACJ,CAAC","sourcesContent":["import { safeRelativePath } from './safeRelativePath.js';\n\nexport type ImportStringResult = {\n packageName: string;\n /** Optional package version (default: empty string) */\n version: string;\n /**\n * Optional import path (default: `'.'`).\n * If this is set to a non-default value, it will be normalized to start with `./`.\n */\n importPath: string;\n};\n\n/**\n * Parse an import path: usually this will be a standard JS import, but this function also allows\n * an optional `@version` suffix after the package name.\n *\n * Examples of supported import strings:\n * - `foo`\n * - `foo@1.2.3`\n * - `foo@1.2.3/path/to/file`\n * - `@foo/bar`\n * - `@foo/bar@1.2.3`\n * - `@foo/bar@1.2.3/path/to/file`\n */\nexport function parseImportString(importString = ''): ImportStringResult {\n const matches =\n importString.match(\n // 1: packageName 2: version 3: importPath\n /^\\/?((?:@[-\\w.]+\\/)?[-\\w.]+)(?:@([-\\w.]+))?(?:\\/([-\\w./]+))?/,\n ) || [];\n\n return {\n packageName: matches[1] || '.',\n version: matches[2] || '',\n importPath: safeRelativePath(matches[3]),\n };\n}\n"]}
1
+ {"version":3,"file":"parseImportString.js","sourceRoot":"","sources":["../src/parseImportString.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAazD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAAC,YAAY,GAAG,EAAE;IACjD,MAAM,OAAO,GACX,YAAY,CAAC,KAAK;IAChB,0DAA0D;IAC1D,gEAAgE,CACjE,IAAI,EAAE,CAAC;IAEV,OAAO;QACL,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,GAAG;QAC9B,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE;QACzB,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;KACzC,CAAC;AACJ,CAAC","sourcesContent":["import { safeRelativePath } from './safeRelativePath.js';\n\nexport type ImportStringResult = {\n packageName: string;\n /** Optional package version (default: empty string) */\n version: string;\n /**\n * Optional import path (default: `'.'`).\n * If this is set to a non-default value, it will be normalized to start with `./`.\n */\n importPath: string;\n};\n\n/**\n * Parse an import path: usually this will be a standard JS import, but this function also allows\n * an optional `@version` suffix after the package name.\n *\n * Examples of supported import strings:\n * - `foo`\n * - `foo@1.2.3`\n * - `foo@1.2.3/path/to/file`\n * - `@foo/bar`\n * - `@foo/bar@1.2.3`\n * - `@foo/bar@1.2.3/path/to/file`\n */\nexport function parseImportString(importString = ''): ImportStringResult {\n const matches =\n importString.match(\n // 1: packageName 2: version 3: importPath\n /^\\/?((?:@[-\\w.:]+\\/)?[-\\w.:]+)(?:@([-\\w.]+))?(?:\\/([-\\w./]+))?/,\n ) || [];\n\n return {\n packageName: matches[1] || '.',\n version: matches[2] || '',\n importPath: safeRelativePath(matches[3]),\n };\n}\n"]}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.36.4"
8
+ "packageVersion": "7.38.3"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/path-string-parsing",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Common path-related string parsing utilities for Cloudpack",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -28,5 +28,10 @@
28
28
  },
29
29
  "files": [
30
30
  "lib/**/!(*.test.*)"
31
- ]
31
+ ],
32
+ "beachball": {
33
+ "disallowedChangeTypes": [
34
+ "prerelease"
35
+ ]
36
+ }
32
37
  }