Commit graph

9 commits

Author SHA1 Message Date
Dan Stillman
133b2b83d8 Update submodules 2019-12-01 01:51:55 -07:00
Dan Stillman
4b60c6ca27 Type/field handling overhaul
This changes the way item types, item fields, creator types, and CSL
mappings are defined and handled, in preparation for updated types and
fields.

Instead of being predefined in SQL files or code, type/field info is
read from a bundled JSON file shared with other parts of the Zotero
ecosystem [1], referred to as the "global schema". Updates to the
bundled schema file are automatically applied to the database at first
run, allowing changes to be made consistently across apps.

When syncing, invalid JSON properties are now rejected instead of being
ignored and processed later, which will allow for schema changes to be
made without causing problems in existing clients. We considered many
alternative approaches, but this approach is by far the simplest,
safest, and most transparent to the user.

For now, there are no actual changes to types and fields, since we'll
first need to do a sync cut-off for earlier versions that don't reject
invalid properties.

For third-party code, the main change is that type and field IDs should
no longer be hard-coded, since they may not be consistent in new
installs. For example, code should use `Zotero.ItemTypes.getID('note')`
instead of hard-coding `1`.

[1] https://github.com/zotero/zotero-schema
2019-09-16 02:27:22 -04:00
Tobias Diez
53df1b8dae Track master branch of submodules (#1477) 2018-03-31 16:08:31 -04:00
Aurimas Vinckevicius
87d5625bac Add Chai-as-Promised 2015-09-18 03:34:03 -05:00
Simon Kornblith
1c32db68da Unit testing infrastructure
Implements the beginnings of unit testing infrastructure using
mocha/chai. The unit tests can be run locally using test/runtests.sh,
although this will need tweaks to run on Windows. They should also run
on commit using Travis-CI.

The unit tests themselves live in test/tests. The index.js file
specifies separate test sets, which can be run individually by calling
test/runtests.sh <testsets>. Right now there is only a single unit
test, but hopefully we'll have more soon...
2015-03-07 16:34:55 -05:00
Dan Stillman
9fa7dc5249 Add https://github.com/zotero/bundled-styles as submodule 2011-11-03 00:34:34 -04:00
Dan Stillman
e064009fe2 Add CSL locales repo as submodule 2011-10-31 02:15:47 -04:00
Dan Stillman
f1beeab5c0 Use read-only path for translators 2011-10-29 16:32:19 -04:00
Dan Stillman
6f165c9f65 Add translators as a submodule 2011-10-27 02:12:41 -04:00