diff --git a/.docker.r2g/README.md b/.docker.r2g/README.md deleted file mode 100755 index 2706f472..00000000 --- a/.docker.r2g/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - -### Welcome to using docker.r2g! - -You have probably already run `docker.r2g --init`. - -
-To then run this tool, use: - -```bash - -docker.r2g --exec - -``` diff --git a/.docker.r2g/config.js b/.docker.r2g/config.js deleted file mode 100755 index 2b5d9184..00000000 --- a/.docker.r2g/config.js +++ /dev/null @@ -1,23 +0,0 @@ -const path = require('path'); - -if (!path.isAbsolute(process.env.MY_DOCKER_R2G_SEARCH_ROOT || '')) { - throw new Error('Please set the env var "MY_DOCKER_R2G_SEARCH_ROOT" to an absolute path.'); -} - -exports.default = { - - searchRoot: path.resolve(process.env.MY_DOCKER_R2G_SEARCH_ROOT), - - // the following packages will be installed in the Docker container using this pattern: - // npm install /r2g_shared_dir/Users/you/ - - tests: '', - - packages: { - - 'residence': true, - 'vamoot': true - - } - -}; diff --git a/.gitignore b/.gitignore index 3e33169e..0a655724 100755 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,8 @@ test/.suman/.meta *.tgz ### files +path +assert yarn.lock *.DS_Store diff --git a/npm-link-up.json b/.nlu.json old mode 100755 new mode 100644 similarity index 90% rename from npm-link-up.json rename to .nlu.json index 972fdee8..0d4dff0e --- a/npm-link-up.json +++ b/.nlu.json @@ -1,5 +1,8 @@ { + "npm-link-up": true, "linkToItself": true, + "alwaysReinstall": false, + "alwaysRelink": false, "searchRoots": [ "$HOME/WebstormProjects/oresoftware" ], @@ -7,7 +10,6 @@ "/node_modules/", "/.git/" ], - "comments": [ "put any comment you want here" ], @@ -22,7 +24,6 @@ "poolio", "freeze-existing-props", "json-stdio", - "suman-r", "suman-types", "suman-browser", diff --git a/.r2g/config.js b/.r2g/config.js new file mode 100755 index 00000000..39ab8f98 --- /dev/null +++ b/.r2g/config.js @@ -0,0 +1,45 @@ +'use strict'; + +const path = require('path'); + +if (!path.isAbsolute(process.env.MY_DOCKER_R2G_SEARCH_ROOT || '')) { + throw new Error('Please set the env var "MY_DOCKER_R2G_SEARCH_ROOT" to an absolute path.'); +} + +exports.default = { + + searchRoot: path.resolve(process.env.MY_DOCKER_R2G_SEARCH_ROOT), + + // the following packages will be installed in the Docker container using this pattern: + // npm install /r2g_shared_dir/Users/you/ + + tests: '', + + packages: { + 'residence': true, + 'vamoot': true, + 'proxy-mcproxy': true, + 'prepend-transform': true, + 'log-prepend': true, + 'pragmatik': true, + 'frankenstop': true, + 'poolio': true, + 'freeze-existing-props': true, + 'json-stdio': true, + 'suman-r': true, + 'suman-types': true, + 'suman-browser': true, + 'suman-watch': true, + 'suman-shell': true, + 'suman-utils': true, + 'suman-events': true, + 'suman-daemon': true, + 'suman-browser-polyfills': true, + 'suman-watch-plugins': true, + 'suman-run-plugins': true, + 'suman-transform-plugins': true, + 'suman-reporters': true, + 'suman-interactive': true + } + +}; diff --git a/.docker.r2g/exec.sh b/.r2g/exec.sh similarity index 64% rename from .docker.r2g/exec.sh rename to .r2g/exec.sh index 591afeb4..3d486877 100755 --- a/.docker.r2g/exec.sh +++ b/.r2g/exec.sh @@ -20,10 +20,21 @@ docker rm "$container" || echo "no container with name $container could be remov tag="docker_r2g_image/$name"; -docker build -f Dockerfile.r2g -t "$tag" --build-arg CACHEBUST="$(date +%s)" . +docker build \ + -f Dockerfile.r2g \ + -t "$tag" \ + --build-arg CACHEBUST="$(date +%s)" . + +#docker run \ +# -v "$search_root:$shared:ro" \ +# -e docker_r2g_fs_map="$map" \ +# --name "$container" "$tag" + docker run \ -v "$search_root:$shared:ro" \ -e docker_r2g_fs_map="$map" \ - -e MY_DOCKER_R2G_SEARCH_ROOT="/dev/null" \ - --name "$container" "$tag" + -e r2g_container_id="$container" \ + --entrypoint "dkr2g" \ + --name "$container" "$tag" \ + run --allow-unknown $@ diff --git a/.r2g/fixtures/readme.md b/.r2g/fixtures/readme.md new file mode 100644 index 00000000..e69de29b diff --git a/.docker.r2g/smoke-test.js b/.r2g/tests/smoke-test.js similarity index 88% rename from .docker.r2g/smoke-test.js rename to .r2g/tests/smoke-test.js index f967d737..2d6a5b4e 100644 --- a/.docker.r2g/smoke-test.js +++ b/.r2g/tests/smoke-test.js @@ -1,3 +1,4 @@ +#!/usr/bin/env node const suman = require('suman'); const Test = suman.init(module); diff --git a/Dockerfile.r2g b/Dockerfile.r2g index 39af4fdc..f7789d14 100644 --- a/Dockerfile.r2g +++ b/Dockerfile.r2g @@ -1,13 +1,12 @@ FROM node:10 -RUN apt-get -y update -RUN apt-get -y install sudo -RUN sudo apt-get -y update -RUN apt-get install -y netcat -RUN apt-get install -y rsync +ENV ores_bash_utils https://raw.githubusercontent.com/oresoftware/npm.bash.utils +RUN curl -sS -o- $ores_bash_utils/master/assets/install-basics.sh | bash ENV FORCE_COLOR=1 ENV docker_r2g_in_container=yes +ENV MY_DOCKER_R2G_SEARCH_ROOT="/home/node" + RUN sudo echo "node ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers USER node @@ -15,15 +14,19 @@ RUN mkdir -p /home/node/app/node_modules RUN mkdir -p /home/node/.docker_r2g_cache ENV USER="node" ENV HOME="/home/node" +ENV MY_DOCKER_R2G_SEARCH_ROOT "$HOME" WORKDIR /home/node/app RUN sudo chmod -R 777 /home/node -RUN sudo chown -R $(whoami) $(npm config get prefix)/lib -RUN sudo chown -R $(whoami) $(npm config get prefix)/lib/node_modules -RUN sudo chown -R $(whoami) $(npm config get prefix)/bin -RUN sudo chown -R $(whoami) $(npm config get prefix)/share -RUN sudo chown -R $(whoami) /usr/local/lib -RUN sudo chown -R $(whoami) /usr/local/etc + +RUN curl -sS -o- $ores_bash_utils/master/assets/run-non-root-chown.sh | bash +RUN curl -sS -o- $ores_bash_utils/master/assets/run-npm-config-settings.sh | bash + +#COPY package.json . +#COPY .r2g .r2g +#RUN npm install --loglevel=warn -g \ +# "https://raw.githubusercontent.com/oresoftware/tarballs/master/tgz/oresoftware/npm.cache.tgz?$(date +%s)" +#RUN update_npm_cache ARG CACHEBUST=1 diff --git a/browser/package.json b/browser/package.json deleted file mode 100755 index 4fbdb729..00000000 --- a/browser/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "suman-browser", - "version": "0.0.101", - "description": "A Webpack build of the Suman module, for use with RequireJS, SystemJS and Browserify", - "main": "suman.js", - "scripts": { - "test": "suman" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/sumanjs/suman-browser.git" - }, - "keywords": [ - "sumanjs", - "browser", - "testing", - "unit", - "testing", - "tdd" - ], - "author": "Olegzandr VD", - "license": "MIT", - "bugs": { - "url": "https://github.com/sumanjs/suman-browser/issues" - }, - "homepage": "https://github.com/sumanjs/suman-browser#readme" -} diff --git a/cli/suman.sh b/cli/suman.sh index 758aa3af..9e7e4089 100755 --- a/cli/suman.sh +++ b/cli/suman.sh @@ -2,7 +2,7 @@ #set -e; -if ! [[ -z "${LOCAL_SUMAN_ALREADY_FOUND+x}" ]]; then +if [[ -n "${LOCAL_SUMAN_ALREADY_FOUND+x}" ]]; then echo " => \$LOCAL_SUMAN_ALREADY_FOUND ? => $LOCAL_SUMAN_ALREADY_FOUND" fi @@ -31,35 +31,58 @@ fi echo " [suman] Original path of Suman executable => \"$0\"" -DIRN="$(dirname "$0")" -RL="$(readlink "$0")"; -EXECDIR="$(dirname $(dirname "$RL"))"; -MYPATH="$DIRN/$EXECDIR"; -X="$(cd $(dirname ${MYPATH}) && pwd)/$(basename ${MYPATH})" -NEW_NODE_PATH="${NODE_PATH}":"$HOME/.suman/global/node_modules" -NEW_PATH="${PATH}":"$HOME/.suman/global/node_modules/.bin" +dir_name="$(dirname "$0")" +read_link="$(readlink "$0")"; +exec_dir="$(dirname $(dirname "$read_link"))"; +my_path="$dir_name/$exec_dir"; +suman_root="$(cd $(dirname ${my_path}) && pwd)/$(basename ${my_path})" +new_node_path="${NODE_PATH}":"$HOME/.suman/global/node_modules" +new_path="${PATH}":"$HOME/.suman/global/node_modules/.bin" if [[ "${LOCAL_SUMAN_ALREADY_FOUND}" == "yes" ]]; then # we know that this directory contains the local version of suman we want to use echo " [suman] local suman version already found."; - NODE_PATH="${NEW_NODE_PATH}" PATH="${NEW_PATH}" SUMAN_EXTRANEOUS_EXECUTABLE="yes" \ - node "${X}/dist/cli.js" "$@" + NODE_PATH="${new_node_path}" PATH="${new_path}" SUMAN_EXTRANEOUS_EXECUTABLE="yes" \ + node "${suman_root}/dist/cli.js" "$@" else + # we are probably in the global install space, so let's find the local installation given pwd/cwd - LOCAL_SUMAN="$(node ${X}/scripts/find-local-suman-executable.js)" - if [[ -z "$LOCAL_SUMAN" ]]; then + project_root="$(node ${suman_root}/scripts/find-project-root.js)" + + if [[ -z "$project_root" ]]; then + echo >&2 " [suman] Could not find your project root given your current working directory:"; + echo >&2 " [suman] Your pwd: '$PWD'"; + exit 1; + fi + + local_suman="$(node ${suman_root}/scripts/find-local-suman-executable.js)" + + if [[ -z "$local_suman" ]]; then + + # symlink the global suman installation to the local project + + if true; then + echo "major foo."; + echo "Symlinking global suman installation to local project."; + mkdir -p "${project_root}/node_modules/suman" + rm -rf "${project_root}/node_modules/suman"; + ln -sf "$suman_root" "$project_root/node_modules/suman" + fi + # no local version found, so we fallback on the version in this directory, global or not + echo " [suman] => No local Suman executable could be found, given the current directory => $PWD" - echo " [suman] => Attempting to run installed version of Suman here => '${X}/dist/cli.js'" + echo " [suman] => Attempting to run installed version of Suman here => '${suman_root}/dist/cli.js'" + GLOBAL_MODULES="${suman_global_npm_modules_path:-"$(npm root -g)"}" - NODE_PATH="${NEW_NODE_PATH}":"${GLOBAL_MODULES}" PATH="${NEW_PATH}" SUMAN_EXTRANEOUS_EXECUTABLE="yes" \ - node "${X}/dist/cli.js" "$@" + NODE_PATH="${new_node_path}":"${GLOBAL_MODULES}" PATH="${new_path}" SUMAN_EXTRANEOUS_EXECUTABLE="yes" \ + node "${suman_root}/dist/cli.js" "$@" else # local version found, so we run it - NODE_PATH="${NEW_NODE_PATH}" PATH="${NEW_PATH}" SUMAN_EXTRANEOUS_EXECUTABLE="yes" \ - node "${LOCAL_SUMAN}" "$@" + NODE_PATH="${new_node_path}" PATH="${new_path}" SUMAN_EXTRANEOUS_EXECUTABLE="yes" \ + node "${local_suman}" "$@" fi fi diff --git a/dev-scripts/git/tools/checkout-new-branch-from-integration.sh b/dev-scripts/git/tools/checkout-new-branch-from-integration.sh new file mode 100755 index 00000000..d0db3955 --- /dev/null +++ b/dev-scripts/git/tools/checkout-new-branch-from-integration.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +set -e; + +branch_type="${1:-feature}"; +arr=( 'feature' 'bugfix' 'release' ); + +contains() { + + local seeking="$1" + shift 1; + local arr=( "$@" ) + + for v in "${arr[@]}"; do + if [ "$v" == "$seeking" ]; then + return 0; + fi + done + return 1; +} + +if ! contains "$branch_type" "${arr[@]}"; then + echo "Branch type needs to be either 'feature', 'bugfix' or 'release'." + echo "The branch type you passed was: $branch_type" + exit 1; +fi + + +git fetch origin dev; + +time_seconds=`node -e 'console.log(String(Date.now()).slice(0,-3))'`; + +echo "You are checking out a new $branch_type branch from the dev branch" +new_branch="${USER}/${branch_type}/${time_seconds}" + +echo "New branch name: $new_branch"; + +git checkout -b "${new_branch}" "origin/dev" +git push -u origin HEAD # makes sure git is tracking this branch on the primary remote diff --git a/dev-scripts/git/tools/determine-if-branch-is-already-merged-with-origin-dev.sh b/dev-scripts/git/tools/determine-if-branch-is-already-merged-with-origin-dev.sh new file mode 100755 index 00000000..9aebc487 --- /dev/null +++ b/dev-scripts/git/tools/determine-if-branch-is-already-merged-with-origin-dev.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + + +green='\033[1;32m' +red='\e[31m' +no_color='\033[0m' + + +branch="${1:-HEAD}" + +branch_name=`git rev-parse --abbrev-ref "$branch"`; + +git fetch origin dev master; + + +merge_base=`git merge-base origin/dev "$branch"` +merge_source_current_commit=`git rev-parse "$branch"` + + +if [ "$merge_base" != "$merge_source_current_commit" ]; then + echo -e "${red}Branch with name '$branch_name' is not completely merged with origin/dev.${no_color}"; + exit 1; +else + echo -e "${green}Branch with name '$branch_name' is merged with origin/dev, now checking against origin/master${no_color}"; +fi + +merge_base="$(git merge-base origin/master $branch)" + +if [ "$merge_base" != "$merge_source_current_commit" ]; then + echo -e "${red}Branch with name '$branch_name' is not completely merged with orign/master.${no_color}"; + exit 1; +fi + + +echo -e "${green}branch with name '$branch_name' is completely merged with origin/dev and origin/master.${no_color}" + +echo "To delete this branch run: git branch -d '$branch_name'" diff --git a/dev-scripts/git/tools/merge-branch-with-integration.sh b/dev-scripts/git/tools/merge-branch-with-integration.sh new file mode 100755 index 00000000..e51e3340 --- /dev/null +++ b/dev-scripts/git/tools/merge-branch-with-integration.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -e; # exit immediately if any command fails + +current_branch="$(git rev-parse --abbrev-ref HEAD)" + +if [ "$current_branch" == "master" ] || [ "$current_branch" == "dev" ]; then + echo 'Aborting script because you are on master or dev branch, you need to be on a feature branch.'; + exit 1; +fi + +time_seconds=`node -e 'console.log(String(Date.now()).slice(0,-3))'`; + +git add . +git add -A +git commit --allow-empty -am "merge_at:${time_seconds}" + +git fetch origin dev; +git merge -Xignore-space-change "origin/dev" # use --no-ff to force a new commit +git push origin HEAD; + diff --git a/package.json b/package.json index b593e45e..84430e23 100755 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "main": "dist/index.js", "scripts": { "start": "echo 'this is not what you are looking for.'", - "test": "./dev-scripts/test.sh", + "test": "echo 'this is not what you are looking for'", "postinstall": "./scripts/suman-postinstall.sh" }, "author": "Olegzandr VD", @@ -121,6 +121,12 @@ "tape", "tap" ], + "r2g": { + "test": "echo 'here is the hotstepper.'" + }, + "npp": { + "publishable": true + }, "bugs": { "url": "https://github.com/sumanjs/suman/issues" }, diff --git a/scripts/create-suman-dir.d.ts b/scripts/create-suman-dir.d.ts index cb0ff5c3..b7988016 100755 --- a/scripts/create-suman-dir.d.ts +++ b/scripts/create-suman-dir.d.ts @@ -1 +1,2 @@ +#!/usr/bin/env node export {}; diff --git a/scripts/find-local-suman-executable.d.ts b/scripts/find-local-suman-executable.d.ts index cb0ff5c3..b7988016 100755 --- a/scripts/find-local-suman-executable.d.ts +++ b/scripts/find-local-suman-executable.d.ts @@ -1 +1,2 @@ +#!/usr/bin/env node export {}; diff --git a/scripts/find-local-suman-executable.js b/scripts/find-local-suman-executable.js index f4a527e2..df32833c 100755 --- a/scripts/find-local-suman-executable.js +++ b/scripts/find-local-suman-executable.js @@ -18,11 +18,10 @@ try { } catch (err) { } -const debugLogPath = path.resolve(process.env.HOME + '/.suman/suman-debug.log'); let p, cd; -function stat(p) { +const stat = function (p) { try { - return fs.statSync(p).isFile(); + return fs.lstatSync(p).isFile(); } catch (err) { if (!String(err.stack || err).match(/ENOENT: no such file or directory/i)) { @@ -30,7 +29,7 @@ function stat(p) { } return false; } -} +}; while (true) { cd = path.resolve(cwd + down.join('')); if (String(cd) === String(path.sep)) { diff --git a/scripts/find-local-suman-executable.ts b/scripts/find-local-suman-executable.ts index b24a09dc..0e2ded35 100755 --- a/scripts/find-local-suman-executable.ts +++ b/scripts/find-local-suman-executable.ts @@ -22,15 +22,14 @@ try{ fs.mkdirSync(path.resolve(process.env.HOME + '/.suman')); } catch(err){ - + // ignore } -const debugLogPath = path.resolve(process.env.HOME + '/.suman/suman-debug.log'); let p, cd; -function stat (p: string) { +const stat = function (p: string) { try { - return fs.statSync(p).isFile(); + return fs.lstatSync(p).isFile(); } catch (err) { if (!String(err.stack || err).match(/ENOENT: no such file or directory/i)) { @@ -39,7 +38,7 @@ function stat (p: string) { //explicit for your pleasure return false; } -} +}; while (true) { diff --git a/scripts/find-project-root.js b/scripts/find-project-root.js index b4fce984..c64e12fe 100755 --- a/scripts/find-project-root.js +++ b/scripts/find-project-root.js @@ -5,9 +5,10 @@ const path = require("path"); (function findRoot(pth) { let possiblePkgDotJsonPath = path.resolve(String(pth) + '/package.json'); try { - fs.statSync(possiblePkgDotJsonPath).isFile(); - console.log(pth); - process.exit(0); + if (fs.lstatSync(possiblePkgDotJsonPath).isFile()) { + console.log(pth); + process.exit(0); + } } catch (err) { let subPath = path.resolve(String(pth) + '/../'); diff --git a/scripts/find-project-root.ts b/scripts/find-project-root.ts index b25864cd..83d3cb8a 100755 --- a/scripts/find-project-root.ts +++ b/scripts/find-project-root.ts @@ -3,25 +3,25 @@ import fs = require('fs'); import path = require('path'); +(function findRoot(pth: string): void { -(function findRoot(pth: string) : void { + let possiblePkgDotJsonPath = path.resolve(String(pth) + '/package.json'); - let possiblePkgDotJsonPath = path.resolve(String(pth) + '/package.json'); - - try { - fs.statSync(possiblePkgDotJsonPath).isFile(); - console.log(pth); - process.exit(0); + try { + if (fs.lstatSync(possiblePkgDotJsonPath).isFile()) { + console.log(pth); + process.exit(0); + } + } + catch (err) { + let subPath = path.resolve(String(pth) + '/../'); + if (subPath === pth) { + console.error(' => Cannot find path to project root.'); + process.exit(1); } - catch (err) { - let subPath = path.resolve(String(pth) + '/../'); - if (subPath === pth) { - console.error(' => Cannot find path to project root.'); - process.exit(1); - } - else { - return findRoot(subPath); - } + else { + return findRoot(subPath); } + } })(process.cwd()); diff --git a/scripts/suman-clis.sh b/scripts/suman-clis.sh index 2e4f85cb..4bb1e249 100755 --- a/scripts/suman-clis.sh +++ b/scripts/suman-clis.sh @@ -13,7 +13,7 @@ export suman_global_npm_modules_path="$(npm root -g)"; -function handle_global_suman { +handle_global_suman() { WHICH_SUMAN=$(which suman); # GLOBAL_MODULES="$(npm root -g)"; @@ -42,11 +42,13 @@ function handle_global_suman { } -function suman { +suman(){ if test ${#} -eq 0; then + echo "[suman] using suman-shell instead of suman executable."; suman-shell "$@"; # note we should have no arguments so passing "$@" to suman-shell should be pointless + else suman_inspect="no"; @@ -68,10 +70,12 @@ function suman { NEW_PATH="${PATH}":"$HOME/.suman/global/node_modules/.bin"; if [[ "${SUMAN_FORCE_GLOBAL}" == "yes" || -z "$LOCAL_SUMAN" ]]; then + echo "[suman] => No local Suman executable could be found, given the present working directory => $PWD"; echo "[suman] => Warning...attempting to run a globally installed version of Suman..."; local -a node_exec_args=( ); handle_global_suman node_exec_args "$@"; + else NODE_PATH="${NEW_NODE_PATH}" PATH="${NEW_PATH}" node "$LOCAL_SUMAN" "$@"; fi @@ -79,7 +83,7 @@ function suman { } -function suman-shell { + suman-shell() { echo "[suman] => Using 'suman' alias in suman-clis.sh..." @@ -107,7 +111,7 @@ function suman-shell { } -function suman-inspect { +suman-inspect() { echo "[suman] => Using 'suman-inspect' alias in suman-clis.sh..."; LOCAL_SUMAN="$(node "$HOME/.suman/find-local-suman-executable.js")"; @@ -126,7 +130,7 @@ function suman-inspect { fi } -function suman-debug { + suman-debug() { echo "[suman] => Using 'suman-debug' alias in suman-clis.sh..." LOCAL_SUMAN="$(node "$HOME/.suman/find-local-suman-executable.js")"; @@ -144,7 +148,7 @@ function suman-debug { fi } -function suman--debug { + suman--debug() { echo "[suman] => Using 'suman--debug' alias in suman-clis.sh..." LOCAL_SUMAN="$(node "$HOME/.suman/find-local-suman-executable.js")"; @@ -161,3 +165,11 @@ function suman--debug { NODE_PATH="${NEW_NODE_PATH}" PATH="${NEW_PATH}" node --debug-brk=5858 --debug=5858 "$LOCAL_SUMAN" "$@"; fi } + + +export -f suman; +export -f suman-debug; +export -f suman--debug; +export -f suman-inspect; +export -f suman-shell; +export -f handle_global_suman; diff --git a/src/acquire-dependencies/acquire-post-deps.ts b/src/acquire-dependencies/acquire-post-deps.ts index 07db44ec..87a26111 100755 --- a/src/acquire-dependencies/acquire-post-deps.ts +++ b/src/acquire-dependencies/acquire-post-deps.ts @@ -164,7 +164,7 @@ export const acquirePostDeps = function ($depList: Array, depContainerOb if (!_suman.processIsRunner) { _suman.log.info(chalk.green.underline.bold('Finished with suman.once.post.js dependencies.')); - console.log('\n'); + console.log(''); } return obj; diff --git a/src/default-conf-files/suman.default.conf.x.ts b/src/default-conf-files/suman.default.conf.x.ts index 128ada69..9710df75 100755 --- a/src/default-conf-files/suman.default.conf.x.ts +++ b/src/default-conf-files/suman.default.conf.x.ts @@ -20,7 +20,6 @@ export default { //string testDir: 'test', testSrcDir: 'test', // recommended that you create a test/src directory - testTargetDir: 'test-target', // only used if compiling/transpiling tests sumanHelpersDir: 'suman', uniqueAppName: '', browser: 'Firefox', // browser to open test results with diff --git a/src/parse-cmd-line-opts/parse-opts.ts b/src/parse-cmd-line-opts/parse-opts.ts index 47d0fa9d..66b27002 100755 --- a/src/parse-cmd-line-opts/parse-opts.ts +++ b/src/parse-cmd-line-opts/parse-opts.ts @@ -16,7 +16,7 @@ import os = require('os'); //npm import dashdash = require('dashdash'); -import * as chalk from 'chalk'; +import chalk from 'chalk'; import flattenDeep = require('lodash.flattendeep'); import flatten = require('lodash.flatten'); import su = require('suman-utils'); @@ -35,7 +35,7 @@ if (module.parent && module.parent.filename === path.resolve(__dirname + '/../in ///////////////////////////////////////////////////////////////////// -let opts, parser = dashdash.createParser({options: options}); +let opts, parser = dashdash.createParser({options}); try { opts = parser.parse(process.argv); diff --git a/src/runner-helpers/browser/add-to-run-queue.ts b/src/runner-helpers/browser/add-to-run-queue.ts index ded1537e..597e9754 100755 --- a/src/runner-helpers/browser/add-to-run-queue.ts +++ b/src/runner-helpers/browser/add-to-run-queue.ts @@ -19,7 +19,7 @@ import EE = require('events'); //npm import async = require('async'); -import chalk = require('chalk'); +import chalk from 'chalk'; import semver = require('semver'); import su = require('suman-utils'); import {events} from 'suman-events'; @@ -150,9 +150,9 @@ export const makeAddToRunQueue = function (runnerObj: Object, args: Array) { console.log(` [ '${this.desc || 'unknown'}' ] `, ...args); } diff --git a/suman-todos.txt b/suman-todos.txt index 51344a93..e00029f1 100755 --- a/suman-todos.txt +++ b/suman-todos.txt @@ -6,6 +6,12 @@ three SO profiles: ========================================== + +use lstat instead of stat to look for test files +using stat instead of lstat might result in circular deps etc. + +========================================== + run only one "it" test case https://github.com/mochajs/mocha/issues/3409#issuecomment-395331888