redesigned resource store #326

wants to merge 127 commits into


None yet
1 participant

drewfish commented Jul 30, 2012

Herein lies the new resource store.

backward-compatibility changes

  • Users will now need to configure the iphone selector by hand ({"settings": ["device:iphone"], "selector":"iphone"}) in their application.json files. (This resource store no longer assumes the selector is just the device.)
  • In a mojit's package.json: the version check is now spelled engines.mojito instead of yahoo.mojito.version.
  • In a mojit's package.json: config.mojito is now spelled yahoo.mojito.
  • The second argument to serializeClientStore() is gone. (This was pretty much internal to mojito anyway, so likely no one will miss it.)

issues fixed

  • issue #10: Ensure Mojito can handle YUI module names with underscores
  • issue #32: [mojito compile rollups] using dot notation in the name of the css files will make compile to discard some of them
  • issue #50: mojito start loads tests from addons
  • issue #54: "mojito compile inlinecss" has unexpected behavior when there is a css file name that contains the string "iphone"
  • issue #59, bz 5380714: test files under addons/ac/ are loaded when mojito starts
  • issue #95, bz 4647440: Proper Mojito version number comparison
  • issue #109: Refactor certain complicated parts of the store
  • issue #110: Detect duplicate resource ids on cookdown
  • bz 4606483: Mojit specs can be within a spec.json file so they can be YCBed
  • bz 4647169: considering making a utility YUI object in ResourceStore
  • bz 5362206: Need ability to select controller, view, model and binder based on context
  • bz 5495519: mojito is not loading - stuck retrieving all the datetype-date-format for each locale
  • bz 5530096: Mojito tries to parse .json~ files in [mojit]/specs/
  • bz 5541500: mojito not doing fallback
  • bz 5609501: L10n: Root strings file is not used by default when a non-root strings file is present

issues unblocked

  • issue #37: i18n support for html5apps
  • issue #78: Complete client resource store implementation
  • issue #86: Real device detection
  • bz 4805839: Custom archetypes
  • bz 5450431: [json files granularity] how to include or synthetically define values for dimensions
  • bz 5605173: {selector} is not defined or explained in the documentation

This passes yahoo-internal fork build 54, with the exception of one test. That test is broken, and should be updated once this is merged to develop. (The test is using mojito start --context lang=de which is used to set the default context. However, every request gets the lang set in the context, so that will override the default context specified on the command line.)

drewfish added some commits May 23, 2012

@drewfish drewfish moved initial resource store redesign work 1eeea27
@drewfish drewfish cleanups 86f5514
@drewfish drewfish reworked how resources are found by convention ace2ac8
@drewfish drewfish refactored to add a more efficient OO interface 78d3224
@drewfish drewfish uses new OO interface to YCB 8af6ca8
@drewfish drewfish monster (but hopefully clean) resource resolution a7684e1
@drewfish drewfish api docs update 04178f9
@drewfish drewfish moved archetypes/ and management/commands/ into app/ 6648748
@drewfish drewfish fixed up paths from move c37ff7d
@drewfish drewfish real addon location and management 0d4f181
@drewfish drewfish resource and resource version getters d6765bc
@drewfish drewfish routes addon 1f4b70b
@drewfish drewfish first phase of yui RS addon f563a9d
@drewfish drewfish query for mojit resources also includes shared resources 55b7c4d
@drewfish drewfish new store wired into index.js 4fde110
@drewfish drewfish updated for new store.getAppConfig() API 65315ba
@drewfish drewfish uses the public store API to get the framework config ba50170
@drewfish drewfish `mojito test` runs (tests don't pass yet) 325bb3f
@drewfish drewfish delinted 9f9f91f
@drewfish drewfish updated to match new resource store API 5a7ccbc
@drewfish drewfish everyone who wants the contents of a JSON file gets their own copy, t…
…o mangle as they see fit
@drewfish drewfish start of config RS addon tests 0b4c8a2
@drewfish drewfish rest of tests for addon-rs-config 69333e2
@drewfish drewfish unit test for addon-rs-routes 7b98d0b
@drewfish drewfish addon-rs-routes was a little silly, so moved back into the store core 666de01
@drewfish drewfish unit test for addon-rs-selector 1c22f25
@drewfish drewfish unit test for addon-rs-yui 6e4c260
@drewfish drewfish addon-rs-url (and unit tests) cc73e60
@drewfish drewfish reorganization and documentation 00730bb
@drewfish drewfish beginning if instance methods, starting with getMojitTypeDetails() 5dac772
@drewfish drewfish a posl should only contain a selector that actually exists in the app e5734ea
@drewfish drewfish first real version of expanceInstanceForEnv(), more tests pass but mo…
…re to go
@drewfish drewfish fixed addon-rs-selector unit test 17ee938
@drewfish drewfish Merge branch 'develop' into redesign-rs
@drewfish drewfish Merge remote-tracking branch 'origin/redesign-rs' into redesign-rs 2be4a98
@drewfish drewfish missing dependency on json-stringify 7b5e08e
@drewfish drewfish moved store.getYuiConfig*() to addon-rs-yui f6f0c2f
@drewfish drewfish lint 310ffd8
@drewfish drewfish store.setLogger() is gone df5c010
@drewfish drewfish store._root is spelled differently now 4300213
@drewfish drewfish done 9a1f889
@drewfish drewfish fixed up call to store.getAppConfig() eaf657a
@drewfish drewfish store.getAllMojits() no longer exists 74a3cf7
@drewfish drewfish store._staticURLs and store.fileFromStaticHandlerURL() now part of ad…
@drewfish drewfish more stubs for YUI when parsing a javascript file 17e2617
@drewfish drewfish specs fc23793
@drewfish drewfish yui RS addon calculates yui module dependencies acc7bc2
@drewfish drewfish updated resource-store-adapter tests. fixed some RS regressions 33d984b
@drewfish drewfish Merge branch 'develop' into redesign-rs
@drewfish drewfish implemented deferAllOptionalAutoloads 6332a05
@drewfish drewfish lint fb31cc0
@drewfish drewfish expandInstanceForEnv() caching e729db8
@drewfish drewfish allow the RS to have a configurable mojitoRoot, mainly to get coverag…
…e unit tests working
@drewfish drewfish reimplemented mojit package.json check. reimplemented publishing of p…
@drewfish drewfish fixed a couple of low-hanging unit tests a88b834
@drewfish drewfish implemented serializeClientStore() 4d69bfa
@drewfish drewfish small memory optimization e33d110
@drewfish drewfish fixed addon-rs-url tests 4a26c6e
@drewfish drewfish optimized RS unit tests b49e501
@drewfish drewfish last RS unit test now passes dc4ade4
@drewfish drewfish delint dd22147
@drewfish drewfish guard against missing controller 47485cb
@drewfish drewfish works with new resource store e4c1cee
@drewfish drewfish preliminaries of `mojito build html5app` bd15400
@drewfish drewfish no longer need to fixup instance langs 923980b
@drewfish drewfish the binders. working. e0b50c6
@drewfish drewfish fixed builds.html5app.forceRelativePaths bbc3c8b
@drewfish drewfish more client-side fixes 56d9567
@drewfish drewfish delint ea24545
@drewfish drewfish `mojito compile rollups` now works d02ffeb
@drewfish drewfish fixed the tests (again) 5b063b6
@drewfish drewfish `mojito compile views` now works 5b67bf5
@drewfish drewfish `mojito compile inlinecss` now works 43676e4
@drewfish drewfish cleaned up metadata leak between resource versions 2a82f8e
@drewfish drewfish binders shouldn't be a dependency for the controllers 195bc87
@drewfish drewfish fixed params handling of routes d9594b4
@drewfish drewfish inlinecss is common 91798e6
@drewfish drewfish `mojito compile json` somewhat working (significant legacy issues wit…
…h this)
@drewfish drewfish delint c2dbe60
@drewfish drewfish fixed store-server test
controllers no longer depend on binders, even on the client
@drewfish drewfish small variable name cleanup 86c4504
@drewfish drewfish fixed `mojito test --coverage` c33fe81
@drewfish drewfish documentation cleanup (using yuidocjs@0.3.14) e9ab62e
@drewfish drewfish ack, I was wrong about toPreload being undefined ca8e2ae
@drewfish drewfish cleanups and renames inspired by writing the skeleton doc 6863713
@drewfish drewfish store.getRoutes() returns the default route if none set by user 8ae219e
@drewfish drewfish any AC addon can get the store if they define a setStore() setter 4decbc6
@drewfish drewfish addon-rs-url honors a URL set by another RS addon d7f12f8
@drewfish drewfish use store.getAllURLs() instead of methods on store.url 330ac6d
@drewfish drewfish dropped getSpecURL() from addons-rs-url 9ad9965
@drewfish drewfish Merge branch 'develop' into redesign-rs 5d31f35
@drewfish drewfish fixed variable name error found by jenkins jslint dde6bb8
@drewfish drewfish fixed `mojito test app` 1ed0688
@drewfish drewfish Merge branch 'develop' into redesign-rs 07d92f3
@drewfish drewfish fixed rollups f960e3e
@drewfish drewfish don't try to find the YUI module names of js files in the assets/ dirs 439905a
@drewfish drewfish when loading tests, also load "libs" tests 6584e52
@drewfish drewfish fixed YCB tests c2b29b9
@drewfish drewfish delint 85f8ee1
@drewfish drewfish optimization: only track those dimensions that are actually used in t…
…he YCB file
@drewfish drewfish renamed addon-rs-selector.getListFromContext() to getPOSLFromContext() de3b709
@drewfish drewfish created addon-rs-selector.getAllPOSLs(), and used for deep optimizations 8beb315
@drewfish drewfish better test for if the controller exists on the client 96194ef
@drewfish drewfish validate context agains dimensions.json, to guard against spurious va…
@drewfish drewfish resolved and destructor() question f58867c
@drewfish drewfish Merge branch 'develop' into redesign-rs
@drewfish drewfish more lenient when interpretting user-provided dimensions.json files 7afaf7d
@drewfish drewfish better context validation b34c6b3
@drewfish drewfish guard against wierd files, mainly broken symlinks fb1624e
@drewfish drewfish nifty features
* binders skipped when runtime:server
* graph has nice title
* language bundles skipped unless --lang is given
@drewfish drewfish no longer trim .affinity and .selector from resolved resources, since…
… useful for debugging
@drewfish drewfish rewrite to use much of the power of the new resource store dd74db4
@drewfish drewfish option --trace f1b1bf3
@drewfish drewfish tweaked traced edges a skosh fd870d2
@drewfish drewfish more styling tweaks 55c26ac
@drewfish drewfish app resources override framework resources 33670a9
@drewfish drewfish resolved issue of mojits that come from multiple sources (such as HTM…
…LFrameMojit with overrides in the app)
@drewfish drewfish Merge branch 'develop' into redesign-rs d020064
@drewfish drewfish delint a76b935
@drewfish drewfish don't generate a URL for the "shared" mojit afa371c
@drewfish drewfish optimization: don't make a new Y object every time we want to make a …
@drewfish drewfish updating examples, since selector no longer defaults to device f16c783
@drewfish drewfish clone the routes in store.getRoutes(), because the router modifies th…
…e route object in-place
@drewfish drewfish Merge branch 'develop' into redesign-rs 1c3b7e3
@drewfish drewfish more defensive about poluting internal structures 66978de
@drewfish drewfish even more defenses against poluting internal structures 70cae36
@drewfish drewfish fallback when validating "lang" context key f78f3bd

drewfish commented Jul 30, 2012

Can't cleanly merge. I'll cut a new PR when that's available.

drewfish closed this Jul 30, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment