zulip/tools
Anders Kaseorg c520890f54 node_tests: Remove low-hanging uses of __Rewire__.
When we were preparing the conversion to ES modules in 2019, the
primary obstacle was that the Node tests extensively relied on the
ability to reach into modules and mutate their CommonJS exports in
order to mock things.  ES module bindings are not mutable, so in
commit 173c9cee42 we added
babel-plugin-rewire-ts as a kludgy transpilation-based workaround for
this to unblock the conversion.

However, babel-plugin-rewire-ts is slow, buggy, nonstandard,
confusing, and unmaintained.  It’s incompatible with running our ES
modules as native ES modules, and prevents us from taking advantage of
modern tools for ES modules.  So we want to excise all use of
__Rewire__ (and the disallow_rewire, override_rewire helper functions
that rely on it) from the tests and remove babel-plugin-rewire-ts.

Commits 64abdc199e and
e17ba5260a (#20730) prepared for this by
letting us see where __Rewire__ is being used.  Now we go through and
remove most of the uses that are easy to remove without modifying the
production code at all.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-13 16:27:30 -07:00
..
ci nginx: Remove legacy X-XSS-Protection header. 2022-06-27 17:38:18 -07:00
documentation_crawler docs: Fix Git capitalization. 2022-02-28 16:04:35 -08:00
droplets droplets: Add a tool to clean up old hostnames in DNS. 2022-04-28 11:30:47 -07:00
i18n python: Replace universal_newlines with text. 2022-01-23 22:16:01 -08:00
lib requirements: Upgrade to Django 4.0. 2022-07-13 16:07:17 -07:00
linter_lib docs: Capitalize Handlebars consistently. 2022-06-27 13:35:10 -07:00
node_lib js: Elide .js and .ts extensions from imports and requires. 2020-09-01 16:43:02 -07:00
oneclickapps oneclick: Fail if the fab command fails. 2022-05-17 13:41:12 -07:00
setup requirements: Upgrade to Django 4.0. 2022-07-13 16:07:17 -07:00
test-install install: Support Ubuntu 22.04. 2022-02-25 14:49:07 -08:00
tests capitalization: Prune unused phrases from IGNORED_PHRASES. 2022-02-23 12:08:20 -08:00
wsl
zulip-export python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
README.md
__init__.py
build-docs tools: Use root-based absolute import for tools.lib, etc. 2021-07-05 12:21:52 -07:00
build-release-tarball build-release-tarball: Use OUTPUT_DIR environment variable, if set. 2022-07-07 13:19:00 -07:00
cache-zulip-git-version Rename default branch to ‘main’. 2021-09-06 12:56:35 -07:00
check-capitalization tools: Use root-based absolute import for tools.lib, etc. 2021-07-05 12:21:52 -07:00
check-frontend-i18n docs: Capitalize Handlebars consistently. 2022-06-27 13:35:10 -07:00
check-issue-labels docs: Fix many spelling mistakes. 2022-02-07 18:51:06 -08:00
check-openapi check-openapi: Automatically fix Prettier formatting errors. 2021-09-10 10:39:25 -07:00
check-provision tools: Rename force argument to skip-provision-check 2021-03-03 09:17:49 -08:00
check-schemas check_schema: Ignore operation field in schema validation for openapi. 2021-03-22 23:45:42 -07:00
check-templates logging: Pass more format arguments to logging. 2022-06-03 12:27:23 -07:00
check-thirdparty check-thirdparty: License under GPLv2+. 2022-06-26 17:33:11 -07:00
clean-branches Rename default branch to ‘main’. 2021-09-06 12:56:35 -07:00
commit-message-lint Rename default branch to ‘main’. 2021-09-06 12:56:35 -07:00
commit-msg requirements: Install gitlint from its Debian package. 2021-09-17 17:05:18 -07:00
conf.ini-template
coveragerc test-backend: Display test function in HTML coverage reports. 2022-05-16 16:38:02 -07:00
create-test-api-docs python: Remove locally dead code. 2021-08-19 01:51:37 -07:00
debug-require-webpack-plugin.ts debug-require-webpack-plugin: Handle missing chunkGraph. 2021-10-17 07:15:09 -07:00
debug-require.js webpack: Upgrade to Webpack 5. 2021-09-14 17:02:03 -07:00
deploy-branch Rename default branch to ‘main’. 2021-09-06 12:56:35 -07:00
diagnose python: Use Python 3.8 shlex.join function. 2022-04-27 12:57:49 -07:00
documentation.vnufilter Remove Ubuntu 18.04 support. 2022-01-21 17:26:14 -08:00
duplicate_commits.json
fetch-contributor-data python: Use Python 3.8 typing.{Protocol,TypedDict}. 2022-04-27 12:57:49 -07:00
fetch-pull-request tools: Avoid `readlink -f` in *-pull-request scripts. 2021-04-30 14:57:13 -07:00
fetch-rebase-pull-request Rename default branch to ‘main’. 2021-09-06 12:56:35 -07:00
find-unused-css styles: Rename .scss files back to .css. 2020-09-15 16:33:28 -07:00
generate-integration-docs-screenshot actions: Split out zerver.actions.create_user. 2022-04-14 17:14:35 -07:00
lint tools: Support running mypy daemon for better performance. 2022-07-06 17:33:13 -07:00
message-screenshot.js tools: Add support for generating integration screenshots remotely. 2021-04-19 10:44:43 -07:00
pre-commit tools: Rename force argument to skip-provision-check 2021-03-03 09:17:49 -08:00
provision Remove Debian 10 support. 2022-04-26 16:32:02 -07:00
push-to-pull-request Rename default branch to ‘main’. 2021-09-06 12:56:35 -07:00
rebuild-dev-database
rebuild-test-database shfmt: Reformat shell scripts with shfmt. 2020-10-15 15:16:00 -07:00
release release: Write a tool to automate final release checks and steps. 2022-07-07 13:19:00 -07:00
release-tarball-exclude.txt
renumber-migrations python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
reset-to-pull-request tools: Avoid `readlink -f` in *-pull-request scripts. 2021-04-30 14:57:13 -07:00
review python: Use Python 3.8 shlex.join function. 2022-04-27 12:57:49 -07:00
run-codespell run-codespell: Fix invocation with multiple arguments. 2021-10-28 09:59:27 -07:00
run-dev.py mypy: Enable local_partial_types. 2022-07-06 17:33:13 -07:00
run-mypy tools: Support running mypy daemon for better performance. 2022-07-06 17:33:13 -07:00
run-tsc
run-yarn-deduplicate
semgrep.yml logging: Pass more format arguments to logging. 2022-06-03 12:27:23 -07:00
setup-git-repo shfmt: Reformat shell scripts with shfmt. 2020-10-15 15:16:00 -07:00
show-profile-results python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
stop-run-dev python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
tail-ses tail-ses: Add a tool to tail SES delivery/bounce/complaint queues. 2022-05-06 17:49:00 -07:00
test-all test-all: Pass --skip-external-links to documentation tests. 2022-03-07 11:54:01 -08:00
test-api actions: Split out zerver.actions.realm_settings. 2022-04-14 17:14:37 -07:00
test-backend testing: 100% coverage for zerver/tests/test_digest.py. 2022-06-01 16:09:13 -07:00
test-documentation shfmt: Reformat shell scripts with shfmt. 2020-10-15 15:16:00 -07:00
test-help-documentation tools: Use root-based absolute import for tools.lib, etc. 2021-07-05 12:21:52 -07:00
test-js-with-node node_tests: Remove low-hanging uses of __Rewire__. 2022-07-13 16:27:30 -07:00
test-js-with-puppeteer python: Use Python 3.8 shlex.join function. 2022-04-27 12:57:49 -07:00
test-locked-requirements test-locked-requirements: Rename may_be_setup_cache to maybe_set_up_cache. 2022-01-12 13:21:35 -08:00
test-migrations requirements: Upgrade Python requirements. 2021-04-15 21:47:33 -07:00
test-queue-worker-reload actions: Delete zerver.lib.actions. 2022-04-14 17:14:38 -07:00
test-run-dev test-run-dev: Fix log file opening. 2021-08-02 15:53:52 -07:00
test-tools tools: Use root-based absolute import for tools.lib, etc. 2021-07-05 12:21:52 -07:00
total-contributions tools: Add per-repository commit counts in contributions tool. 2022-03-29 14:13:17 -07:00
update-locked-requirements requirements: Remove Thumbor. 2021-05-06 20:07:32 -07:00
update-prod-static docs: Add missing space in “time zone”. 2022-02-24 14:05:12 -08:00
update-zuliprc-api-field python: Replace universal_newlines with text. 2022-01-23 22:16:01 -08:00
upload-release upload-release: Only copy full releases to zulip-server-latest.tar.gz. 2022-06-23 19:24:54 -07:00
webpack webpack: Increase Node.js heap size on low-memory systems. 2021-09-22 16:01:01 -07:00
webpack.assets.json billing: Migrate to Stripe hosted checkout page. 2021-11-05 17:23:10 -07:00
webpack.dev-assets.json webpack: Introduce `webpack.dev-asset.json`. 2021-04-19 10:31:39 -07:00
zanitizer zanitizer: Reformat with perltidy. 2021-03-24 12:12:04 -07:00
zanitizer_config.pm.sample zanitizer: Reformat with perltidy. 2021-03-24 12:12:04 -07:00

README.md

This directory contains scripts that are used in building, managing, testing, and other forms of work in a Zulip development environment. Note that tools that are also useful in production belong in scripts/ or should be Django management commands.

For more details, see https://zulip.readthedocs.io/en/latest/overview/directory-structure.html.