Skip to content

Commit

Permalink
labels: add url-whatwg labels for WHATWG URL PRs (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
joyeecheung authored and phillipj committed Jan 12, 2017
1 parent 5688b42 commit 3f881a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/node-labels.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const subSystemLabelsMap = new Map([
[/^src\/timer_/, ['c++', 'timers']],
[/^src\/(?:CNNICHashWhitelist|node_root_certs|tls_)/, ['c++', 'tls']],
[/^src\/tty_/, ['c++', 'tty']],
[/^src\/node_url/, ['c++', 'url', 'dont-land-on-v4.x', 'dont-land-on-v6.x']],
[/^src\/node_url/, ['c++', 'url-whatwg',
'dont-land-on-v4.x', 'dont-land-on-v6.x']],
[/^src\/node_util/, ['c++', 'util']],
[/^src\/(?:node_v8|v8abbr)/, ['c++', 'V8']],
[/^src\/node_contextify/, ['c++', 'vm']],
Expand Down Expand Up @@ -62,7 +63,8 @@ const subSystemLabelsMap = new Map([
[/^lib\/\w+\/v8_prof_/, 'tools'],
[/^lib\/\w+\/socket_list/, 'net'],
[/^lib\/\w+\/streams$/, 'stream'],
[/^lib\/internal\/url\.js$/, ['url', 'dont-land-on-v4.x', 'dont-land-on-v6.x']],
[/^lib\/internal\/url\.js$/, ['url-whatwg',
'dont-land-on-v4.x', 'dont-land-on-v6.x']],
// All other lib/ files map directly
[/^lib\/_(\w+)_\w+\.js?$/, '$1'], // e.g. _(stream)_wrap
[/^lib(\/internal)?\/(\w+)\.js?$/, '$2'], // other .js files
Expand Down
4 changes: 2 additions & 2 deletions test/unit/node-labels.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const srcCases = [
'tls_wrap.cc',
'tls_wrap.h'] ],
[ 'tty', ['tty_wrap.cc', 'tty_wrap.h'] ],
[ ['url', 'dont-land-on-v4.x', 'dont-land-on-v6.x'],
[ ['url-whatwg', 'dont-land-on-v4.x', 'dont-land-on-v6.x'],
['node_url.cc', 'node_url.h'] ],
[ 'util', ['node_util.cc'] ],
[ 'V8', ['node_v8.cc', 'v8abbr.h'] ],
Expand Down Expand Up @@ -415,7 +415,7 @@ tap.test('label: dont-land-on labels for WHATWG URL', (t) => {
'lib/internal/url.js'
])

t.same(labels, ['url', 'dont-land-on-v4.x', 'dont-land-on-v6.x'])
t.same(labels, ['url-whatwg', 'dont-land-on-v4.x', 'dont-land-on-v6.x'])

t.end()
})

0 comments on commit 3f881a2

Please sign in to comment.