Anki/ts
Damien Elmes 616db33c0e refactor protobuf handling for split/import
In order to split backend.proto into a more manageable size, the protobuf
handling needed to be updated. This took more time than I would have
liked, as each language handles protobuf differently:

- The Python Protobuf code ignores "package" directives, and relies
solely on how the files are laid out on disk. While it would have been
nice to keep the generated files in a private subpackage, Protobuf gets
confused if the files are located in a location that does not match
their original .proto layout, so the old approach of storing them in
_backend/ will not work. They now clutter up pylib/anki instead. I'm
rather annoyed by that, but alternatives seem to be having to add an extra
level to the Protobuf path, making the other languages suffer, or trying
to hack around the issue by munging sys.modules.
- Protobufjs fails to expose packages if they don't start with a capital
letter, despite the fact that lowercase packages are the norm in most
languages :-( This required a patch to fix.
- Rust was the easiest, as Prost is relatively straightforward compared
to Google's tools.

The Protobuf files are now stored in /proto/anki, with a separate package
for each file. I've split backend.proto into a few files as a test, but
the majority of that work is still to come.

The Python Protobuf building is a bit of a hack at the moment, hard-coding
"proto" as the top level folder, but it seems to get the job done for now.

Also changed the workspace name, as there seems to be a number of Bazel
repos moving away from the more awkward reverse DNS naming style.
2021-07-10 19:17:05 +10:00
..
change-notetype refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
components refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
congrats refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
deck-options refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
editor add workaround for protobufjs requiring uppercase package names 2021-07-10 15:24:01 +10:00
graphs refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
html-filter support jsdom tests 2021-06-19 09:43:09 +10:00
lib refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
patches add workaround for protobufjs requiring uppercase package names 2021-07-10 15:24:01 +10:00
reviewer refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
sass More uniform file naming 2021-07-01 12:24:16 +02:00
svelte refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
sveltelib update ts deps 2021-05-26 09:37:40 +10:00
.eslintrc.js remove nested terneries and enable lint 2021-04-23 13:00:18 +10:00
.gitignore Update eslint to 4.22.0 2021-04-22 19:19:39 +02:00
.prettierignore run prettier on some sass files 2021-04-14 18:22:33 +10:00
.prettierrc initial Bazel conversion 2020-11-01 14:26:58 +10:00
BUILD.bazel add workaround for protobufjs requiring uppercase package names 2021-07-10 15:24:01 +10:00
compile_sass.bzl refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
copy.bzl include sourcemaps for pages/* in dev builds 2021-04-20 17:33:46 +10:00
esbuild.bzl move esbuild into separate repo 2021-04-15 10:53:49 +10:00
eslint.bzl initial Bazel conversion 2020-11-01 14:26:58 +10:00
format.sh make 'bazel run ts:format' work 2020-11-12 20:49:00 +10:00
images.d.ts define file extension in .d.ts so typescript doesn't complain 2021-03-28 16:15:28 +02:00
jest.bzl support jsdom tests 2021-06-19 09:43:09 +10:00
jest.config.js fix jest 2021-04-12 09:43:31 +10:00
licenses.json unpin bootstrap now that 5.0.1 is out 2021-06-29 11:25:14 +10:00
package.json add workaround for protobufjs requiring uppercase package names 2021-07-10 15:24:01 +10:00
prettier.bzl make 'bazel run ts:format' work 2020-11-12 20:49:00 +10:00
protobuf-no-long.js add a hack to avoid Long.js in Jest tests 2021-04-17 17:05:48 +10:00
protobuf.bzl force number in protobuf generation 2021-04-12 14:33:20 +10:00
README.md add add.sh helper for adding dependency and updating licenses 2020-12-31 12:20:51 +10:00
sql_format.bzl move exports_files call into ts/BUILD.bazel 2021-01-09 18:03:26 +10:00
sql_format.ts Import createPatch in ts/sql_format directly 2021-04-22 18:43:35 +02:00
tsconfig.json Fix remaining errors in editor/*.svelte files 2021-05-07 15:10:28 +02:00
update-licenses.sh add add.sh helper for adding dependency and updating licenses 2020-12-31 12:20:51 +10:00
update.sh add add.sh helper for adding dependency and updating licenses 2020-12-31 12:20:51 +10:00
vendor.bzl add workaround for protobufjs requiring uppercase package names 2021-07-10 15:24:01 +10:00
yarn.lock add workaround for protobufjs requiring uppercase package names 2021-07-10 15:24:01 +10:00
yarn.sh Replace individual d3 libraries with encompassing d3 2021-01-30 00:00:22 +01:00

Anki's TypeScript and Sass dependencies. Some TS/JS code is also stored separately in ../qt/aqt/data/web/.

To update all dependencies:

./update.sh

To add a new dev dependency, use something like:

./add.sh -D @rollup/plugin-alias