Skip to content

Commit 1fafec6

Browse files
chore(release): 6.0.0 (#117)
1 parent 7fe0357 commit 1fafec6

File tree

7 files changed

+5567
-6211
lines changed

7 files changed

+5567
-6211
lines changed

.travis.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,21 @@ cache:
1717

1818
matrix:
1919
include:
20-
- node_js: '10'
20+
- node_js: '11'
2121
script: npm run pretest
2222
env: CI=pretest
23-
- node_js: '10'
23+
- node_js: '6'
2424
script: npm run test-only
25-
env: CI=tests 8
25+
env: CI=tests 6
2626
- node_js: '8'
2727
script: npm run test-only
2828
env: CI=tests 8
29-
- node_js: '6'
29+
- node_js: '10'
3030
script: npm run test-only
31-
env: CI=tests 6
32-
- node_js: '4'
31+
env: CI=tests 10
32+
- node_js: '11'
3333
script: npm run test-only
34-
env: CI=tests 4
35-
sudo: required
34+
env: CI=tests 11
3635

3736
before_install:
38-
- npm install -g npm@5
37+
- npm install -g npm@latest

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44

55
This project adheres to [Semantic Versioning](http://semver.org).
66

7+
## 6.0.0 - 2019-01-09
8+
9+
- Chore: minimum required `node-fs` version is now `^7.0.1`.
10+
11+
### BREAKING CHANGE
12+
13+
- Chore: minimum required `nodejs` version is now `>= 6.9.0`.
14+
715
## 5.0.7 - 2018-05-22
816

917
- Chore: minimum required `cosmiconfig` version is now `^5.0.0`.

__tests__/.eslintrc.json

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`standalone config option 1`] = `
4+
"User-agent: *
5+
Allow: /
6+
Host: some-some-domain.com
7+
"
8+
`;
9+
10+
exports[`standalone should \`contain the \`Host\` 1`] = `
11+
"User-agent: *
12+
Allow: /
13+
Host: domain.com
14+
"
15+
`;
16+
17+
exports[`standalone should \`contain two \`Sitemap\` directives 1`] = `
18+
"User-agent: *
19+
Allow: /
20+
Sitemap: http://foobar.com/sitemap.xml
21+
Sitemap: http://foobar.com/sitemap1.xml
22+
"
23+
`;
24+
25+
exports[`standalone should \`contain two \`policy\` item with the \`Allow\` and the \`Disallow\` directives 1`] = `
26+
"User-agent: Google
27+
Allow: /
28+
Disallow: /search-foo
29+
30+
User-agent: Yandex
31+
Allow: /
32+
Disallow: /search-bar
33+
"
34+
`;
35+
36+
exports[`standalone should \`contain two policy item, first have multiple \`User-agent\` option 1`] = `
37+
"User-agent: Google
38+
User-agent: AnotherBot
39+
Allow: /
40+
Disallow: /search-foo
41+
42+
User-agent: Yandex
43+
Allow: /
44+
Disallow: /search-bar
45+
"
46+
`;
47+
48+
exports[`standalone should contain multiple \`User-agent\` and \`Crawl-delay\` 1`] = `
49+
"User-agent: Google
50+
Allow: /
51+
Crawl-delay: 10
52+
53+
User-agent: Yandex
54+
Allow: /
55+
Crawl-delay: 0.5
56+
"
57+
`;
58+
59+
exports[`standalone should contain one \`policy\` item with the \`Allow\` directive 1`] = `
60+
"User-agent: Google
61+
Allow: /
62+
"
63+
`;
64+
65+
exports[`standalone should contain one \`policy\` items with the \`Allow\` directive 1`] = `
66+
"User-agent: Google
67+
Allow: /
68+
Allow: /foobar
69+
"
70+
`;
71+
72+
exports[`standalone should contain one \`policy\` items with the \`Disallow\` directive 1`] = `
73+
"User-agent: Google
74+
Disallow: /
75+
Disallow: /foobar
76+
"
77+
`;
78+
79+
exports[`standalone should contain one policy item with one \`Clean-param\` option 1`] = `
80+
"User-agent: Yandex
81+
Allow: /
82+
Clean-param: s /forum/showthread.php
83+
"
84+
`;
85+
86+
exports[`standalone should contain one policy item with two \`Clean-params\` options 1`] = `
87+
"User-agent: Yandex
88+
Allow: /
89+
Clean-param: s /forum/showthread.php
90+
Clean-param: ref /forum/showthread.php
91+
"
92+
`;
93+
94+
exports[`standalone should contain one policy item without empty \`Clean-param\` option 1`] = `
95+
"User-agent: Yandex
96+
Allow: /
97+
"
98+
`;
99+
100+
exports[`standalone should contain the \`Host\` if \`host\` options without protocol scheme 1`] = `
101+
"User-agent: *
102+
Allow: /
103+
Host: www.domain.com
104+
"
105+
`;
106+
107+
exports[`standalone should contain the \`Host\` in punycode format 1`] = `
108+
"User-agent: *
109+
Allow: /
110+
Host: xn----8sbalhasbh9ahbi6a2ae.xn--p1ai
111+
"
112+
`;
113+
114+
exports[`standalone should contain the \`Host\` with \`https\` scheme 1`] = `
115+
"User-agent: *
116+
Allow: /
117+
Host: https://domain.com
118+
"
119+
`;
120+
121+
exports[`standalone should contain the \`Host\` without \`80\` port 1`] = `
122+
"User-agent: *
123+
Allow: /
124+
Host: domain.com
125+
"
126+
`;
127+
128+
exports[`standalone should contain the \`Host\` without a trailing slash 1`] = `
129+
"User-agent: *
130+
Allow: /
131+
Host: domain.com
132+
"
133+
`;
134+
135+
exports[`standalone should contain the \`Host\` without any extra URL entire 1`] = `
136+
"User-agent: *
137+
Allow: /
138+
Host: www.domain.com:8080
139+
"
140+
`;
141+
142+
exports[`standalone should contain the \`Sitemap\` directive 1`] = `
143+
"User-agent: *
144+
Allow: /
145+
Sitemap: http://foobar.com/sitemap.xml
146+
"
147+
`;
148+
149+
exports[`standalone should contain two \`policy\` item with the \`Allow\` directive 1`] = `
150+
"User-agent: Google
151+
Allow: /
152+
153+
User-agent: Yandex
154+
Allow: /
155+
"
156+
`;
157+
158+
exports[`standalone should contain two \`policy\` items with empty \`Disallow\` directive 1`] = `
159+
"User-agent: *
160+
Disallow:
161+
162+
User-agent: Foo
163+
Disallow:
164+
"
165+
`;
166+
167+
exports[`standalone should generated default output without options 1`] = `
168+
"User-agent: *
169+
Allow: /
170+
"
171+
`;
172+
173+
exports[`standalone should load a config file 1`] = `
174+
"User-agent: *
175+
Allow: /
176+
Host: some-some-domain.com
177+
"
178+
`;
179+
180+
exports[`standalone should throw error if item in the \`sitemap\` option not a string or an array 1`] = `"Item in \`sitemap\` option should be a string"`;
181+
182+
exports[`standalone should throw error if item in the \`sitemap\` option not an absolute URL 1`] = `"Item in \`sitemap\` option should be an absolute URL"`;
183+
184+
exports[`standalone should throw error if the \`Host\` option is array 1`] = `"Options \`host\` must be only one string"`;
185+
186+
exports[`standalone should throw error if the \`cleanParam\` option more than 500 characters 1`] = `"Option \`cleanParam\` should have no more than 500 characters"`;
187+
188+
exports[`standalone should throw error if the \`cleanParam\` option not string or array 1`] = `"Option \`cleanParam\` should be a string or an array"`;
189+
190+
exports[`standalone should throw error if the \`host\` option being IP address version 4 1`] = `"Options \`host\` should be not an IP address"`;
191+
192+
exports[`standalone should throw error if the \`host\` option being IP address version 6 1`] = `"Options \`host\` should be not an IP address"`;
193+
194+
exports[`standalone should throw error if the \`policy\` option have array the \`userAgent\` option 1`] = `"Each \`policy\` should have a single string \`userAgent\` option"`;
195+
196+
exports[`standalone should throw error if the \`policy\` option is null 1`] = `"Options \`policy\` should be define"`;
197+
198+
exports[`standalone should throw error if the \`policy\` option is string 1`] = `"Options \`policy\` must be array"`;
199+
200+
exports[`standalone should throw error if the \`policy\` option not have the \`userAgent\` option 1`] = `"Each \`policy\` should have a single string \`userAgent\` option"`;
201+
202+
exports[`standalone should throw error if the \`sitemap\` option is not absolute URL 1`] = `"Option \`sitemap\` should be an absolute URL"`;
203+
204+
exports[`standalone should throw error if the \`sitemap\` option is not string or array 1`] = `"Option \`sitemap\` should be a string or an array"`;
205+
206+
exports[`standalone should throw error if the item in \`cleanParam\` option more than 500 characters 1`] = `"String in \`cleanParam\` option should have no more than 500 characters"`;
207+
208+
exports[`standalone should throw error if the item in \`cleanParam\` option not string 1`] = `"String in \`cleanParam\` option should be a string"`;
209+
210+
exports[`standalone should throw error on invalid \`crawlDelay\` option 1`] = `"Option \`crawlDelay\` must be an integer or a float"`;
211+
212+
exports[`standalone should throw error on invalid \`host\` option 1`] = `"Option \`host\` does not contain correct host"`;
213+
214+
exports[`standalone should use encode url in the \`allow\` and the \`disallow\` options 1`] = `
215+
"User-agent: Google
216+
Allow: /%D0%BA%D0%BE%D1%80%D0%B7%D0%B8%D0%BD%D0%B0
217+
Disallow: /%D0%BB%D0%B8%D1%87%D0%BD%D1%8B%D0%B9-%D0%BA%D0%B0%D0%B1%D0%B8%D0%BD%D0%B5%D1%82
218+
"
219+
`;

0 commit comments

Comments
 (0)