@cloudflare/util-routes 1.0.16 → 3.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,12 +3,24 @@
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.16](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-routes@1.0.14...@cloudflare/util-routes@1.0.16) (2019-10-14)
6
+ # [3.0.0](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-routes@1.0.14...@cloudflare/util-routes@3.0.0) (2019-10-28)
7
7
 
8
8
 
9
9
  ### Bug Fixes
10
10
 
11
11
  * **stratus:** UI-0000: update package conflicts ([2b7c2e0](http://stash.cfops.it:7999/fe/stratus/commits/2b7c2e0))
12
+ * **stratus:** UI-2859: bump all package versions ([4cb3c90](http://stash.cfops.it:7999/fe/stratus/commits/4cb3c90))
13
+ * **stratus:** UI-2859: bump all package versions ([6db21c2](http://stash.cfops.it:7999/fe/stratus/commits/6db21c2))
14
+
15
+
16
+ ### Features
17
+
18
+ * **types:** TSX-146 Add Reverse type helper, rename Append ([8a0157e](http://stash.cfops.it:7999/fe/stratus/commits/8a0157e))
19
+
20
+
21
+ ### BREAKING CHANGES
22
+
23
+ * **types:** Renamed Append to Prepend since that is what it's actually doing
12
24
 
13
25
 
14
26
 
package/dist/route.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import pathToRegExp from 'path-to-regexp';
2
- import { ValueOfArray, Tail, Append, Head } from '@cloudflare/types';
2
+ import { ValueOfArray, Tail, Prepend, Head } from '@cloudflare/types';
3
3
  export declare class RoutePatternResult<Param extends string> {
4
4
  readonly pattern: string;
5
5
  /**
@@ -16,7 +16,7 @@ export declare class RoutePatternResult<Param extends string> {
16
16
  export declare function route<Param extends string, ParamOrPatternResult extends Array<Param | RoutePatternResult<string>>>(strings: TemplateStringsArray, ...paramNames: ParamOrPatternResult): RoutePatternResultFromParams<ParamOrPatternResult>;
17
17
  declare type RoutePatternResultFromParams<Params extends Array<string | RoutePatternResult<string>>, Result extends string[] = []> = {
18
18
  returnResult: RoutePatternResult<ValueOfArray<Result>>;
19
- recurse: RoutePatternResultFromParams<Tail<Params>, Append<ExtractParam<Head<Params>>, Result>>;
19
+ recurse: RoutePatternResultFromParams<Tail<Params>, Prepend<ExtractParam<Head<Params>>, Result>>;
20
20
  }[Head<Params> extends never ? 'returnResult' : 'recurse'];
21
21
  declare type ExtractParam<T extends string | RoutePatternResult<string>> = T extends RoutePatternResult<infer S> ? S : T;
22
22
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudflare/util-routes",
3
3
  "description": "Wraps path-to-regexp with a convenient, type-safe tagged template function",
4
- "version": "1.0.16",
4
+ "version": "3.0.0",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -25,7 +25,7 @@
25
25
  "path-to-regexp": "^3.0.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@cloudflare/types": "^1.2.11"
28
+ "@cloudflare/types": "^2.0.0"
29
29
  },
30
- "gitHead": "cf001fbfae351055c1121ced40344f9a8fd5d1f2"
30
+ "gitHead": "60c10b687558d9d4d517bd677d661a748ce02c2f"
31
31
  }