-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
skipRegex seems to be broken in 0.12.2 (verified, patch in progress) #3682
Comments
Hi @dottodot! It looks like you missed a step or two when you created your issue. Please edit your comment (use the pencil icon at the top-right corner of the comment box) and fix the following:
As soon as those items are rectified, post a new comment (e.g. “Ok, fixed!”) below and we'll take a look. Thanks! If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]. |
OK Fixed |
@dottodot Yep. I only use the following for my single page application: I believe skipAssets is broken transitioning from 0.12.1 to 0.12.2. |
+1. It's definitely broken. I used to use regExp too. Things work fine except Assets in version 0.12.5 They are not loaded property - wrong type. Resource interpreted as Stylesheet but transferred with MIME type text/html "r|^\/(?!.*api).*|":{
view: 'homepage',
skipAssets: true
} But in 0.11.5 everything is fine. |
@nikhilbedi @AlexanderKozhevin @dottodot Thanks for the report guys. Looking into it momentarily. |
Verified on Node 4 (repro). I've got a general idea of what might be going on, but I want to add a few tests first just to make sure (and to avoid any future regressions). We'll release a follow-up patch ASAP this morning. @nikhilbedi @AlexanderKozhevin @dottodot Thanks again for your help! |
Confirmed that |
So the issue here was that when the view hook was changed to solve issues with explicit routing to deeply nested static views, core options were no longer being passed through from the view hook, causing core options like skipAssets and skipRegex to be ignored (since they weren't passed back to These options were already well tested for controllers+actions, but there weren't yet tests in core for direct routing to views (i.e. using |
Fix published in [email protected]: npm install sails@latest --save --save-exact |
0.12.3 * tag 'v0.12.3': 0.12.3 Clarify that these type of view filenames (i.e. with extra dots) are not allowed (in assertion msg.) Update changelog. Fixes balderdashy#3682 Cleanup in route:typeUnknown event handler. Apply coding conventions. Trivial (clearer variable name for usage of sailsUtil to facilitate future cleanup). Added a couple of tests to ensure skipAssets is working as expected for controller/action route targets. (it is) Assorted cleanup of existing test file including skipAssets. Adjust todo. Add failing test re balderdashy#3682 Stub out skipAssets test- extracting the improved helper that spawns a child proce that performs sails lift along the way. Switch to chalk
Sails version: 0.12.2
Node version: 5.10.0 & 4.3.1
NPM version: 3.8.5 & 2.14.6
Operating system: Mac OSX 10.11.3
On 0.12.1 the following allowed me to access my routes starting /api without rendering a view but on 0.12.2 it now renders the view
The text was updated successfully, but these errors were encountered: