Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to latest version of globby for discovering test files to run. #2527

Merged
merged 1 commit into from
Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/plenty-wasps-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@keystonejs/api-tests': patch
'@keystonejs/build-field-types': patch
'@keystonejs/keystone': patch
---

Updated to latest vesrsion of globby for discovering test files to run.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Updated to latest vesrsion of globby for discovering test files to run.
Updated to latest version of globby for discovering test files to run.

10 changes: 4 additions & 6 deletions api-tests/fields.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const fs = require('fs');
const globby = require('globby');
const path = require('path');
const cuid = require('cuid');
const { multiAdapterRunners, setupServer } = require('@keystonejs/test-utils');
Expand All @@ -8,11 +8,9 @@ const { multiAdapterRunners, setupServer } = require('@keystonejs/test-utils');
jest.setTimeout(60000);

describe('Test CRUD for all fields', () => {
const typesLoc = path.resolve('packages/fields/src/types');
const testModules = fs
.readdirSync(typesLoc)
.map(name => `${typesLoc}/${name}/filterTests.js`)
.filter(filename => fs.existsSync(filename));
const testModules = globby.sync(`packages/fields/src/types/**/filterTests.js`, {
absolute: true,
});
testModules.push(path.resolve('packages/fields/tests/idFilterTests.js'));

multiAdapterRunners().map(({ runner, adapterName }) =>
Expand Down
1 change: 1 addition & 0 deletions api-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"body-parser": "^1.18.2",
"cookie-signature": "^1.1.0",
"cuid": "^2.1.6",
"globby": "^11.0.0",
"supertest-light": "^1.0.2",
"testcheck": "^1.0.0-rc.2"
},
Expand Down
11 changes: 4 additions & 7 deletions api-tests/required.test.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
const fs = require('fs');
const path = require('path');
const cuid = require('cuid');
const globby = require('globby');
const { multiAdapterRunners, setupServer, graphqlRequest } = require('@keystonejs/test-utils');
const { Text } = require('@keystonejs/fields');

describe('Test isRequired flag for all field types', () => {
const typesLoc = path.resolve('packages/fields/src/types');
const testModules = fs
.readdirSync(typesLoc)
.map(name => `${typesLoc}/${name}/filterTests.js`)
.filter(filename => fs.existsSync(filename));
const testModules = globby.sync(`packages/fields/src/types/**/filterTests.js`, {
absolute: true,
});
multiAdapterRunners().map(({ runner, adapterName }) =>
describe(`Adapter: ${adapterName}`, () => {
testModules.map(require).forEach(mod => {
Expand Down
2 changes: 1 addition & 1 deletion packages/build-field-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"chalk": "^2.4.2",
"dataloader": "^1.4.0",
"fs-extra": "^7.0.0",
"globby": "^9.1.0",
"globby": "^11.0.0",
"inquirer": "^6.2.0",
"jest-worker": "^25.1.0",
"lodash.isempty": "^4.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/keystone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"falsey": "^1.0.0",
"fast-memoize": "^2.4.0",
"fs-extra": "^7.0.0",
"globby": "^9.1.0",
"globby": "^11.0.0",
"graphql": "^14.6.0",
"graphql-tag": "^2.10.1",
"graphql-type-json": "^0.3.1",
Expand Down
56 changes: 53 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2532,11 +2532,24 @@
"@nodelib/fs.stat" "2.0.2"
run-parallel "^1.1.9"

"@nodelib/fs.scandir@2.1.3":
version "2.1.3"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b"
integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==
dependencies:
"@nodelib/fs.stat" "2.0.3"
run-parallel "^1.1.9"

"@nodelib/fs.stat@2.0.2", "@nodelib/fs.stat@^2.0.1":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.2.tgz#2762aea8fe78ea256860182dcb52d61ee4b8fda6"
integrity sha512-z8+wGWV2dgUhLqrtRYa03yDx4HWMvXKi1z8g3m2JyxAx8F7xk74asqPk5LAETjqDSGLFML/6CDl0+yFunSYicw==

"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3"
integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==

"@nodelib/fs.stat@^1.1.2":
version "1.1.3"
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
Expand All @@ -2550,6 +2563,14 @@
"@nodelib/fs.scandir" "2.1.2"
fastq "^1.6.0"

"@nodelib/fs.walk@^1.2.3":
version "1.2.4"
resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976"
integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==
dependencies:
"@nodelib/fs.scandir" "2.1.3"
fastq "^1.6.0"

"@nuxt/babel-preset-app@2.11.0":
version "2.11.0"
resolved "https://registry.yarnpkg.com/@nuxt/babel-preset-app/-/babel-preset-app-2.11.0.tgz#e89fdb7ef5c08dce13532ccf63a7064399f67ab0"
Expand Down Expand Up @@ -9636,6 +9657,18 @@ fast-glob@^3.0.3:
merge2 "^1.2.3"
micromatch "^4.0.2"

fast-glob@^3.1.1:
version "3.2.2"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.2.tgz#ade1a9d91148965d4bf7c51f72e1ca662d32e63d"
integrity sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A==
dependencies:
"@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3"
glob-parent "^5.1.0"
merge2 "^1.3.0"
micromatch "^4.0.2"
picomatch "^2.2.1"

fast-json-parse@^1.0.2, fast-json-parse@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/fast-json-parse/-/fast-json-parse-1.0.3.tgz#43e5c61ee4efa9265633046b770fb682a7577c4d"
Expand Down Expand Up @@ -11033,7 +11066,7 @@ glob-parent@^3.1.0:
is-glob "^3.1.0"
path-dirname "^1.0.0"

glob-parent@^5.0.0, glob-parent@~5.1.0:
glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2"
integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==
Expand Down Expand Up @@ -11147,6 +11180,18 @@ globby@^10.0.1:
merge2 "^1.2.3"
slash "^3.0.0"

globby@^11.0.0:
version "11.0.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.0.tgz#56fd0e9f0d4f8fb0c456f1ab0dee96e1380bc154"
integrity sha512-iuehFnR3xu5wBBtm4xi0dMe92Ob87ufyu/dHwpDYfbcpYpIbrO5OnS8M1vWvrBhSGEJ3/Ecj7gnX76P8YxpPEg==
dependencies:
array-union "^2.1.0"
dir-glob "^3.0.1"
fast-glob "^3.1.1"
ignore "^5.1.4"
merge2 "^1.3.0"
slash "^3.0.0"

globby@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
Expand Down Expand Up @@ -11183,7 +11228,7 @@ globby@^8.0.1:
pify "^3.0.0"
slash "^1.0.0"

globby@^9.1.0, globby@^9.2.0:
globby@^9.2.0:
version "9.2.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-9.2.0.tgz#fd029a706c703d29bdd170f4b6db3a3f7a7cb63d"
integrity sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==
Expand Down Expand Up @@ -15215,6 +15260,11 @@ merge2@^1.2.3:
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5"
integrity sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==

merge2@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81"
integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==

methods@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
Expand Down Expand Up @@ -17683,7 +17733,7 @@ picomatch@^2.0.4, picomatch@^2.0.5:
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.0.7.tgz#514169d8c7cd0bdbeecc8a2609e34a7163de69f6"
integrity sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==

picomatch@^2.0.7:
picomatch@^2.0.7, picomatch@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.1.tgz#21bac888b6ed8601f831ce7816e335bc779f0a4a"
integrity sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==
Expand Down