Skip to content

Commit

Permalink
Merge tag 'v0.12.2'
Browse files Browse the repository at this point in the history
0.12.2

* tag 'v0.12.2': (390 commits)
  0.12.2
  Went and picked out the latest, shiniest version of our sails-hook-orm dependency. (but it was just to pick up balderdashy/sails-hook-orm@eb05071)
  Because the ORM hook now tolerates the absence of an adapter for the default datastore (i.e. connection) so long as there are no models using it (i.e. normal models with no explicit 'connection' property specified), that means we no longer expect sails to fail to lift in a plain jane empty directory.  This, along with some inconsistencies (since this stuff used to be commented out until I went on the mad test overhaul) was the source of the two failing tests which just devoured the last two hours of my life.  There was much weeping and gnashing of teeth.  But... said tests now pass, locally and on Travis CI.  There was much rejoicing.
  Make test helper have better output when 'expectFailedLift' opt is used.
  Update CHANGELOG.md
  changelog additions
  0.12.2-0
  Pin parseurl dependency.
  Bump sails-hook-orm dep to 1.0.5 for clarity and to avoid install issues for folks w/ sails linked.
  Remove needless require from mocha.opts
  Sails.prototype.inspect() - fix link to docs
  Expand on the plan for unescaping a bit.
  Completes first pass at implementation of 'escape'.  Still needs unescape worked out.
  Combine compile and deep escaping usage in preparation for a possible merger.
  Clarify what's up w/ unescape.
  Pass through non-strings in order to recreate xss scenarios in tests.  Also fix example usage from before the whitelist fix.
  Fixed whitelist behavior, and added naive escapeDeep impl.
  added example usage
  Implement 'keys', 'dontUnescapeOnClient', and 'namespace' options.
  Added usage assertions.
  ...

# Conflicts:
#	package.json
  • Loading branch information
ctartist621 committed Apr 6, 2016
2 parents 901f5ac + efb4d55 commit 852dd4c
Show file tree
Hide file tree
Showing 181 changed files with 9,821 additions and 5,009 deletions.
60 changes: 60 additions & 0 deletions .github/ISSUE_TEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!--
======================================================
HELLO, and welcome to the (experimental) Sailsbot
issue-submission system. If you encounter any
problems with this system, please contact
sgress454@treeline.io

FIRST THINGS FIRST: before posting, please carefully
read the contribution guide (http://bit.ly/sails-issue-guide),
particularly if this is a security issue or an issue of a
non-technical nature (Github org issues, code of conduct
issues, etc.). Those should be sent directly to inquiries@treeline.io.

NOW THEN: please fill out the following info
(Don't change text between **)
======================================================
### BEGIN VERSION INFO ###
-->

**Sails version**:
**Node version**:
**NPM version**:
**Operating system**:

<!--
### END VERSION INFO ###
======================================================
GREAT! - Now read carefully
(Sailsbot will know if you don't)!
======================================================

Before you submit an issue for Sails, please make sure you have read the issue contribution guide (http://bit.ly/sails-issue-guide) carefully, and then verify the following by typing an X in between each set of [ ] brackets below (don't make any other changes to the text!):

### BEGIN PLEDGE ###
- [ ] I am experiencing a concrete technical issue (aka a bug) with Sails (ideas and feature proposals should follow the guide for proposing features and enhancements (http://bit.ly/sails-feature-guide), which involves making a pull request). If you're not 100% certain whether it's a bug or not, that's okay--you may continue. The worst that can happen is that the issue will be closed and we'll point you in the right direction.

- [ ] I am not asking a question about how to use Sails or about whether or not Sails has a certain feature (please refer to the documentation(http://sailsjs.org), or post on http://stackoverflow.com, our Google Group (http://bit.ly/sails-google-group) or our live chat (https://gitter.im/balderdashy/sails).

- [ ] I have already searched for related issues, and found none open (if you found a related _closed_ issue, please link to it in your post).

- [ ] My issue title is concise, on-topic and polite ("jst.js being removed from layout.ejs on lift" is good; "templates dont work" or "why is sails dumb" are not so good).

- [ ] I have tried all the following (if relevant) and my issue remains:
- Make sure you have the right app lifted.
- Make sure you've killed the Sails server with CTRL+C and started it again.
- Make sure you closed any open browser tabs pointed at localhost before starting Sails.
- Make sure you do not have any other Sails apps running in other terminal windows.
- Make sure the app you are using to reproduce the issue has a clean node_modules/ directory, meaning:
* no dependencies are linked (e.g. you haven't run npm link foo)
* that you haven't made any inline changes to files in the node_modules/ folder
* that you don't have any weird global dependency loops. The easiest way to double-check any of the above, if you aren't sure, is to run: rm -rf node_modules && npm cache clear && npm install.

and finally...
- [ ] **I can provide steps to reproduce this issue that others can follow.**

Ideally, this involves creating a new repo that demonstrates the problem (see instructions at http://bit.ly/sails-issue-repro). Even though your issue may seem so simple to reproduce that a new repo is unnecessary, you'd be surprised how many solutions present themselves when you start from `sails new` and attempt to recreate your issue from scratch in a new app. This ensures that the real issue isn't in your user code (a forgotten policy file, perhaps?) or in a third-party module. If you're absolutely _convinced_ that a new repo is unnecessary, provide clear, concise and _specific_ steps to reproduce the problem in your post (not "create a model then do blueprint create").
### END PLEDGE ###

OKAY--THANKS FOR READING! Continue posting details of your issue below. -->
<hr/>
33 changes: 33 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!--
======================================================
HELLO, and welcome to the (experimental) Sailsbot
pr-submission system. If you encounter any
problems with this system, please contact
sgress454@treeline.io

IMPORTANT - Read Carefully (Sailsbot will know if you don't)!
======================================================

Before submitting a pull request for a new feature request, pretty-please read the Sails contribution guide section on proposing features and enhancements: http://bit.ly/sails-feature-guide.
Before submitting a pull request with code, please read the section on contributing code: http://bit.ly/sails-code-guide.

They're a little long, but that's because we're serious about keeping Sails lean, stable and secure.

If after all that, you're still ready to make a pull request, make sure that your PR title starts with one of the following:

[proposal]
[patch]
[implements #<another PR number>]
[fixes #<an issue number>]

For example:
[proposal] Add a Kraken to the `sails lift` sailboat image
[implements #123] Adds Kraken to sailboat
[patch] Fix the shading on the Kraken's tentacles
[fixes #423] Removes pesky "throw new Error('yolo');" added when Kraken is displayed

If you don't use one of those prefixes, Sailsbot will bring the hammer down. You have been warned!

Ok, that's all. Please put the description of your pull request below (after the arrow).
-->

139 changes: 103 additions & 36 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,55 +1,122 @@
{
// To fix column positions for JSHint errors you may want to add `"indent": 1` to your
// **User** "jshint_options". This issue affects users with tabs for indentation.
// This fix was reverted due to a conflict with using the `"white": true` option.
// "indent": 1,
// ┬┌─┐╦ ╦╦╔╗╔╔╦╗┬─┐┌─┐
// │└─┐╠═╣║║║║ ║ ├┬┘│
// o└┘└─┘╩ ╩╩╝╚╝ ╩ ┴└─└─┘
//
// This file (`.jshintrc`) exists to help with consistency of code
// throughout this package, and throughout Sails and the Node-Machine project.
//
// To review what each of these options mean, see:
// http://jshint.com/docs/options
//
// (or: https://github.com/jshint/jshint/blob/master/examples/.jshintrc)



//////////////////////////////////////////////////////////////////////
// NOT SUPPORTED IN SOME JSHINT VERSIONS SO LEAVING COMMENTED OUT:
//////////////////////////////////////////////////////////////////////
// Prevent overwriting prototypes of native classes like `Array`.
// (doing this is _never_ ok in any of our packages that are intended
// to be used as dependencies of other developers' modules and apps)
// "freeze": true,
//////////////////////////////////////////////////////////////////////


//////////////////////////////////////////////////////////////////////
// EVERYTHING ELSE:
//////////////////////////////////////////////////////////////////////

// Allow the use of `eval` and `new Function()`
// (we sometimes actually need to use these things)
"evil": true,

// Tolerate funny-looking dashes in RegExp literals.
// (see https://github.com/jshint/jshint/issues/159#issue-903547)
"regexdash": true,

// The potential runtime "Environments" (as defined by jshint)
// that the _style_ of code written in this package should be
// compatible with (not the code itself, of course).
"browser": true,
"node": true,
"wsh": true,

// Tolerate the use `[]` notation when dot notation would be possible.
// (this is sometimes preferable for readability)
"sub": true,

// Suppress warnings about mixed tabs and spaces
"smarttabs": true,
// Do NOT suppress warnings about mixed tabs and spaces
// (two spaces always, please; see `.editorconfig`)
"smarttabs": false,

// Suppress warnings about trailing whitespace
// (this is already enforced by the .editorconfig, so no need to warn as well)
"trailing": false,

// Suppress warnings about the use of expressions where fn calls or assignments are expected
// Suppress warnings about the use of expressions where fn calls or assignments
// are expected, and about using assignments where conditionals are expected.
// (while generally a good idea, without this setting, JSHint needlessly lights up warnings
// in existing, working code that really shouldn't be tampered with. Pandora's box and all.)
"expr": true,

// Suppress warnings about using functions inside loops (useful for inifinityCounters)
"loopfunc": true,

// Suppress warnings about using assignments where conditionals are expected
"boss": true,

// Do NOT suppress warnings about using functions inside loops
// (in the general case, we should be using iteratee functions with `_.each()`
// or `Array.prototype.forEach()` instead of `for` or `while` statements
// anyway. This warning serves as a helpful reminder.)
"loopfunc": false,

// Suppress warnings about "weird constructions"
// i.e. allow code like:
// ```
// (new (function OneTimeUsePrototype () { } ))
// ```
//
// (sometimes order of operations in JavaScript can be scary. There is
// nothing wrong with using an extra set of parantheses when the mood
// strikes or you get "that special feeling".)
"supernew": true,

// Allow backwards, node-dependency-style commas
"laxcomma": true

// "bitwise": true,
// "camelcase": true,
// "node": true,
// "undef": true,
// "unused": true,
// "curly": true,
// "immed": true,
// "latedef": true,
// "noarg": true,
// "noempty": true,
// "plusplus": true,
// "quotmark": "single",
// "trailing": true,
// "asi": false,
// "eqnull": true,
// "eval": true,
// "sub": true,
// "supernew": true,
// "eqeqeq": true,
// "eqnull": true

// Do NOT allow backwards, node-dependency-style commas.
// (while this code style choice was used by the project in the past,
// we have since standardized these practices to make code easier to
// read, albeit a bit less exciting)
"laxcomma": false,

// Strictly enforce the consistent use of single quotes.
// (this is a convention that was established primarily to make it easier
// to grep [or FIND+REPLACE in Sublime] particular string literals in
// JavaScript [.js] files. Note that JSON [.json] files are, of course,
// still written exclusively using double quotes around key names and
// around string literals.)
"quotmark": "single",

// Do NOT suppress warnings about the use of `==null` comparisons.
// (please be explicit-- use Lodash or `require('util')` and call
// either `.isNull()` or `.isUndefined()`)
"eqnull": false,

// Strictly enforce the use of curly braces with `if`, `else`, and `switch`
// as well as, much less commonly, `for` and `while` statements.
// (this is just so that all of our code is consistent, and to avoid bugs)
"curly": true,

// Strictly enforce the use of `===` and `!==`.
// (this is always a good idea. Check out "Truth, Equality, and JavaScript"
// by Angus Croll [the author of "If Hemmingway Wrote JavaScript"] for more
// explanation as to why.)
"eqeqeq": true,

// Allow initializing variables to `undefined`.
// For more information, see:
// • https://jslinterrors.com/it-is-not-necessary-to-initialize-a-to-undefined
// • https://github.com/jshint/jshint/issues/1484
//
// (it is often very helpful to explicitly clarify the initial value of
// a local variable-- especially for folks new to more advanced JavaScript
// and who might not recognize the subtle, yet critically important differences between our seemingly
// between `null` and `undefined`, and the impact on `typeof` checks)
"-W080": true

}
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ language: node_js
node_js:
- "0.10"
- "0.12"
- "4"
- "5"

sudo: false

before_script:
- "npm install -g jsinspect"

script:
- "jsinspect -t 30 -i ./lib"
- "npm test"

notifications:
Expand Down
Loading

0 comments on commit 852dd4c

Please sign in to comment.