chore: add cypress files to ignore list and use glob ignore option (#2700)

This commit is contained in:
Matthew Russell 2023-01-24 08:06:46 -08:00 committed by GitHub
parent f58144d785
commit c7aec5cfcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 14 deletions

View File

@ -3,7 +3,7 @@ import { requestGQL } from './request';
export async function getEthereumConfig() {
const query = gql`
{
query {
networkParameter(key: "blockchains.ethereumConfig") {
value
}

View File

@ -3,7 +3,7 @@ import { requestGQL } from './request';
export async function getMarkets() {
const query = gql`
{
query {
marketsConnection {
edges {
node {

View File

@ -3,7 +3,7 @@ import { requestGQL } from './request';
export async function getPartyStake(partyId: string) {
const query = gql`
{
query {
party(id:"${partyId}") {
stakingSummary {
currentStakeAvailable

View File

@ -3,7 +3,7 @@ import { requestGQL } from './request';
export async function getProposal(id: string) {
const query = gql`
{
query {
proposal(id: "${id}") {
id
state

View File

@ -3,7 +3,7 @@ import { requestGQL } from './request';
export async function getVegaAsset() {
const query = gql`
{
query {
assetsConnection {
edges {
node {

View File

@ -9,9 +9,13 @@ const ignore = [
'libs/fills/src/lib/fills-data-provider.ts',
'libs/orders/src/lib/components/order-data-provider/order-data-provider.ts',
'libs/trades/src/lib/trades-data-provider.ts',
// any queries in libs/cypress run against capsule
'libs/cypress/**/*.ts',
'libs/cypress/**/*.js',
];
const globPromise = util.promisify(glob);
const globOptions = { ignore };
const processTsFiles = (files) => {
for (const file of files) {
@ -44,15 +48,11 @@ ${textContent}
};
const run = async () => {
const files1 = await globPromise('apps/**/*.ts');
const files2 = await globPromise('libs/**/*.ts');
const files3 = await globPromise('apps/**/*.tsx');
const files4 = await globPromise('lib/**/*.tsx');
processTsFiles(
[...files1, ...files2, ...files3, ...files4].filter(
(f) => !ignore.includes(f)
)
);
const files1 = await globPromise('apps/**/*.ts', globOptions);
const files2 = await globPromise('libs/**/*.ts', globOptions);
const files3 = await globPromise('apps/**/*.tsx', globOptions);
const files4 = await globPromise('lib/**/*.tsx', globOptions);
processTsFiles([...files1, ...files2, ...files3, ...files4]);
const gqlFiles1 = await globPromise('lib/**/*.graphql');
const gqlFiles2 = await globPromise('apps/**/*.graphql');
processGraphQlFiles([...gqlFiles1, ...gqlFiles2]);