From 9b63c3c92a6b9bd71347b409577879debe53b3b8 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Sat, 16 Oct 2021 12:07:32 +0530 Subject: [PATCH] feat: add cross env to support cross-platform env support Signed-off-by: Pranav C --- packages/nocodb/package-lock.json | 11 ++++++++++- packages/nocodb/package.json | 21 +++++++++++---------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/packages/nocodb/package-lock.json b/packages/nocodb/package-lock.json index 3662e7430d..0f4a1d8fd9 100644 --- a/packages/nocodb/package-lock.json +++ b/packages/nocodb/package-lock.json @@ -1,6 +1,6 @@ { "name": "nocodb", - "version": "0.11.43", + "version": "0.11.46", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -5658,6 +5658,15 @@ "integrity": "sha512-uAVe/bgNHlPdP1VE4Sk08u9pAJ7o1x/tVQtX77T5zlhYhuwOWtVkPBEtHdvF5cq48VzeCG5i1zN4dQc8pwLYrw==", "dev": true }, + "cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.1" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", diff --git a/packages/nocodb/package.json b/packages/nocodb/package.json index 1f226a8183..b832358bd5 100644 --- a/packages/nocodb/package.json +++ b/packages/nocodb/package.json @@ -16,12 +16,12 @@ "fix": "run-s fix:*", "fix:prettier": "prettier \"src/**/*.ts\" --write", "lint": "eslint src --ext .ts", - "test": "TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register src/__tests__/**/*.test.ts --recursive", - "local:test:graphql": "DATABASE_URL=mysql://root:password@localhost:3306/sakila TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register src/__tests__/graphql.test.ts --recursive --timeout 10000 --exit", - "test:graphql": "TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register src/__tests__/graphql.test.ts --recursive --timeout 10000 --exit", - "test:grpc": "TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register src/__tests__/grpc.test.ts --recursive --timeout 10000 --exit", - "local:test:rest": "DATABASE_URL=mysql://root:password@localhost:3306/sakila TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register src/__tests__/rest.test.ts --recursive --timeout 10000 --exit", - "test:rest": "TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register src/__tests__/rest.test.ts --recursive --timeout 10000 --exit", + "test": "cross-env TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register src/__tests__/**/*.test.ts --recursive", + "local:test:graphql": "cross-env DATABASE_URL=mysql://root:password@localhost:3306/sakila TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register src/__tests__/graphql.test.ts --recursive --timeout 10000 --exit", + "test:graphql": "cross-env TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register src/__tests__/graphql.test.ts --recursive --timeout 10000 --exit", + "test:grpc": "cross-env TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register src/__tests__/grpc.test.ts --recursive --timeout 10000 --exit", + "local:test:rest": "cross-env DATABASE_URL=mysql://root:password@localhost:3306/sakila TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register src/__tests__/rest.test.ts --recursive --timeout 10000 --exit", + "test:rest": "cross-env TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register src/__tests__/rest.test.ts --recursive --timeout 10000 --exit", "test1": "run-s build test:*", "test:lint": "tslint --project . && prettier \"src/**/*.ts\" --list-different", "test:unit": "nyc --silent ava", @@ -44,8 +44,8 @@ "start-api": "ts-node src/example/index.ts", "start-xc-tool-api": "ts-node src/example/xc-tool-apis.ts", "docker-test": "node docker/index.js", - "test:dev:travis": "NODE_ENV=dev npm run test:rest && NODE_ENV=dev npm run test:graphql && NODE_ENV=dev npm run test:grpc", - "test:travis": "NODE_ENV=test npm run test:rest && NODE_ENV=test npm run test:graphql && NODE_ENV=test npm run test:grpc", + "test:dev:travis": "cross-env NODE_ENV=dev npm run test:rest && NODE_ENV=dev npm run test:graphql && NODE_ENV=dev npm run test:grpc", + "test:travis": "cross-env NODE_ENV=test npm run test:rest && NODE_ENV=test npm run test:graphql && NODE_ENV=test npm run test:grpc", "local": "node --expose-gc --max-old-space-size=1024 docker/index.js", "local-reset": "rm noco.db && npm run local", "debug-local-build": "NODE_ENV=dev node docker/main.js", @@ -67,7 +67,7 @@ "help:c": "ts-node ./help/a", "watch:build": "nodemon -e ts,js -w ./src -x npm run build", "watch:serve": "nodemon -e ts -w ./build -x npm run debug-local ", - "watch:run": "nodemon -e ts,js -w ./src -x \"ts-node src/example/docker --log-error --project tsconfig.json\"", + "watch:run": "cross-env EE=true nodemon -e ts,js -w ./src -x \"ts-node src/example/docker --log-error --project tsconfig.json\"", "run": "ts-node src/example/docker", "watch:try": "nodemon -e ts,js -w ./src -x \"ts-node src/example/try --log-error --project tsconfig.json\"", "example:docker": "ts-node ./src/example/docker.ts" @@ -194,13 +194,14 @@ "chai": "^4.2.0", "codecov": "^3.5.0", "copyfiles": "^2.3.0", + "cross-env": "^7.0.3", "cz-conventional-changelog": "^2.1.0", "eslint": "^7.8.0", "eslint-config-prettier": "^6.15.0", - "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-functional": "^3.0.2", "eslint-plugin-import": "^2.22.0", + "eslint-plugin-prettier": "^4.0.0", "gh-pages": "^2.0.1", "mocha": "^8.1.1", "nodemon": "^2.0.7",