Skip to content

Commit 4f33bc4

Browse files
committed
Standardize TypeScript package configuration
1 parent 4124c3c commit 4f33bc4

13 files changed

+13242
-6065
lines changed

.gitignore

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
node_modules
2-
.nyc_output
3-
coverage
4-
components
5-
dist
6-
dist.es2015
7-
typings
1+
.vscode/
2+
node_modules/
3+
coverage/
4+
dist/
5+
dist.es2015/

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ sudo: false
22
language: node_js
33

44
node_js:
5-
- "6"
5+
- "8"
66
- "stable"
77

88
after_script: "npm install coveralls@3 && npm run coverage | coveralls"

History.md

+104-137
Original file line numberDiff line numberDiff line change
@@ -1,202 +1,169 @@
1-
3.0.0 / 2019-01-13
2-
==================
1+
# 3.0.0 / 2019-01-13
32

4-
* Always use prefix character as delimiter token, allowing any character to be a delimiter (e.g. `/:att1-:att2-:att3-:att4-:att5`)
5-
* Remove `partial` support, prefer escaping the prefix delimiter explicitly (e.g. `\\/(apple-)?icon-:res(\\d+).png`)
3+
- Always use prefix character as delimiter token, allowing any character to be a delimiter (e.g. `/:att1-:att2-:att3-:att4-:att5`)
4+
- Remove `partial` support, prefer escaping the prefix delimiter explicitly (e.g. `\\/(apple-)?icon-:res(\\d+).png`)
65

7-
2.4.0 / 2018-08-26
8-
==================
6+
# 2.4.0 / 2018-08-26
97

10-
* Support `start` option to disable anchoring from beginning of the string
8+
- Support `start` option to disable anchoring from beginning of the string
119

12-
2.3.0 / 2018-08-20
13-
==================
10+
# 2.3.0 / 2018-08-20
1411

15-
* Use `delimiter` when processing repeated matching groups (e.g. `foo/bar` has no prefix, but has a delimiter)
12+
- Use `delimiter` when processing repeated matching groups (e.g. `foo/bar` has no prefix, but has a delimiter)
1613

17-
2.2.1 / 2018-04-24
18-
==================
14+
# 2.2.1 / 2018-04-24
1915

20-
* Allow empty string with `end: false` to match both relative and absolute paths
16+
- Allow empty string with `end: false` to match both relative and absolute paths
2117

22-
2.2.0 / 2018-03-06
23-
==================
18+
# 2.2.0 / 2018-03-06
2419

25-
* Pass `token` as second argument to `encode` option (e.g. `encode(value, token)`)
20+
- Pass `token` as second argument to `encode` option (e.g. `encode(value, token)`)
2621

27-
2.1.0 / 2017-10-20
28-
==================
22+
# 2.1.0 / 2017-10-20
2923

30-
* Handle non-ending paths where the final character is a delimiter
31-
* E.g. `/foo/` before required either `/foo/` or `/foo//` to match in non-ending mode
24+
- Handle non-ending paths where the final character is a delimiter
25+
- E.g. `/foo/` before required either `/foo/` or `/foo//` to match in non-ending mode
3226

33-
2.0.0 / 2017-08-23
34-
==================
27+
# 2.0.0 / 2017-08-23
3528

36-
* New option! Ability to set `endsWith` to match paths like `/test?query=string` up to the query string
37-
* New option! Set `delimiters` for specific characters to be treated as parameter prefixes (e.g. `/:test`)
38-
* Remove `isarray` dependency
39-
* Explicitly handle trailing delimiters instead of trimming them (e.g. `/test/` is now treated as `/test/` instead of `/test` when matching)
40-
* Remove overloaded `keys` argument that accepted `options`
41-
* Remove `keys` list attached to the `RegExp` output
42-
* Remove asterisk functionality (it's a real pain to properly encode)
43-
* Change `tokensToFunction` (e.g. `compile`) to accept an `encode` function for pretty encoding (e.g. pass your own implementation)
29+
- New option! Ability to set `endsWith` to match paths like `/test?query=string` up to the query string
30+
- New option! Set `delimiters` for specific characters to be treated as parameter prefixes (e.g. `/:test`)
31+
- Remove `isarray` dependency
32+
- Explicitly handle trailing delimiters instead of trimming them (e.g. `/test/` is now treated as `/test/` instead of `/test` when matching)
33+
- Remove overloaded `keys` argument that accepted `options`
34+
- Remove `keys` list attached to the `RegExp` output
35+
- Remove asterisk functionality (it's a real pain to properly encode)
36+
- Change `tokensToFunction` (e.g. `compile`) to accept an `encode` function for pretty encoding (e.g. pass your own implementation)
4437

45-
1.7.0 / 2016-11-08
46-
==================
38+
# 1.7.0 / 2016-11-08
4739

48-
* Allow a `delimiter` option to be passed in with `tokensToRegExp` which will be used for "non-ending" token match situations
40+
- Allow a `delimiter` option to be passed in with `tokensToRegExp` which will be used for "non-ending" token match situations
4941

50-
1.6.0 / 2016-10-03
51-
==================
42+
# 1.6.0 / 2016-10-03
5243

53-
* Populate `RegExp.keys` when using the `tokensToRegExp` method (making it consistent with the main export)
54-
* Allow a `delimiter` option to be passed in with `parse`
55-
* Updated TypeScript definition with `Keys` and `Options` updated
44+
- Populate `RegExp.keys` when using the `tokensToRegExp` method (making it consistent with the main export)
45+
- Allow a `delimiter` option to be passed in with `parse`
46+
- Updated TypeScript definition with `Keys` and `Options` updated
5647

57-
1.5.3 / 2016-06-15
58-
==================
48+
# 1.5.3 / 2016-06-15
5949

60-
* Add `\\` to the ignore character group to avoid backtracking on mismatched parens
50+
- Add `\\` to the ignore character group to avoid backtracking on mismatched parens
6151

62-
1.5.2 / 2016-06-15
63-
==================
52+
# 1.5.2 / 2016-06-15
6453

65-
* Escape `\\` in string segments of regexp
54+
- Escape `\\` in string segments of regexp
6655

67-
1.5.1 / 2016-06-08
68-
==================
56+
# 1.5.1 / 2016-06-08
6957

70-
* Add `index.d.ts` to NPM package
58+
- Add `index.d.ts` to NPM package
7159

72-
1.5.0 / 2016-05-20
73-
==================
60+
# 1.5.0 / 2016-05-20
7461

75-
* Handle partial token segments (better)
76-
* Allow compile to handle asterisk token segments
62+
- Handle partial token segments (better)
63+
- Allow compile to handle asterisk token segments
7764

78-
1.4.0 / 2016-05-18
79-
==================
65+
# 1.4.0 / 2016-05-18
8066

81-
* Handle RegExp unions in path matching groups
67+
- Handle RegExp unions in path matching groups
8268

83-
1.3.0 / 2016-05-08
84-
==================
69+
# 1.3.0 / 2016-05-08
8570

86-
* Clarify README language and named parameter token support
87-
* Support advanced Closure Compiler with type annotations
88-
* Add pretty paths options to compiled function output
89-
* Add TypeScript definition to project
90-
* Improved prefix handling with non-complete segment parameters (E.g. `/:foo?-bar`)
71+
- Clarify README language and named parameter token support
72+
- Support advanced Closure Compiler with type annotations
73+
- Add pretty paths options to compiled function output
74+
- Add TypeScript definition to project
75+
- Improved prefix handling with non-complete segment parameters (E.g. `/:foo?-bar`)
9176

92-
1.2.1 / 2015-08-17
93-
==================
77+
# 1.2.1 / 2015-08-17
9478

95-
* Encode values before validation with path compilation function
96-
* More examples of using compilation in README
79+
- Encode values before validation with path compilation function
80+
- More examples of using compilation in README
9781

98-
1.2.0 / 2015-05-20
99-
==================
82+
# 1.2.0 / 2015-05-20
10083

101-
* Add support for matching an asterisk (`*`) as an unnamed match everything group (`(.*)`)
84+
- Add support for matching an asterisk (`*`) as an unnamed match everything group (`(.*)`)
10285

103-
1.1.1 / 2015-05-11
104-
==================
86+
# 1.1.1 / 2015-05-11
10587

106-
* Expose methods for working with path tokens
88+
- Expose methods for working with path tokens
10789

108-
1.1.0 / 2015-05-09
109-
==================
90+
# 1.1.0 / 2015-05-09
11091

111-
* Expose the parser implementation to consumers
112-
* Implement a compiler function to generate valid strings
113-
* Huge refactor of tests to be more DRY and cover new parse and compile functions
114-
* Use chai in tests
115-
* Add .editorconfig
92+
- Expose the parser implementation to consumers
93+
- Implement a compiler function to generate valid strings
94+
- Huge refactor of tests to be more DRY and cover new parse and compile functions
95+
- Use chai in tests
96+
- Add .editorconfig
11697

117-
1.0.3 / 2015-01-17
118-
==================
98+
# 1.0.3 / 2015-01-17
11999

120-
* Optimised function runtime
121-
* Added `files` to `package.json`
100+
- Optimised function runtime
101+
- Added `files` to `package.json`
122102

123-
1.0.2 / 2014-12-17
124-
==================
103+
# 1.0.2 / 2014-12-17
125104

126-
* Use `Array.isArray` shim
127-
* Remove ES5 incompatible code
128-
* Fixed repository path
129-
* Added new readme badges
105+
- Use `Array.isArray` shim
106+
- Remove ES5 incompatible code
107+
- Fixed repository path
108+
- Added new readme badges
130109

131-
1.0.1 / 2014-08-27
132-
==================
110+
# 1.0.1 / 2014-08-27
133111

134-
* Ensure installation works correctly on 0.8
112+
- Ensure installation works correctly on 0.8
135113

136-
1.0.0 / 2014-08-17
137-
==================
114+
# 1.0.0 / 2014-08-17
138115

139-
* No more API changes
116+
- No more API changes
140117

141-
0.2.5 / 2014-08-07
142-
==================
118+
# 0.2.5 / 2014-08-07
143119

144-
* Allow keys parameter to be omitted
120+
- Allow keys parameter to be omitted
145121

146-
0.2.4 / 2014-08-02
147-
==================
122+
# 0.2.4 / 2014-08-02
148123

149-
* Code coverage badge
150-
* Updated readme
151-
* Attach keys to the generated regexp
124+
- Code coverage badge
125+
- Updated readme
126+
- Attach keys to the generated regexp
152127

153-
0.2.3 / 2014-07-09
154-
==================
128+
# 0.2.3 / 2014-07-09
155129

156-
* Add MIT license
130+
- Add MIT license
157131

158-
0.2.2 / 2014-07-06
159-
==================
132+
# 0.2.2 / 2014-07-06
160133

161-
* A passed in trailing slash in non-strict mode will become optional
162-
* In non-end mode, the optional trailing slash will only match at the end
134+
- A passed in trailing slash in non-strict mode will become optional
135+
- In non-end mode, the optional trailing slash will only match at the end
163136

164-
0.2.1 / 2014-06-11
165-
==================
137+
# 0.2.1 / 2014-06-11
166138

167-
* Fixed a major capturing group regexp regression
139+
- Fixed a major capturing group regexp regression
168140

169-
0.2.0 / 2014-06-09
170-
==================
141+
# 0.2.0 / 2014-06-09
171142

172-
* Improved support for arrays
173-
* Improved support for regexps
174-
* Better support for non-ending strict mode matches with a trailing slash
175-
* Travis CI support
176-
* Block using regexp special characters in the path
177-
* Removed support for the asterisk to match all
178-
* New support for parameter suffixes - `*`, `+` and `?`
179-
* Updated readme
180-
* Provide delimiter information with keys array
143+
- Improved support for arrays
144+
- Improved support for regexps
145+
- Better support for non-ending strict mode matches with a trailing slash
146+
- Travis CI support
147+
- Block using regexp special characters in the path
148+
- Removed support for the asterisk to match all
149+
- New support for parameter suffixes - `*`, `+` and `?`
150+
- Updated readme
151+
- Provide delimiter information with keys array
181152

182-
0.1.2 / 2014-03-10
183-
==================
153+
# 0.1.2 / 2014-03-10
184154

185-
* Move testing dependencies to `devDependencies`
155+
- Move testing dependencies to `devDependencies`
186156

187-
0.1.1 / 2014-03-10
188-
==================
157+
# 0.1.1 / 2014-03-10
189158

190-
* Match entire substring with `options.end`
191-
* Properly handle ending and non-ending matches
159+
- Match entire substring with `options.end`
160+
- Properly handle ending and non-ending matches
192161

193-
0.1.0 / 2014-03-06
194-
==================
162+
# 0.1.0 / 2014-03-06
195163

196-
* Add `options.end`
164+
- Add `options.end`
197165

198-
0.0.2 / 2013-02-10
199-
==================
166+
# 0.0.2 / 2013-02-10
200167

201-
* Update to match current express
202-
* Add .license property to component.json
168+
- Update to match current express
169+
- Add .license property to component.json

0 commit comments

Comments
 (0)