@ms-cloudpack/path-string-parsing 1.0.0 → 1.0.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.json CHANGED
@@ -2,7 +2,28 @@
2
2
  "name": "@ms-cloudpack/path-string-parsing",
3
3
  "entries": [
4
4
  {
5
- "date": "Sat, 15 Oct 2022 08:11:07 GMT",
5
+ "date": "Tue, 31 Jan 2023 08:08:54 GMT",
6
+ "tag": "@ms-cloudpack/path-string-parsing_v1.0.1",
7
+ "version": "1.0.1",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "elcraig@microsoft.com",
12
+ "package": "@ms-cloudpack/path-string-parsing",
13
+ "commit": "243bfddf2ccffa5d6aa479105156b8a5de0e66c2",
14
+ "comment": "Don't publish test files"
15
+ },
16
+ {
17
+ "author": "elcraig@microsoft.com",
18
+ "package": "@ms-cloudpack/path-string-parsing",
19
+ "commit": "aa26b86114817b738ea6062ef3b64234fc38c6ad",
20
+ "comment": "Add docs for slash function"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Sat, 15 Oct 2022 08:11:31 GMT",
6
27
  "tag": "@ms-cloudpack/path-string-parsing_v1.0.0",
7
28
  "version": "1.0.0",
8
29
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - @ms-cloudpack/path-string-parsing
2
2
 
3
- This log was last generated on Sat, 15 Oct 2022 08:11:07 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 31 Jan 2023 08:08:54 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.0.1
8
+
9
+ Tue, 31 Jan 2023 08:08:54 GMT
10
+
11
+ ### Patches
12
+
13
+ - Don't publish test files (elcraig@microsoft.com)
14
+ - Add docs for slash function (elcraig@microsoft.com)
15
+
7
16
  ## 1.0.0
8
17
 
9
- Sat, 15 Oct 2022 08:11:07 GMT
18
+ Sat, 15 Oct 2022 08:11:31 GMT
10
19
 
11
20
  ### Major changes
12
21
 
@@ -1,4 +1,4 @@
1
- export declare type ImportStringResult = {
1
+ export type ImportStringResult = {
2
2
  packageName: string | undefined;
3
3
  version: string | undefined;
4
4
  importPath: string | undefined;
package/lib/slash.d.ts CHANGED
@@ -1 +1,2 @@
1
+ /** Replace backslashes with forward slashes. */
1
2
  export declare function slash(str: string): string;
package/lib/slash.js CHANGED
@@ -1,3 +1,4 @@
1
+ /** Replace backslashes with forward slashes. */
1
2
  export function slash(str) {
2
3
  return str.replace(/\\/g, '/');
3
4
  }
package/lib/slash.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"slash.js","sourceRoot":"","sources":["../src/slash.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,KAAK,CAAC,GAAW;IAC/B,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACjC,CAAC"}
1
+ {"version":3,"file":"slash.js","sourceRoot":"","sources":["../src/slash.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,MAAM,UAAU,KAAK,CAAC,GAAW;IAC/B,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACjC,CAAC"}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.33.1"
8
+ "packageVersion": "7.34.0"
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.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Common string parsing of path utilities for the Cloudpack repo.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,6 +27,6 @@
27
27
  "@ms-cloudpack/eslint-config-base": "*"
28
28
  },
29
29
  "files": [
30
- "/lib"
30
+ "lib/**/!(*.test.*)"
31
31
  ]
32
32
  }
@@ -1 +0,0 @@
1
- export {};
@@ -1,43 +0,0 @@
1
- import { describe, it, expect } from '@jest/globals';
2
- import { parseImportString } from './parseImportString.js';
3
- describe(`parseImportString`, () => {
4
- it(`can parse a package import`, () => {
5
- expect(parseImportString('package')).toEqual({ packageName: 'package', version: '', importPath: '.' });
6
- });
7
- it(`can parse a package import with a scope`, () => {
8
- expect(parseImportString('@scope/package')).toEqual({
9
- packageName: '@scope/package',
10
- version: '',
11
- importPath: '.',
12
- });
13
- });
14
- it(`can parse a package import with a scope and path`, () => {
15
- expect(parseImportString('@scope/package/path/to/thing')).toEqual({
16
- packageName: '@scope/package',
17
- version: '',
18
- importPath: './path/to/thing',
19
- });
20
- });
21
- it(`can parse a package import with a scope, version, and path`, () => {
22
- expect(parseImportString('@scope/package@1234567890.1234567890.1234567890-abcdeABCDE/path/to/thing')).toEqual({
23
- packageName: '@scope/package',
24
- version: '1234567890.1234567890.1234567890-abcdeABCDE',
25
- importPath: './path/to/thing',
26
- });
27
- });
28
- it(`can handle package names with underscores`, () => {
29
- expect(parseImportString('package_name')).toEqual({
30
- packageName: 'package_name',
31
- version: '',
32
- importPath: '.',
33
- });
34
- });
35
- it(`can handle package names with dashes`, () => {
36
- expect(parseImportString('package-name')).toEqual({
37
- packageName: 'package-name',
38
- version: '',
39
- importPath: '.',
40
- });
41
- });
42
- });
43
- //# sourceMappingURL=parseImportString.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parseImportString.test.js","sourceRoot":"","sources":["../src/parseImportString.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACpC,MAAM,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CA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AAU,EAAE,GAAG;SAChB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,19 +0,0 @@
1
- import { describe, it, expect } from '@jest/globals';
2
- import { safeRelativePath } from './safeRelativePath.js';
3
- describe('safeRelativePath', () => {
4
- it('can handle default import paths', () => {
5
- expect(safeRelativePath(undefined)).toEqual('.');
6
- expect(safeRelativePath('')).toEqual('.');
7
- expect(safeRelativePath('.')).toEqual('.');
8
- });
9
- it('can handle an absolute path', () => {
10
- expect(safeRelativePath('/foo/bar')).toEqual('./foo/bar');
11
- });
12
- it('can handle a relative path', () => {
13
- expect(safeRelativePath('./foo/bar')).toEqual('./foo/bar');
14
- });
15
- it('can handle a relative path without a leading slash', () => {
16
- expect(safeRelativePath('foo/bar')).toEqual('./foo/bar');
17
- });
18
- });
19
- //# sourceMappingURL=safeRelativePath.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"safeRelativePath.test.js","sourceRoot":"","sources":["../src/safeRelativePath.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACzC,MAAM,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACjD,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC1C,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACrC,MAAM,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACpC,MAAM,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC5D,MAAM,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export {};
package/lib/slash.test.js DELETED
@@ -1,8 +0,0 @@
1
- import { describe, it, expect } from '@jest/globals';
2
- import { slash } from './slash.js';
3
- describe('slash', () => {
4
- it('can reverse slashes', () => {
5
- expect(slash('\\asdf\\asdf/asdf')).toEqual('/asdf/asdf/asdf');
6
- });
7
- });
8
- //# sourceMappingURL=slash.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slash.test.js","sourceRoot":"","sources":["../src/slash.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;IACrB,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE;QAC7B,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}