From 730bdde30436b429dfd10b07fc753a4722332a06 Mon Sep 17 00:00:00 2001 From: TranquilMarmot Date: Wed, 12 Aug 2020 23:56:49 -0700 Subject: [PATCH 1/4] Fix package.json scripts to be cross-platform --- package.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 8d83f3235..c857cf1e7 100644 --- a/package.json +++ b/package.json @@ -10,18 +10,18 @@ "dev": "cross-env NODE_ENV=dev webpack-dev-server --mode=development --content-base sandbox --config webpack.config.js --inline --hot --port 3002", "dist:rd3g": "rm -rf dist/ && webpack --config webpack.config.dist.js -p --display-modules --optimize-minimize", "dist:sandbox": "npm run generate:tooltips && webpack --config webpack.config.js -p", - "dist:transpile": "./node_modules/@babel/cli/bin/babel.js -d lib src", + "dist:transpile": "babel -d lib src", "dist": "npm run check && npm-run-all --parallel dist:*", - "docs:lint": "node_modules/documentation/bin/documentation.js lint src/**/*.js", - "docs:watch": "node_modules/documentation/bin/documentation.js --config documentation.yml build src/**/*.js -f html -o gen-docs --watch", - "docs": "npm run docs:lint && node_modules/documentation/bin/documentation.js --config documentation.yml build src/**/*.js -f html -o gen-docs && node_modules/documentation/bin/documentation.js build src/**/*.js -f md > gen-docs/DOCUMENTATION.md", - "functional:local": "export CYPRESS_SANDBOX_URL=http://localhost:3002 && cypress open", - "functional:remote": "export CYPRESS_SANDBOX_URL=https://danielcaldas.github.io/react-d3-graph/sandbox/index.html && cypress open", - "functional": "export CYPRESS_SANDBOX_URL=http://127.0.0.1:8888 && cypress run", - "generate:tooltips": "./node_modules/.bin/jsdoc -X ./src/components/graph/graph.config.js > ./tools/graph-config-jsdoc.json && cd tools && node tooltips-docs-generator.js > ../sandbox/graph-config-tooltips.js", - "lint:fix": "node_modules/eslint/bin/eslint.js --config=.eslintrc.js --fix \"src/**/*.js*\" \"sandbox/**/*.js*\"", - "lint:src": "node_modules/eslint/bin/eslint.js --config=.eslintrc.js \"src/**/*.js*\" \"sandbox/**/*.js*\"", - "lint:test": "node_modules/eslint/bin/eslint.js --config=.eslintrc.test.config.js \"test/**/*.spec.js\"", + "docs:lint": "documentation lint src/**/*.js", + "docs:watch": "documentation --config documentation.yml build src/**/*.js -f html -o gen-docs --watch", + "docs": "npm run docs:lint && documentation --config documentation.yml build src/**/*.js -f html -o gen-docs && documentation build src/**/*.js -f md > gen-docs/DOCUMENTATION.md", + "functional:local": "cross-env CYPRESS_SANDBOX_URL=http://localhost:3002 && cypress open", + "functional:remote": "cross-env CYPRESS_SANDBOX_URL=https://danielcaldas.github.io/react-d3-graph/sandbox/index.html && cypress open", + "functional": "cross-env CYPRESS_SANDBOX_URL=http://127.0.0.1:8888 && cypress run", + "generate:tooltips": "jsdoc -X ./src/components/graph/graph.config.js > ./tools/graph-config-jsdoc.json && cd tools && node tooltips-docs-generator.js > ../sandbox/graph-config-tooltips.js", + "lint:fix": "eslint --config=.eslintrc.js --fix \"src/**/*.js*\" \"sandbox/**/*.js*\"", + "lint:src": "eslint --config=.eslintrc.js \"src/**/*.js*\" \"sandbox/**/*.js*\"", + "lint:test": "eslint --config=.eslintrc.test.config.js \"test/**/*.spec.js\"", "lint": "npm run lint:src && npm run lint:test && npm run docs:lint", "start": "http-server ./sandbox/ -p 8888 -c-1", "test:clean": "jest --no-cache --updateSnapshot --verbose --coverage --config jest.config.js", From d299216ada367c637b13e5e912a3174d2e7d910f Mon Sep 17 00:00:00 2001 From: danielcaldas Date: Fri, 28 Aug 2020 20:21:35 +0800 Subject: [PATCH 2/4] Attempt to wrap sandbox URL with double quote --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c857cf1e7..fa08b9834 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,9 @@ "docs:lint": "documentation lint src/**/*.js", "docs:watch": "documentation --config documentation.yml build src/**/*.js -f html -o gen-docs --watch", "docs": "npm run docs:lint && documentation --config documentation.yml build src/**/*.js -f html -o gen-docs && documentation build src/**/*.js -f md > gen-docs/DOCUMENTATION.md", - "functional:local": "cross-env CYPRESS_SANDBOX_URL=http://localhost:3002 && cypress open", - "functional:remote": "cross-env CYPRESS_SANDBOX_URL=https://danielcaldas.github.io/react-d3-graph/sandbox/index.html && cypress open", - "functional": "cross-env CYPRESS_SANDBOX_URL=http://127.0.0.1:8888 && cypress run", + "functional:local": "cross-env CYPRESS_SANDBOX_URL=\"http://localhost:3002\" && cypress open", + "functional:remote": "cross-env CYPRESS_SANDBOX_URL=\"https://danielcaldas.github.io/react-d3-graph/sandbox/index.html\" && cypress open", + "functional": "cross-env CYPRESS_SANDBOX_URL=\"http://127.0.0.1:8888\" && cypress run", "generate:tooltips": "jsdoc -X ./src/components/graph/graph.config.js > ./tools/graph-config-jsdoc.json && cd tools && node tooltips-docs-generator.js > ../sandbox/graph-config-tooltips.js", "lint:fix": "eslint --config=.eslintrc.js --fix \"src/**/*.js*\" \"sandbox/**/*.js*\"", "lint:src": "eslint --config=.eslintrc.js \"src/**/*.js*\" \"sandbox/**/*.js*\"", From f51de6ae1b37c4253005d1f5615deddaaff9856f Mon Sep 17 00:00:00 2001 From: danielcaldas Date: Fri, 28 Aug 2020 21:30:54 +0800 Subject: [PATCH 3/4] Remove ampersand to attach env var to cypress process --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fa08b9834..bbb850edd 100644 --- a/package.json +++ b/package.json @@ -16,8 +16,8 @@ "docs:watch": "documentation --config documentation.yml build src/**/*.js -f html -o gen-docs --watch", "docs": "npm run docs:lint && documentation --config documentation.yml build src/**/*.js -f html -o gen-docs && documentation build src/**/*.js -f md > gen-docs/DOCUMENTATION.md", "functional:local": "cross-env CYPRESS_SANDBOX_URL=\"http://localhost:3002\" && cypress open", - "functional:remote": "cross-env CYPRESS_SANDBOX_URL=\"https://danielcaldas.github.io/react-d3-graph/sandbox/index.html\" && cypress open", - "functional": "cross-env CYPRESS_SANDBOX_URL=\"http://127.0.0.1:8888\" && cypress run", + "functional:remote": "cross-env CYPRESS_SANDBOX_URL=\"https://danielcaldas.github.io/react-d3-graph/sandbox/index.html\" cypress open", + "functional": "cross-env CYPRESS_SANDBOX_URL=\"http://127.0.0.1:8888\" cypress run", "generate:tooltips": "jsdoc -X ./src/components/graph/graph.config.js > ./tools/graph-config-jsdoc.json && cd tools && node tooltips-docs-generator.js > ../sandbox/graph-config-tooltips.js", "lint:fix": "eslint --config=.eslintrc.js --fix \"src/**/*.js*\" \"sandbox/**/*.js*\"", "lint:src": "eslint --config=.eslintrc.js \"src/**/*.js*\" \"sandbox/**/*.js*\"", From 34e6911f0934da72a0ac8b3ea9a27fef57697581 Mon Sep 17 00:00:00 2001 From: danielcaldas Date: Fri, 28 Aug 2020 21:43:16 +0800 Subject: [PATCH 4/4] Update RELEASE_PROCESS.md --- RELEASE_PROCESS.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md index c4072e45d..7392329f9 100644 --- a/RELEASE_PROCESS.md +++ b/RELEASE_PROCESS.md @@ -5,17 +5,18 @@ This is not yet a full automated process, so here are a few steps to get the thi ### Setup (serve a local version to run tests against it) 1. npm run dist:sandbox -2. npm run start +2. npm run start (server should keep running in the background as we're going to run + cypress against it) ### Release steps 1. Update versioning in package.json -1. npm run dist -1. npm run docs -1. Small tweaks on documentation page (quicklinks) -1. Replace current files in docs for the generated ones in gen-docs -1. Generate CHANGELOG.md (github_changelog_generator -u GITHUB_USERNAME) -1. git commit -m "Release x.x.x" -1. Create release x.x.x in github -1. git pull (origin master) -1. npm publish +2. npm run dist +3. npm run docs +4. Small tweaks on documentation page (quicklinks) +5. Replace current files in docs for the generated ones in gen-docs +6. Generate CHANGELOG.md (github_changelog_generator -u GITHUB_USERNAME) +7. git commit -m "Release x.x.x" +8. Create release x.x.x in github +9. git pull (origin master) +10. npm publish