Skip to content

Commit 2a39fd0

Browse files
author
epriestley
committed
Bring Javelin into Phabricator via git submodule, not copy-and-paste
Summary: Javelin is currently embedded in Phabricator via copy-and-paste of prebuilt packages. This is not so great. Pull it in as a submodule instead and make all the Phabriator resources declare proper dependency trees. Add Javelin linting. Test Plan: I tried to run through pretty much all the JS functionality on the site. This is still a high-risk change, but I did a pretty thorough test Differential: inline comments, revealing diffs, list tokenizers, comment preview, editing/deleting comments, add review action. Maniphest: list tokenizer, comment actions Herald: rule editing, tokenizers, add/remove rows Reviewed By: tomo Reviewers: aran, tomo, mroch, jungejason, tuomaspelkonen CC: aran, tomo, epriestley Differential Revision: 223
1 parent 846d625 commit 2a39fd0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+878
-4714
lines changed

.arcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"project_id" : "phabricator",
33
"conduit_uri" : "https://secure.phabricator.com/api/",
4-
"lint_engine" : "PhutilLintEngine",
4+
"lint_engine" : "PhabricatorLintEngine",
55
"unit_engine" : "PhutilUnitTestEngine",
66
"copyright_holder" : "Facebook, Inc.",
77
"remote_hooks_installed" : true,

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "externals/javelin"]
2+
path = externals/javelin
3+
url = git://github.com/epriestley/javelin.git

externals/javelin

Submodule javelin added at 099162f

scripts/celerity_mapper.php

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@
22
<?php
33

44
$package_spec = array(
5+
'javelin.pkg.js' => array(
6+
'javelin-util',
7+
'javelin-install',
8+
'javelin-event',
9+
'javelin-stratcom',
10+
'javelin-behavior',
11+
'javelin-request',
12+
'javelin-vector',
13+
'javelin-dom',
14+
'javelin-json',
15+
'javelin-uri',
16+
),
17+
'typeahead.pkg.js' => array(
18+
'javelin-typeahead',
19+
'javelin-typeahead-normalizer',
20+
'javelin-typeahead-source',
21+
'javelin-typeahead-preloaded-source',
22+
'javelin-typeahead-ondemand-source',
23+
'javelin-tokenizer',
24+
'javelin-behavior-aphront-basic-tokenizer',
25+
),
26+
'workflow.pkg.js' => array(
27+
'javelin-mask',
28+
'javelin-workflow',
29+
'javelin-behavior-workflow',
30+
),
531
'core.pkg.css' => array(
632
'phabricator-core-css',
733
'phabricator-core-buttons-css',
@@ -14,6 +40,7 @@
1440
'aphront-crumbs-view-css',
1541
'aphront-tokenizer-control-css',
1642
'aphront-typeahead-control-css',
43+
'aphront-list-filter-view-css',
1744

1845
'phabricator-directory-css',
1946

@@ -63,6 +90,7 @@
6390
->withType('f')
6491
->withSuffix('js')
6592
->withSuffix('css')
93+
->withFollowSymlinks(true)
6694
->setGenerateChecksums(true)
6795
->find();
6896

@@ -101,9 +129,10 @@
101129
$provides = array_filter($provides);
102130
$requires = array_filter($requires);
103131

104-
if (count($provides) !== 1) {
132+
if (count($provides) > 1) {
133+
// NOTE: Documentation-only JS is permitted to @provide no targets.
105134
throw new Exception(
106-
"File {$path} must @provide exactly one Celerity target.");
135+
"File {$path} must @provide at most one Celerity target.");
107136
}
108137

109138
$provides = reset($provides);

0 commit comments

Comments
 (0)