Skip to content

Commit 68f283e

Browse files
committed
Add standalone changelog file
1 parent adca399 commit 68f283e

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

CHANGELOG.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Changelog
2+
3+
## Version 2.4.0:
4+
5+
- Added Typescript definitions. – Thanks to @danhab99 for creating
6+
- Added SECURITY.md policy and CodeQL scanning
7+
8+
## Version 2.3.0:
9+
10+
- Fixed bug where if the user-agent passed to `isAllowed()` / `isDisallowed()` is called "constructor" it would throw an error.
11+
- Added support for relative URLs. This does not affect the default behavior so can safely be upgraded.
12+
13+
Relative matching is only allowed if both the robots.txt URL and the URLs being checked are relative.
14+
15+
For example:
16+
17+
```js
18+
var robots = robotsParser('/robots.txt', [
19+
'User-agent: *',
20+
'Disallow: /dir/',
21+
'Disallow: /test.html',
22+
'Allow: /dir/test.html',
23+
'Allow: /test.html'
24+
].join('\n'));
25+
26+
robots.isAllowed('/test.html', 'Sams-Bot/1.0'); // false
27+
robots.isAllowed('/dir/test.html', 'Sams-Bot/1.0'); // true
28+
robots.isDisallowed('/dir/test2.html', 'Sams-Bot/1.0'); // true
29+
```
30+
31+
## Version 2.2.0:
32+
33+
- Fixed bug that with matching wildcard patterns with some URLs
34+
– Thanks to @ckylape for reporting and fixing
35+
- Changed matching algorithm to match Google's implementation in google/robotstxt
36+
- Changed order of precedence to match current spec
37+
38+
## Version 2.1.1:
39+
40+
- Fix bug that could be used to causing rule checking to take a long time
41+
– Thanks to @andeanfog
42+
43+
## Version 2.1.0:
44+
45+
- Removed use of punycode module API's as new URL API handles it
46+
- Improved test coverage
47+
- Added tests for percent encoded paths and improved support
48+
- Added `getMatchingLineNumber()` method
49+
- Fixed bug with comments on same line as directive
50+
51+
## Version 2.0.0:
52+
53+
This release is not 100% backwards compatible as it now uses the new URL APIs which are not supported in Node < 7.
54+
55+
- Update code to not use deprecated URL module API's.
56+
&ndash; Thanks to @kdzwinel
57+
58+
## Version 1.0.2:
59+
60+
- Fixed error caused by invalid URLs missing the protocol.
61+
62+
## Version 1.0.1:
63+
64+
- Fixed bug with the "user-agent" rule being treated as case sensitive.
65+
&ndash; Thanks to @brendonboshell
66+
- Improved test coverage.
67+
&ndash; Thanks to @schornio
68+
69+
## Version 1.0.0:
70+
71+
- Initial release.

0 commit comments

Comments
 (0)