Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jashkenas/backbone
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: blikblum/nextbone
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
Loading
Showing with 41,020 additions and 33,324 deletions.
  1. +107 −22 .eslintrc
  2. +33 −0 .github/workflows/deploy.yml
  3. +12 −0 .gitignore
  4. +4 −0 .prettierrc
  5. +0 −21 .travis.yml
  6. +50 −0 .vscode/launch.json
  7. +541 −0 .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
  8. +823 −0 .yarn/releases/yarn-3.3.1.cjs
  9. +7 −0 .yarnrc.yml
  10. +0 −2 CNAME
  11. +5 −0 LICENSE
  12. +121 −26 README.md
  13. +52 −0 babel.config.json
  14. +0 −2 backbone-min.js
  15. +0 −1 backbone-min.map
  16. +0 −2,096 backbone.js
  17. +0 −8 bower.json
  18. +43 −0 class-utils.js
  19. +207 −0 computed.js
  20. +32 −0 docs/.vitepress/config.js
  21. +0 −5,001 docs/backbone.html
  22. +0 −464 docs/backbone.localStorage.html
  23. +410 −0 docs/collection.md
  24. +0 −518 docs/docco.css
  25. +151 −0 docs/events.md
  26. +76 −0 docs/get-started.md
  27. BIN docs/images/airbnb.png
  28. BIN docs/images/arrows.png
  29. BIN docs/images/artsy.jpg
  30. BIN docs/images/backbone.png
  31. BIN docs/images/background.png
  32. BIN docs/images/basecamp-calendar.jpg
  33. BIN docs/images/bitbucket.jpg
  34. BIN docs/images/blossom.jpg
  35. BIN docs/images/cloudapp.jpg
  36. BIN docs/images/code-school.jpg
  37. BIN docs/images/dc-workspace.jpg
  38. BIN docs/images/delicious.jpg
  39. BIN docs/images/disqus.jpg
  40. BIN docs/images/earth.jpg
  41. BIN docs/images/easel.jpg
  42. BIN docs/images/enigma.jpg
  43. BIN docs/images/flow.jpg
  44. BIN docs/images/foursquare.jpg
  45. BIN docs/images/gawker.jpg
  46. BIN docs/images/gilt.jpg
  47. BIN docs/images/groupon.jpg
  48. BIN docs/images/hulu.jpg
  49. BIN docs/images/inkling.jpg
  50. +0 −221 docs/images/intro-collections.svg
  51. +0 −152 docs/images/intro-model-view.svg
  52. +0 −135 docs/images/intro-routing.svg
  53. +0 −139 docs/images/intro-views.svg
  54. BIN docs/images/irccloud.png
  55. BIN docs/images/jolicloud.jpg
  56. BIN docs/images/khan-academy.jpg
  57. BIN docs/images/newsblur.jpg
  58. BIN docs/images/pandora.jpg
  59. BIN docs/images/pitchfork.jpg
  60. BIN docs/images/quartz.jpg
  61. BIN docs/images/rdio.jpg
  62. BIN docs/images/salon.jpg
  63. BIN docs/images/seatgeek.jpg
  64. BIN docs/images/slavery-footprint.jpg
  65. BIN docs/images/soundcloud.png
  66. BIN docs/images/spin.jpg
  67. BIN docs/images/stripe.png
  68. BIN docs/images/tilemill.jpg
  69. BIN docs/images/todos.jpg
  70. BIN docs/images/trello.jpg
  71. BIN docs/images/tzigla.jpg
  72. BIN docs/images/usa-today.jpg
  73. BIN docs/images/vox.jpg
  74. BIN docs/images/walmart-mobile.png
  75. BIN docs/images/wpcom-notifications.jpg
  76. BIN docs/images/zocdoc.jpg
  77. +21 −0 docs/index.md
  78. +14 −0 docs/introduction.md
  79. +0 −210 docs/js/jquery.lazyload.js
  80. +432 −0 docs/model.md
  81. BIN docs/public/fonts/aller-bold.eot
  82. BIN docs/public/fonts/aller-bold.ttf
  83. BIN docs/public/fonts/aller-bold.woff
  84. BIN docs/public/fonts/aller-light.eot
  85. BIN docs/public/fonts/aller-light.ttf
  86. BIN docs/public/fonts/aller-light.woff
  87. BIN docs/public/fonts/roboto-black.eot
  88. BIN docs/public/fonts/roboto-black.ttf
  89. BIN docs/public/fonts/roboto-black.woff
  90. BIN docs/public/images/grey_@2X.png
  91. +0 −375 docs/public/stylesheets/normalize.css
  92. +0 −58 docs/search.js
  93. +0 −791 docs/todos.html
  94. +35 −0 dom-utils.js
  95. +0 −184 examples/backbone.localStorage.js
  96. BIN examples/todos/destroy.png
  97. +0 −69 examples/todos/index.html
  98. +0 −211 examples/todos/todos.css
  99. +0 −234 examples/todos/todos.js
  100. BIN favicon.ico
  101. +474 −0 form.js
  102. +5 −0 jsconfig.json
  103. +0 −94 karma.conf-sauce.js
  104. +313 −0 localstorage.js
  105. +2,428 −0 nextbone.js
  106. +139 −26 package.json
  107. +164 −0 test/class-utils/asyncmethod.cjs
  108. +12 −0 test/class-utils/setup-globals.js
  109. +655 −0 test/computed/computed.js
  110. +2,308 −0 test/core-next/collection.js
  111. +168 −0 test/core-next/delegate.js
  112. +964 −0 test/core-next/events.js
  113. +1,934 −0 test/core-next/model.js
  114. +46 −0 test/core-next/observable.js
  115. +1,049 −0 test/core-next/router.js
  116. +177 −0 test/core-next/sync.js
  117. +538 −0 test/core-next/view.js
  118. +5 −1 test/{ → core}/.eslintrc
  119. +1,053 −714 test/{ → core}/collection.js
  120. +196 −0 test/core/delegate.js
  121. +482 −204 test/{ → core}/events.js
  122. +46 −18 karma.conf.js → test/core/karma.conf.cjs
  123. +2,042 −0 test/core/model.js
  124. +41 −0 test/core/observable.js
  125. +413 −383 test/{ → core}/router.js
  126. +21 −14 test/{setup/environment.js → core/setup.js}
  127. +166 −0 test/core/sync.js
  128. +620 −0 test/core/view.js
  129. +307 −0 test/fetch/fetch.js
  130. +5 −0 test/fetch/setup.js
  131. +904 −0 test/form/form.js
  132. +0 −24 test/index.html
  133. +544 −0 test/localstorage/localstorage.js
  134. +0 −43 test/model.coffee
  135. +0 −1,470 test/model.js
  136. +0 −13 test/noconflict.js
  137. +0 −4 test/setup/dom-setup.js
  138. +0 −239 test/sync.js
  139. +58 −0 test/validation/attributesOption.cjs
  140. +60 −0 test/validation/customCallbacks.cjs
  141. +93 −0 test/validation/customPatterns.cjs
  142. +290 −0 test/validation/customValidators.cjs
  143. +80 −0 test/validation/errorMessages.cjs
  144. +133 −0 test/validation/events.cjs
  145. +430 −0 test/validation/general.cjs
  146. +128 −0 test/validation/isValid.cjs
  147. +96 −0 test/validation/labelFormatter.cjs
  148. +51 −0 test/validation/mixin.cjs
  149. +455 −0 test/validation/nestedValidation.cjs
  150. +145 −0 test/validation/preValidate.cjs
  151. +27 −0 test/validation/setup-globals.js
  152. +73 −0 test/validation/validators/acceptance.cjs
  153. +81 −0 test/validation/validators/equalTo.cjs
  154. +164 −0 test/validation/validators/length.cjs
  155. +165 −0 test/validation/validators/max.cjs
  156. +164 −0 test/validation/validators/maxLength.cjs
  157. +186 −0 test/validation/validators/method.cjs
  158. +203 −0 test/validation/validators/min.cjs
  159. +165 −0 test/validation/validators/minLength.cjs
  160. +113 −0 test/validation/validators/namedMethod.cjs
  161. +143 −0 test/validation/validators/oneOf.cjs
  162. +166 −0 test/validation/validators/pattern.cjs
  163. +106 −0 test/validation/validators/patterns.cjs
  164. +165 −0 test/validation/validators/range.cjs
  165. +187 −0 test/validation/validators/rangeLength.cjs
  166. +211 −0 test/validation/validators/required.cjs
  167. +0 −9,472 test/vendor/jquery.js
  168. +0 −481 test/vendor/json2.js
  169. +0 −305 test/vendor/qunit.css
  170. +0 −4,125 test/vendor/qunit.js
  171. +0 −2,054 test/vendor/require.js
  172. +0 −1,548 test/vendor/underscore.js
  173. +0 −516 test/view.js
  174. +1,130 −0 test/virtualcollection/virtualcollection.js
  175. +194 −0 test/virtualcollection/virtualstate.js
  176. +589 −636 index.html → tools/backbonejs.html
  177. +31 −0 tools/migrate-docs.cjs
  178. +85 −0 tools/qunit-to-wtr.js
  179. +32 −0 tsconfig.types.json
  180. +3 −0 types/class-utils.d.ts
  181. +1 −0 types/class-utils.d.ts.map
  182. +34 −0 types/computed.d.ts
  183. +1 −0 types/computed.d.ts.map
  184. +11 −0 types/dom-utils.d.ts
  185. +1 −0 types/dom-utils.d.ts.map
  186. +102 −0 types/form.d.ts
  187. +1 −0 types/form.d.ts.map
  188. +24 −0 types/localstorage.d.ts
  189. +1 −0 types/localstorage.d.ts.map
  190. +599 −0 types/nextbone.d.ts
  191. +3 −0 types/utils.d.ts
  192. +1 −0 types/utils.d.ts.map
  193. +117 −0 types/validation.d.ts
  194. +1 −0 types/validation.d.ts.map
  195. +74 −0 types/virtualcollection.d.ts
  196. +1 −0 types/virtualcollection.d.ts.map
  197. +23 −0 utils.js
  198. +607 −0 validation.js
  199. +459 −0 virtualcollection.js
  200. +8 −0 web-test-runner.config.js
  201. +11,154 −0 yarn.lock
129 changes: 107 additions & 22 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,31 +1,95 @@
{
"extends": [
"prettier"
],
"env": {
"browser": true,
"node": true,
"amd": true
"es6": true
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 6
},
"overrides": [
{
"files": [
"test/core-next/**/*.js",
"test/form/**/*.js",
"test/localstorage/**/*.js",
"test/virtualcollection/**/*.js",
"test/fetch/**/*.js",
"test/computed/**/*.js",
"test/class-utils/**/*.js"
],
"env": {
"es2020": true,
"mocha": true
},
"rules": {
"no-unused-expressions": "off"
}
}
],
"globals": {
"attachEvent": false,
"detachEvent": false
},
"rules": {
"array-bracket-spacing": 2,
"block-scoped-var": 2,
"brace-style": [1, "1tbs", {"allowSingleLine": true}],
"brace-style": [
1,
"1tbs",
{
"allowSingleLine": true
}
],
"camelcase": 2,
"comma-dangle": [2, "never"],
"comma-dangle": [
2,
"never"
],
"comma-spacing": 2,
"computed-property-spacing": [2, "never"],
"dot-notation": [2, { "allowKeywords": false }],
"computed-property-spacing": [
2,
"never"
],
"dot-notation": [
2,
{
"allowKeywords": false
}
],
"eol-last": 2,
"eqeqeq": [2, "smart"],
"indent": [2, 2, {"SwitchCase": 1, "VariableDeclarator": 2}],
"eqeqeq": [
2,
"smart"
],
"key-spacing": 1,
"keyword-spacing": [2, { "after": true }],
"linebreak-style": 2,
"max-depth": [1, 4],
"max-params": [1, 5],
"new-cap": [2, {"newIsCapExceptions": ["model"]}],
"keyword-spacing": [
2,
{
"after": true
}
],
"max-depth": [
1,
4
],
"max-params": [
1,
5
],
"new-cap": [
2,
{
"newIsCapExceptions": [
"model",
"modelClass"
]
}
],
"no-alert": 2,
"no-caller": 2,
"no-catch-shadow": 2,
@@ -42,7 +106,6 @@
"no-ex-assign": 2,
"no-extend-native": 2,
"no-extra-boolean-cast": 2,
"no-extra-parens": 1,
"no-extra-semi": 2,
"no-fallthrough": 2,
"no-floating-decimal": 2,
@@ -70,21 +133,43 @@
"no-trailing-spaces": 2,
"no-undef": 2,
"no-undef-init": 2,
"no-undefined": 2,
"no-unneeded-ternary": 2,
"no-unreachable": 2,
"no-unused-expressions": [2, {"allowTernary": true, "allowShortCircuit": true}],
"no-unused-expressions": [
2,
{
"allowTernary": true,
"allowShortCircuit": true
}
],
"no-with": 2,
"object-curly-spacing": [2, "never"],
"quote-props": [1, "consistent-as-needed"],
"quotes": [2, "single", "avoid-escape"],
"quotes": [
2,
"single",
"avoid-escape"
],
"radix": 2,
"semi": 2,
"space-before-function-paren": [2, {"anonymous": "never", "named": "never"}],
"space-before-function-paren": [
2,
{
"anonymous": "never",
"named": "never"
}
],
"space-infix-ops": 2,
"space-unary-ops": [2, { "words": true, "nonwords": false }],
"space-unary-ops": [
2,
{
"words": true,
"nonwords": false
}
],
"use-isnan": 2,
"valid-typeof": 2,
"wrap-iife": [2, "inside"]
"wrap-iife": [
2,
"inside"
]
}
}
}
33 changes: 33 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy
on:
workflow_dispatch: {}
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- run: yarn install --frozen-lockfile
- name: Build
run: yarn docs:build
- uses: actions/configure-pages@v2
- uses: actions/upload-pages-artifact@v1
with:
path: docs/.vitepress/dist
- name: Deploy
id: deployment
uses: actions/deploy-pages@v1
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -3,3 +3,15 @@ raw
.DS_Store
node_modules
bower_components

docs/.vitepress/dist
docs/.vitepress/cache

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
/tools/backbonejs.md
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"printWidth": 100
}
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "attach",
"name": "Core, FormBind, LocalStorage Tests (Attach to Karma)",
"address": "localhost",
"port": 9333,
"pathMapping": {
"/": "${workspaceRoot}",
"/base/": "${workspaceRoot}/"
}
},
{
"type": "node",
"request": "launch",
"name": "Validation Tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"exports",
"--require",
"@babel/register",
"--recursive",
"${workspaceRoot}/test/validation"
],
"env": {
"NODE_ENV": "test"
},
"internalConsoleOptions": "openOnSessionStart",
"disableOptimisticBPs": true
},
{
"type": "node",
"request": "launch",
"name": "Service Tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": ["--require", "@babel/register", "${workspaceRoot}/test/service"],
"env": {
"NODE_ENV": "test"
},
"internalConsoleOptions": "openOnSessionStart",
"disableOptimisticBPs": true
}
]
}
Loading