Skip to content

Commit

Permalink
Ci fixes (spautz#9)
Browse files Browse the repository at this point in the history
* Use travis-ci.com instead of .org, per their docs

* Make ci build pass

* Some polish for bettercodehub

* Only run Travis with versions of Node that support the ci command

* Minor config adjustments

* Revert to default bettercodehub config, since they don't support non-directory components
  • Loading branch information
spautz authored Sep 6, 2018
1 parent fd4901e commit ae0e5ee
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
*~
.DS_Store
.idea
.nyc_output
.vscode
*.log*
*.swp

dist
node_modules
/dist/
/node_modules/
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ language: node_js
node_js:
- "node"
- "10"
- "9"
- "8"

install:
- "npm install"
- "npm ci"
script:
- "npm run test"
- "npm run lint"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# parameterized-selectors

[![Build Status](https://travis-ci.org/spautz/parameterized-selectors.svg?branch=master)](https://travis-ci.org/spautz/parameterized-selectors)
[![Build Status](https://travis-ci.com/spautz/parameterized-selectors.svg?branch=master)](https://travis-ci.com/spautz/parameterized-selectors)
[![Coverage Status](https://coveralls.io/repos/github/spautz/parameterized-selectors/badge.svg?branch=master)](https://coveralls.io/github/spautz/parameterized-selectors?branch=master)
[![BCH compliance](https://bettercodehub.com/edge/badge/spautz/parameterized-selectors?branch=master)](https://bettercodehub.com/)
[![BCH compliance](https://bettercodehub.com/edge/badge/spautz/parameterized-selectors?branch=master)](https://bettercodehub.com/results/spautz/parameterized-selectors)

A Reselect-inspired library, where selectors can be passed params and their dependencies are calculated automatically.

Expand Down
2 changes: 1 addition & 1 deletion src/defaultOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const defaultInitialOptions = {
compareIncomingStates: COMPARISON_PRESETS.SAME_REFERENCE,
compareSelectorResults: COMPARISON_PRESETS.SAME_REFERENCE_OR_EMPTY,
exceptionCallback: (errorMessage, error) => {
console.error(errorMessage, error);
console.error(errorMessage, error); // eslint-disable-line no-console
throw error;
},
};
Expand Down
9 changes: 5 additions & 4 deletions src/parameterizedSelectorFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const pushCallStackEntry = (state, hasStaticDependencies, overrideValues = {}) =
return callStackEntry;
};

// const popCallStackEntry = () => parameterizedSelectorCallStack.pop();
const popCallStackEntry = () => parameterizedSelectorCallStack.pop();


Expand Down Expand Up @@ -174,7 +173,7 @@ const parameterizedSelectorFactory = (innerFn, overrideOptions = {}) => {
&& `Parameterized selector "${options.displayName}(${keyParamsString})"`;

if (options.verboseLoggingEnabled && options.useConsoleGroup) {
console.groupCollapsed(`Starting ${verboseLoggingPrefix}`, {
console.groupCollapsed(`Starting ${verboseLoggingPrefix}`, { // eslint-disable-line no-console
parentCaller,
state,
keyParams,
Expand Down Expand Up @@ -323,7 +322,7 @@ const parameterizedSelectorFactory = (innerFn, overrideOptions = {}) => {

options.warningsCallback(`${verboseLoggingPrefix} threw an exception: ${newResult.error.message}`, newResult.error);
if (options.warningsEnabled) {
console.trace();
console.trace(); // eslint-disable-line no-console
}
}
const callStackEntry = popCallStackEntry();
Expand Down Expand Up @@ -387,6 +386,8 @@ const parameterizedSelectorFactory = (innerFn, overrideOptions = {}) => {
// Step 6: All our work is done -- but we may need to add an entry to let the parent/caller parameterizedSelector
// know that this one was called, regardless of our cached/dirty state.
if (parentCaller && parentCaller.shouldRecordDependencies) {
// @TODO: Split this into separate functions so that they can be ordered in definition order
// eslint-disable-next-line no-use-before-define
parentCaller.dependencies.push([parameterizedSelector, keyParams, newResult.returnValue]);
}

Expand All @@ -397,7 +398,7 @@ const parameterizedSelectorFactory = (innerFn, overrideOptions = {}) => {
options.verboseLoggingCallback(`${verboseLoggingPrefix} is done, with a new result: `, newResult);
}
if (options.useConsoleGroup) {
console.groupEnd();
console.groupEnd(); // eslint-disable-line no-console
}
}

Expand Down

0 comments on commit ae0e5ee

Please sign in to comment.