jquery / codeorigin.jquery.com

jQuery CDN
https://releases.jquery.com
Other
57 stars 602 forks source link

Support pre-releases for jQuery UI #11

Closed jzaefferer closed 10 years ago

jzaefferer commented 10 years ago

The files for jQuery UI. 1.11.0-beta.1 aren't getting listed on http://code.jquery.com/ui/

The deploy fails with this stacktrace:

/Users/jza/dev/codeorigin.jquery.com/node_modules/grunt/lib/util/task.js:352
          throw e;
                ^
TypeError: Cannot read property 'version' of undefined
    at Object.<anonymous> (/Users/jza/dev/codeorigin.jquery.com/grunt.js:284:36)
    at program1 (eval at <anonymous> (/Users/jza/dev/codeorigin.jquery.com/node_modules/handlebars/lib/handlebars/compiler/compiler.js:579:23), <anonymous>:15:92)
    at program (/Users/jza/dev/codeorigin.jquery.com/node_modules/handlebars/lib/handlebars/runtime.js:77:14)
    at Object.<anonymous> (/Users/jza/dev/codeorigin.jquery.com/node_modules/handlebars/lib/handlebars/base.js:116:21)
    at Object.eval (eval at <anonymous> (/Users/jza/dev/codeorigin.jquery.com/node_modules/handlebars/lib/handlebars/compiler/compiler.js:579:23), <anonymous>:64:25)
    at /Users/jza/dev/codeorigin.jquery.com/node_modules/handlebars/lib/handlebars/runtime.js:38:33
    at /Users/jza/dev/codeorigin.jquery.com/node_modules/handlebars/lib/handlebars/compiler/compiler.js:1294:21
    at Object.<anonymous> (/Users/jza/dev/codeorigin.jquery.com/grunt.js:336:62)
    at Object.thisTask.fn (/Users/jza/dev/codeorigin.jquery.com/node_modules/grunt/lib/grunt/task.js:58:16)
    at Task.<anonymous> (/Users/jza/dev/codeorigin.jquery.com/node_modules/grunt/lib/util/task.js:343:36)

The first entry in the ui array of the data passed to the template looks like this: { major: '1.11', latestStable: undefined, all: [Object] }. The template then tries to render something using the latestStable property, which is undefined, so it has no version property, leading to the exception above.

When looking into fixing this issue I ran into a different issue: How should pre-releases show up, if at all, on http://code.jquery.com/ui/ ? Even if I wrap the output for latestRelease in a conditional, the beta.1 is currently not a "Previous Release".

I'm going ahead with publishing the beta anyway, since this isn't a blocker (the blog post will link to the files as well).