Skip to content

Commit f4083fa

Browse files
authored
improvement(test-util): use more sensitive language for less privileged (#1615)
groups blm
1 parent 192556c commit f4083fa

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"vuepress-theme-vue": "^1.0.3",
8989
"vuex": "^3.0.1",
9090
"webpack": "^3.0.1",
91-
"webpack-node-externals": "^1.6.0"
91+
"webpack-node-externals": "^2.5.0"
9292
},
9393
"devDependencies": {
9494
"@commitlint/cli": "^8.2.0",

Diff for: packages/create-instance/patch-create-element.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
CREATE_ELEMENT_ALIAS
1212
} from 'shared/consts'
1313

14-
const isWhitelisted = (el, whitelist) => resolveComponent(el, whitelist)
14+
const isAllowlisted = (el, allowlist) => resolveComponent(el, allowlist)
1515
const isAlreadyStubbed = (el, stubs) => stubs.has(el)
1616

1717
function shouldExtend(component, _Vue) {
@@ -36,10 +36,10 @@ function createStubIfNeeded(shouldStub, component, _Vue, el) {
3636
}
3737
}
3838

39-
function shouldNotBeStubbed(el, whitelist, modifiedComponents) {
39+
function shouldNotBeStubbed(el, allowlist, modifiedComponents) {
4040
return (
4141
(typeof el === 'string' && isReservedTag(el)) ||
42-
isWhitelisted(el, whitelist) ||
42+
isAllowlisted(el, allowlist) ||
4343
isAlreadyStubbed(el, modifiedComponents)
4444
)
4545
}

Diff for: test/setup/webpack.test.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ const rules = [].concat(
1919
}
2020
)
2121
const externals = nodeExternals({
22-
// we need to whitelist both `create-instance` and files in `shared` package. Otherwise webpack won't bundle them in the test dev env
23-
whitelist: [
22+
// we need to allowlist both `create-instance` and files in `shared` package. Otherwise webpack won't bundle them in the test dev env
23+
allowlist: [
2424
'@vue/test-utils',
2525
'@vue/server-test-utils',
2626
'create-instance',

Diff for: test/specs/mounting-options/stubs.spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ describeWithShallowAndMount('options.stub', mountingMethod => {
133133
expect(wrapper.html()).to.contain('</div>')
134134
})
135135

136-
it('stubs components with dummy when passed as an array', () => {
136+
it('stubs components with place holder when passed as an array', () => {
137137
const ComponentWithGlobalComponent = {
138138
render: h => h('div', [h('registered-component')])
139139
}
@@ -230,7 +230,7 @@ describeWithShallowAndMount('options.stub', mountingMethod => {
230230
expect(wrapper.html()).to.contain('<child-component-stub>')
231231
})
232232

233-
it('stubs components with dummy which has name when passed a boolean', () => {
233+
it('stubs components with place holder which has name when passed a boolean', () => {
234234
const ComponentWithGlobalComponent = {
235235
render: h => h('div', [h('registered-component')])
236236
}
@@ -243,7 +243,7 @@ describeWithShallowAndMount('options.stub', mountingMethod => {
243243
expect(wrapper.html()).to.contain('<registered-component-stub>')
244244
})
245245

246-
it('stubs components with dummy when passed as an array', () => {
246+
it('stubs components with place holder when passed as an array', () => {
247247
const ComponentWithGlobalComponent = {
248248
render: h => h('registered-component')
249249
}

Diff for: yarn.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -13180,9 +13180,9 @@ webpack-merge@^4.1.2:
1318013180
dependencies:
1318113181
lodash "^4.17.5"
1318213182

13183-
webpack-node-externals@^1.6.0:
13184-
version "1.6.0"
13185-
resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-1.6.0.tgz#232c62ec6092b100635a3d29d83c1747128df9bd"
13183+
webpack-node-externals@^2.5.0:
13184+
version "2.5.0"
13185+
resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-2.5.0.tgz#8d50f3289c71bc2b921a8da228e0b652acc503f1"
1318613186

1318713187
webpack-serve@^1.0.2:
1318813188
version "1.0.4"

0 commit comments

Comments
 (0)