Граф коммитов

142 Коммитов

Автор SHA1 Сообщение Дата
Alessandro Castellani aa951e8283 Bug 1854255 - Enforce prefer-const eslint rule in the whole mailnews/ directory. r=freaktechnik
Differential Revision: https://phabricator.services.mozilla.com/D191006

--HG--
extra : amend_source : fcf7dfdeb120778e28649841631a92a2dfc57062
2023-10-26 10:32:05 +01:00
Geoff Lankow eb3eff499a Bug 1835568 - Port bug 1648545 - Load SpecialPowers in XPCShellContentUtils. r=mkmelin
Port of some test changes in https://hg.mozilla.org/mozilla-central/rev/8dc935134f457937f7c945b823bbbdf9988b5c32

Differential Revision: https://phabricator.services.mozilla.com/D179318

--HG--
extra : rebase_source : 2d74a11166a787809562520324b839d4968458fb
extra : amend_source : 628bc31cd1fca8229cfa5a62057639ddc86358be
2023-05-29 12:02:12 +12:00
Rob Lemley 5af325a42f Bug 1833949 - Port bug 1826062: Automatic reformatting for Prettier 2.8.8. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D178538

--HG--
extra : amend_source : 1f4ecb957a2e2bf2bf6353b9ef43269d53ebab42
2023-05-21 15:05:52 +10:00
Rob Lemley 58f2dc08f0 Bug 1833949 - Port bug 1826062: Automatic reformatting for Prettier 2.0.5. r=leftmostcat
Differential Revision: https://phabricator.services.mozilla.com/D178537

--HG--
extra : amend_source : 4c543c3aeea4bb0a59407f358166956d9026e6a2
2023-05-21 15:05:24 +10:00
Magnus Melin fe9d2f7246 Bug 1801529 - mozilla/valid-jsdoc automatic fixups across the Thunderbird codebase. r=aleca
This is the automatic fixes + whitespace fixup:

find . -type f -not -path "./suite/*" -name "*.js" -exec sed -i -E 's/\* @returns +/* @returns /g' {} \;
find . -type f -not -path "./suite/*" -name "*.jsm" -exec sed -i -E 's/\* @returns +/* @returns /g' {} \;

find . -type f -not -path "./suite/*" -name "*.js" -exec sed -i -E 's/\* (@returns \{.+\}) +/* \1 /g' {} \;
find . -type f -not -path "./suite/*" -name "*.jsm" -exec sed -i -E 's/\* (@returns \{.+\}) +/* \1 /g' {} \;

find . -type f -not -path "./suite/*" -name "*.js" -exec sed -i -E 's/\*( @param)( \S+ \S+ ) +/*\1\2- /g' {} \;
find . -type f -not -path "./suite/*" -name "*.jsm" -exec sed -i -E 's/\*( @param)( \S+ \S+ ) +/*\1\2- /g' {} \;

find . -type f -not -path "./suite/*" -name "*.js" -exec sed -i -E 's/\*( @param[^-]*)( - - )/*\1 - /g' {} \;
find . -type f -not -path "./suite/*" -name "*.jsm" -exec sed -i -E 's/\*( @param[^-]*)( - - )/*\1 - /g' {} \;

Differential Revision: https://phabricator.services.mozilla.com/D162704

--HG--
extra : rebase_source : 4307935e658ce38943af522b17ce6b1c0d99dfdd
2022-11-23 15:43:25 +11:00
Martin Giger 5f617743e0 Bug 1801272 - Convert imports of modules from testing/ to ESM. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D162373

--HG--
extra : rebase_source : cf6272b43faaea35793235708edbfc94c407fc9f
2022-11-19 20:04:39 +11:00
Ping Chen 3e0746c440 Bug 1800305 - Fix importing .vcf file with \r\r\n as line breaks. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D162082

--HG--
extra : amend_source : 3702cf3af4de2b5e52981847b05164c59bc7e338
2022-11-15 06:44:43 +00:00
Martin Giger ea05927888 Bug 1792869 - Convert XPCOMUtils imports to esm in mailnews/. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D159063

--HG--
extra : rebase_source : 332a690910fc8c17ac702d3af4e3693faede08e0
extra : amend_source : cd0bb3cabc7d2322bec1024b82f5fd89b5fe6899
2022-10-12 21:41:55 +11:00
Geoff Lankow 2c2be3af27 Bug 1776129 - Add Custom1-4 fields to Address Book UI. r=aleca
This converts nsIAbCard style Custom[1-4] properties to X-Custom[1-4] vCard properties when a card is edited. Since the properties could exist in either form a number of hacks have been deployed.

Differential Revision: https://phabricator.services.mozilla.com/D153550

--HG--
extra : rebase_source : a793101ae36434240acca28e3892fe083520b170
2022-08-03 15:47:58 +12:00
Magnus Melin 658036deef Bug 1779145 - Port bug 1667455 to Thunderbird - Expose a "Services" property on all privileged JS scopes (like Cu/Cc/Ci). r=leftmostcat
Changed prettier printWidth to 100 to put Services.jsm on one line, prettified and then
   grep -rEl "/Services.jsm" --exclude-dir=.hg --exclude-dir=suite --include="*.js" --include="*.jsm" --exclude=".*" . | xargs xargs sed -i -e '/\/Services.jsm/d'

Differential Revision: https://phabricator.services.mozilla.com/D151575

--HG--
extra : rebase_source : 43da2706d3b30f5062511cedd527e9fb65631f02
extra : amend_source : 863bfd4ad3930f4fe4ed0b3dba6061370118f9a5
2022-07-18 20:26:40 +10:00
Ping Chen 019e2a7e58 Bug 1779865 - Fix test_winmail.js broken by bug 1745033. r=mkmelin
The problem is when a NNTP server has no username

nsMsgIncomingServer.cpp returns null
MsgIncomingServer.jsm returns ""

Differential Revision: https://phabricator.services.mozilla.com/D151968

--HG--
extra : amend_source : 524a0653ae95b1137ca536b320f048a07d28c159
2022-07-16 19:19:00 +10:00
Ping Chen b0914c4ba8 Bug 1773827 - Support importing tags in ThunderbirdProfileImporter. r=freaktechnik
Differential Revision: https://phabricator.services.mozilla.com/D149347

--HG--
extra : amend_source : 2a455ad9819fc18d02b5f0c4ac3e289e049d1e9c
2022-06-15 13:57:18 +03:00
Geoff Lankow 2474ffb924 Bug 469209 - Implement address book cards as vCard. r=mkmelin
This adds the actual support for vCard to AddrBookCard. The vCard data for a card is stored as a string in the _vCard property, as is already the case for CardDAV cards.

To avoid parsing the entire vCard unnecessarily, common properties are also stored in the database and used where possible. These properties can no longer be set directly on the card to prevent problems.

Differential Revision: https://phabricator.services.mozilla.com/D140511

--HG--
rename : mailnews/addrbook/test/unit/test_basic_nsIAbCard.js => mailnews/addrbook/test/unit/test_abCardProperty.js
rename : mailnews/addrbook/test/unit/test_basic_nsIAbCard.js => mailnews/addrbook/test/unit/test_addrBookCard.js
extra : rebase_source : dedffb9df1e7132e57e45a190afa6aac1f708fd7
extra : amend_source : c4382bad2f336131e990909427399c0d640e129e
extra : intermediate-source : de03039b751eb5fb100b1cb23e61ac226697833a
extra : source : 7b39663ee99159f5fb88c72b66c7e548109b6b92
2022-03-01 15:36:08 +13:00
Ping Chen 2c4a2eada2 Bug 1720042 - Prevent error when importing servers without directory. r=benc
Differential Revision: https://phabricator.services.mozilla.com/D141713

--HG--
extra : rebase_source : c3d84d366d8f2adf18b6f463a8a085fc7efa893f
extra : histedit_source : 379cc0efc279476960716ad7cff3e376d9b6af32
2022-03-22 05:45:22 +00:00
Ping Chen 9bcc0f011f Bug 1760728 - Support importing non-UTF8 csv file to address book. r=benc
Introduce MailStringUtils.jsm to read and detect the charset of a file, then convert to DOMString.

Differential Revision: https://phabricator.services.mozilla.com/D141715

--HG--
extra : amend_source : 4b3172060dc4fb8070b6d227d1accf4d8a261bfa
2022-03-23 12:10:03 +02:00
Ping Chen 303164214f Bug 1746809 - Use calendar.list.sortOrder when importing calendars. r=benc
Differential Revision: https://phabricator.services.mozilla.com/D141180

--HG--
extra : amend_source : 7bd053dae81122a791e6dcb21428cb83caf77785
2022-03-22 12:02:12 +02:00
Ping Chen a3243ae9e8 Bug 159967 - Support importing semicolon separated csv file to address book. r=benc
Differential Revision: https://phabricator.services.mozilla.com/D141060

--HG--
extra : amend_source : 501b5143b8de76d367da6174b77ea46090e9751a
2022-03-22 11:59:20 +02:00
John Bieling 3e8e426018 Bug 1665511 - Add spacesToolbar API. r=aleca,darktrojan
Differential Revision: https://phabricator.services.mozilla.com/D140495

--HG--
extra : amend_source : 3f199660f1f53b4583570bb2d66d197372f9f9cd
2022-03-19 12:25:11 +02:00
Geoff Lankow 2b59b58f3c Bug 1758460 - Get rid the PreferMailFormat address book card property. r=mkmelin,BenB
Differential Revision: https://phabricator.services.mozilla.com/D140512

--HG--
extra : rebase_source : 187f6afd1557263d8d840a1ed086d099d9cf5de2
extra : amend_source : b158c3e436a8e70e4316a5685cb0492e3affa8e9
2022-03-07 22:51:11 +13:00
Ping Chen 3c3190b292 Bug 1720042 - Fix importing CSV file in test_AddrBookFileImporter.js. r=benc
Differential Revision: https://phabricator.services.mozilla.com/D140692

--HG--
extra : amend_source : 91dadcad5846230a863c73a311778d472777750e
2022-03-10 12:15:01 +02:00
Ping Chen 6a82a3cbd8 Bug 1720042 - Support importing csv/tsv file in AddrBookFileImporter.jsm. r=benc
Differential Revision: https://phabricator.services.mozilla.com/D140016
2022-03-02 05:41:06 +00:00
Ping Chen 48bbaee77d Bug 1720042 - Support importing ldif/vcard file in AddrBookFileImporter.jsm. r=benc
Differential Revision: https://phabricator.services.mozilla.com/D139685

--HG--
extra : amend_source : 11f40f6336b936f853fa59f375e34b8b5026c62a
2022-03-01 11:55:55 +02:00
Ping Chen 5ec121c1d4 Bug 1720042 - Ignore msf files when copying msg folders into Local Folders. r=darktrojan,benc
- If msf files are copied, imported special folders can't be deleted
- Also create a wrap folder when importing mail messages into Local Folders

Differential Revision: https://phabricator.services.mozilla.com/D138988

--HG--
extra : amend_source : 86d29609a2902bf39c7dcffc79a59798533a5362
2022-02-18 12:48:06 +02:00
Magnus Melin 96be3cc78e Bug 1755827 - disable test_mergeLocalFolders until we get it fixed. rs=me 2022-02-17 12:25:58 +02:00
Ping Chen ab9cfbe560 Bug 1720042 - Support merging Local Folders in ThunderbirdProfileImporter.js. r=darktrojan
If the source profile and current profile each has Local Folders, merge the source Local Folders as a subfolder in the current Local Folders.

Depends on D137111.

Differential Revision: https://phabricator.services.mozilla.com/D137399
2022-02-03 05:44:06 +00:00
Ping Chen 582ca7604a Bug 1720042 - Add a test for importing accounts in ThunderbirdProfileImporter.js. r=darktrojan
Fix importing account with multiple identities.

Differential Revision: https://phabricator.services.mozilla.com/D137111
2022-02-03 02:50:39 +00:00
Ben Campbell 44dfe53120 Bug 1682940 - Remove nsISimpleEnumerator use in nsIAbDirectory.childNodes and .childCards. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D107916

Depends on D107915

--HG--
extra : amend_source : 5aad0505fb0cfb78ddcf1795a9e63ac8d5200a10
2021-03-15 12:31:34 +02:00
Ben Campbell 5afc64da10 Bug 1682941 - Remove nsISimpleEnumerator from nsIMsgFolder.subFolders property. r=mkmelin 2021-02-12 21:31:17 +13:00
YUKI "Piro" Hiroshi 7a861ffb28 Bug 1685048 - Do not report NS_ERROR_NOT_IMPLEMENTED when an addressbook is imported from a text file successfully. r=darktrojan
Differential Revision: https://phabricator.services.mozilla.com/D101139

--HG--
extra : amend_source : be3bdba13c22b20a1e0bb4f6c3e5c5701547aecc
2021-01-08 08:50:22 +00:00
Joshua Cranmer d085fe3b41 Bug 1652354 - part ⅱ: Remove the TestMailImporter code. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D86729

--HG--
extra : amend_source : 9286ed37516614850094fe1ea8c7b217acf450ae
extra : histedit_source : 327403bc63db1837b9965a91ad0cbce2f1704f73%2C3a62a28e831940b31fd28e94c4094502a0d0e993
2020-12-21 14:19:44 +02:00
Ben Campbell 3269720087 Bug 1612240 - Followup. Rename TestMailImpoter to TestMailImporter. r=mkmelin 2020-12-08 11:43:49 +13:00
Ben Campbell a885c21eff Bug 1612240 - Remove nsIArray use from nsIImportMail. r=mkmelin 2020-12-08 12:54:09 +02:00
Rob Lemley 74c6535302 Bug 1672798 - Run black formatting on mozbuild and mozconfigure files. r=mkmelin
Bringing some sanity to our Python scripts.

Differential Revision: https://phabricator.services.mozilla.com/D95402

--HG--
extra : rebase_source : 7eed46d79663fa1f261bd64d9bc1c83c4867bfc4
extra : histedit_source : b8b700c76ab2fee92eb426b5a5b69dc86376e60f
2020-10-30 14:28:33 -04:00
aceman 5f5e336d31 Bug 1422622 - replace MockFactory with MockRegistrar in xpcshell tests. r=mkmelin 2020-10-12 17:57:45 +03:00
Geoff Lankow 0a60d34265 Bug 1652371 - Port bug 1649221 and bug 1649554. rs=bustage-fix CLOSED TREE
--HG--
extra : amend_source : cfc6361ee102cb0ee2e0c5b3497ec4a9b71688ca
2020-07-13 11:45:03 +12:00
Magnus Melin 217c5b0698 Bug 1645307 - Port bug 1603712 to Thunderbird (remove intl.charset.detector.ng.enabled). r=pmorris CLOSED TREE
Port of https://hg.mozilla.org/mozilla-central/rev/e53396cf1039

--HG--
extra : amend_source : 603de403bc4a4033b8f12b2a0774437573c309ee
2020-06-16 14:58:03 +03:00
Geoff Lankow e20a856614 Bug 1639430 - Create utility functions to use ICAL.js for parsing and encoding vCard. r=mkmelin
--HG--
extra : rebase_source : b5082be98f08bedef81adcb1de45c115c6f7a690
extra : histedit_source : 972c42a1d65b79ac160ca439b19a4e425ba3fba8
2020-05-20 10:42:35 +12:00
Geoff Lankow ba527aea7b Port bug 1536556 - Replace new Error(Cr.ERROR) with new Component.Exception. rs=linting DONTBUILD
This was done automatically with `mach eslint --fix`
2020-05-06 11:10:50 +12:00
Ben Campbell 9629df0f2e Bug 1612239 - Remove nsIArray usage in nsIMsgAccount. r=mkmelin,pmorris DONTBUILD
--HG--
extra : amend_source : b649729b1240ab3ecd7f1274e780c5b32595c905
2020-04-04 13:54:36 +03:00
Ben Campbell 97e7eb71d4 Bug 1620658 - Fix incorrect/missing testdata in windows settings-import tests. r=mkmelin
--HG--
extra : histedit_source : 80c2d14579969a24e71a95e25334a0eb18d8c118
2020-03-07 07:22:41 +13:00
Ben Campbell 64f99a59c4 Bug 1614846 - remove nsIArray use in nsIMsgAccountManager (part one: accounts). r=mkmelin
--HG--
extra : histedit_source : 0ae61a3d840bf390ad0175c1048195915e692910
2020-02-16 08:48:01 +13:00
Geoff Lankow 781a1e03d5 Bug 1614265 - Move escapedVCardToAbCard from nsIAbManager to nsIMsgVCardService. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D62393

--HG--
extra : moz-landing-system : lando
2020-02-12 23:16:44 +00:00
Geoff Lankow f193f0ce07 Bug 1614265 - Implement nsIAbManager in javascript. r=mkmelin
This revision recreates the manager only for the JS directory type. Other types
will be added in later revisions. As such, a number of tests are marked as
failing. Other code has been adjusted due to XPCOM behaving differently when
not crossing from C++ to/from javascript.

Also deleting a directory now notifies listeners after the file (if any) has
been closed and removed, instead of immediately.

Differential Revision: https://phabricator.services.mozilla.com/D62392

--HG--
extra : moz-landing-system : lando
2020-02-12 23:16:27 +00:00
Magnus Melin b54ce4f72b Bug 1529583 - rename all Thunderbird related modules to .jsm, capitalize names and fix some namings. r=pmorris,Fallen DONTBUILD
grep -rEl EXPORTED_SYMBOLS --exclude-dir=.hg --exclude-dir=suite --exclude-dir=editor --include="*.js" --exclude=".*" . | xargs -I '{}' bash -c 'oldpath=$1; oldname=$(basename $1); newname="${oldname/\.js/.jsm}";newname="${newname^}"; newname=$(sed -E "s/(.*)[_-](.)(.*)/\1\U\2\L\3/g" <<< $newname); newpath="${oldpath%/*}/$newname"; echo "$newname $oldpath $newpath"; hg mv $oldpath $newpath; grep -rEl $oldname --exclude-dir=.hg --exclude-dir=suite --exclude-dir=editor --exclude-dir=chat/protocols/matrix/ . | xargs sed -E -i "s/( |\\\"|'\''|\/)${oldname/./\\.}/\1$newname/g"' -- {}

hg revert calendar/test/modules/CalendarUtils.jsm
hg revert chat/protocols/matrix/

hg revert chat/protocols/xmpp/xmpp-authmechs.jsm

# change Utils.jsm to utils.jsm
sed -i -e 's/Utils.jsm/utils.jsm/g' mail/test/browser/shared-modules/moz.build

# there's the mozmill/utils.js file
find . -type f -not -path "*.hg/*" -not -path "suite/*" -not -path "editor/*" -exec sed -i 's#mozmill/Utils.jsm*"#mozmill/utils.jsm#g' {} \;

correct sorting in
/home/magnus/Code/tb/mozilla/comm/mailnews/db/gloda/modules/moz.build

* * *
Bug 1529583 - fix linting errors discovered by js -> jsm renaming.

TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/base/util/JXON.jsm:217:21 | 'document' is not defined. (no-undef)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/base/util/JsTreeSelection.jsm:7:7 | 'XPCOMUtils' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/base/util/TraceHelper.jsm:7:7 | 'XPCOMUtils' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Connotent.jsm:14:5 | 'LOG' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Databind.jsm:9:5 | 'DBC_LOG' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Datamodel.jsm:17:9 | 'MailServices' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Datamodel.jsm:24:43 | Replace `"resource:///modules/gloda/Utils.jsm"` with `⏎··"resource:///modules/gloda/Utils.jsm"⏎` (prettier/prettier)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Dbview.jsm:14:9 | 'Gloda' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Dbview.jsm:15:9 | 'GlodaMsgSearcher' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Everybody.jsm:8:5 | 'LOG' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Explattr.jsm:19:9 | 'GlodaUtils' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Explattr.jsm:19:43 | Replace `"resource:///modules/gloda/Utils.jsm"` with `⏎··"resource:///modules/gloda/Utils.jsm"⏎` (prettier/prettier)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Explattr.jsm:26:5 | 'EXT_BUILTIN' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Fundattr.jsm:12:43 | Replace `"resource:///modules/gloda/Utils.jsm"` with `⏎··"resource:///modules/gloda/Utils.jsm"⏎` (prettier/prettier)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Fundattr.jsm:14:9 | 'GlodaDatastore' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Fundattr.jsm:20:9 | 'MimeType' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Gloda.jsm:22:9 | 'GlodaDatabind' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Gloda.jsm:34:43 | Replace `"resource:///modules/gloda/Utils.jsm"` with `⏎··"resource:///modules/gloda/Utils.jsm"⏎` (prettier/prettier)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/IndexAb.jsm:10:9 | 'GlodaDatastore' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/IndexAb.jsm:21:9 | 'GlodaUtils' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/IndexAb.jsm:21:43 | Replace `"resource:///modules/gloda/Utils.jsm"` with `⏎··"resource:///modules/gloda/Utils.jsm"⏎` (prettier/prettier)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/IndexMsg.jsm:17:9 | 'XPCOMUtils' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/IndexMsg.jsm:30:43 | Replace `"resource:///modules/gloda/Utils.jsm"` with `⏎··"resource:///modules/gloda/Utils.jsm"⏎` (prettier/prettier)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/IndexMsg.jsm:84:5 | 'JUNK_HAM_SCORE_STR' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Indexer.jsm:15:9 | 'XPCOMUtils' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Indexer.jsm:22:43 | Replace `"resource:///modules/gloda/Utils.jsm"` with `⏎··"resource:///modules/gloda/Utils.jsm"⏎` (prettier/prettier)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Log4moz.jsm:9:5 | 'MODE_RDONLY' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Log4moz.jsm:13:5 | 'MODE_TRUNCATE' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Log4moz.jsm:16:5 | 'PERMS_DIRECTORY' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Mimemsg.jsm:15:9 | 'XPCOMUtils' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Mimemsg.jsm:19:5 | 'EMITTER_MIME_CODE' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Suffixtree.jsm:42:5 | 'print' is not defined. (no-undef)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/db/gloda/modules/Suffixtree.jsm:388:10 | 'examplar' is defined but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/test/fakeserver/Imapd.jsm:500:5 | 'IMAP_FLAG_CASE_INSENSITIVE' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/test/fakeserver/Imapd.jsm:516:5 | 'IMAP_NAMESPACE_OTHER_USERS' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/test/fakeserver/Imapd.jsm:517:5 | 'IMAP_NAMESPACE_SHARED' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/test/resources/IMAPpump.jsm:20:7 | 'XPCOMUtils' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/test/resources/IMAPpump.jsm:29:7 | 'AuthPLAIN' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/test/resources/IMAPpump.jsm:29:18 | 'AuthLOGIN' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/test/resources/IMAPpump.jsm:29:29 | 'AuthCRAM' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/test/resources/MailTestUtils.jsm:12:7 | 'XPCOMUtils' is assigned a value but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/test/resources/MessageGenerator.jsm:805:10 | 'addMessagesToFolder' is defined but never used. (no-unused-vars)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/comm/mailnews/test/resources/MockFactory.jsm:7:7 | 'XPCOMUtils' is assigned a value but never used. (no-unused-vars)
* * *
Bug 1529583 - part tree, cleanup and improve some module namings

declare -A x
x["Bond.jsm"]="BondOpenPGP.jsm"
x["Gnupg.jsm"]="GnuPGCryptoAPI.jsm"
x["RnpCryptoapi.jsm"]="RNPCryptoAPI.jsm"
x["Connotent.jsm"]="GlodaContent.jsm"
x["Databind.jsm"]="GlodaDatabind.jsm"
x["Datamodel.jsm"]="GlodaDataModel.jsm"
x["Datastore.jsm"]="GlodaDatastore.jsm"
x["Dbview.jsm"]="GlodaSyntheticView.jsm"
x["Explattr.jsm"]="GlodaExplicitAttr.jsm"
x["Fundattr.jsm"]="GlodaFundAttr.jsm"
x["IndexAb.jsm"]="GlodaMsgIndexer.jsm"
x["Indexer.jsm"]="GlodaIndexer.jsm"
x["Mimemsg.jsm"]="MimeMessage.jsm"
x["MsgSearch.jsm"]="GlodaMsgSearcher.jsm"
x["Public.jsm"]="GlodaPublic.jsm"
x["Query.jsm"]="GlodaQueryClassFactory.jsm"
x["Suffixtree.jsm"]="SuffixTree.jsm"
#x["Utils.js"]="GlodaUtils.jsm"

for f in "${!x[@]}"; do
  export newname=${x[$f]}
  find . -type f -not -path "*.hg/*" -name $f | xargs -I '{}' bash -c 'oldpath=$1; oldname=$(basename $1); newpath="${oldpath%/*}/$newname"; echo " newname=$newname $oldpath -> $newpath"; hg mv $oldpath $newpath; grep -rEl $oldname --exclude-dir=.hg --exclude-dir=suite --exclude-dir=editor --exclude-dir=chat/protocols/matrix/ . | xargs sed -E -i "s/( |\\\"|'\''|\/)${oldname/./\\.}/\1$newname/g"' -- {}
done;

hg mv mailnews/db/gloda/modules/Utils.jsm mailnews/db/gloda/modules/GlodaUtils.jsm
grep -rEl --exclude-dir=.hg --exclude-dir=suite --exclude-dir=editor "gloda/Utils.jsm" . | xargs sed -i 's#gloda/Utils.jsm#gloda/GlodaUtils.jsm#g'

# manually sort mailnews/db/gloda/modules/moz.build

# manually update some ical.js references to be that as it's the project name

--HG--
rename : calendar/base/modules/ical.js => calendar/base/modules/Ical.jsm
rename : mail/components/appIdleManager.js => mail/components/AppIdleManager.jsm
rename : mail/components/about-support/aboutSupportMac.js => mail/components/about-support/AboutSupportMac.jsm
rename : mail/components/about-support/aboutSupportUnix.js => mail/components/about-support/AboutSupportUnix.jsm
rename : mail/components/about-support/aboutSupportWin32.js => mail/components/about-support/AboutSupportWin32.jsm
rename : mail/components/wintaskbar/windowsJumpLists.js => mail/components/wintaskbar/WindowsJumpLists.jsm
rename : mail/extensions/openpgp/content/bond.js => mail/extensions/openpgp/content/BondOpenPGP.jsm
rename : mail/extensions/openpgp/content/modules/cryptoAPI/gnupg.js => mail/extensions/openpgp/content/modules/cryptoAPI/GnuPGCryptoAPI.jsm
rename : mail/extensions/openpgp/content/modules/cryptoAPI/rnp-cryptoAPI.js => mail/extensions/openpgp/content/modules/cryptoAPI/RNPCryptoAPI.jsm
rename : mailnews/base/src/virtualFolderWrapper.js => mailnews/base/src/VirtualFolderWrapper.jsm
rename : mailnews/base/util/errUtils.js => mailnews/base/util/ErrUtils.jsm
rename : mailnews/base/util/IOUtils.js => mailnews/base/util/IOUtils.jsm
rename : mailnews/base/util/JXON.js => mailnews/base/util/JXON.jsm
rename : mailnews/base/util/jsTreeSelection.js => mailnews/base/util/JsTreeSelection.jsm
rename : mailnews/base/util/mailnewsMigrator.js => mailnews/base/util/MailnewsMigrator.jsm
rename : mailnews/base/util/msgDBCacheManager.js => mailnews/base/util/MsgDBCacheManager.jsm
rename : mailnews/base/util/StringBundle.js => mailnews/base/util/StringBundle.jsm
rename : mailnews/base/util/templateUtils.js => mailnews/base/util/TemplateUtils.jsm
rename : mailnews/base/util/traceHelper.js => mailnews/base/util/TraceHelper.jsm
rename : mailnews/db/gloda/modules/collection.js => mailnews/db/gloda/modules/Collection.jsm
rename : mailnews/db/gloda/modules/everybody.js => mailnews/db/gloda/modules/Everybody.jsm
rename : mailnews/db/gloda/modules/facet.js => mailnews/db/gloda/modules/Facet.jsm
rename : mailnews/db/gloda/modules/gloda.js => mailnews/db/gloda/modules/Gloda.jsm
rename : mailnews/db/gloda/modules/connotent.js => mailnews/db/gloda/modules/GlodaContent.jsm
rename : mailnews/db/gloda/modules/datamodel.js => mailnews/db/gloda/modules/GlodaDataModel.jsm
rename : mailnews/db/gloda/modules/databind.js => mailnews/db/gloda/modules/GlodaDatabind.jsm
rename : mailnews/db/gloda/modules/datastore.js => mailnews/db/gloda/modules/GlodaDatastore.jsm
rename : mailnews/db/gloda/modules/explattr.js => mailnews/db/gloda/modules/GlodaExplicitAttr.jsm
rename : mailnews/db/gloda/modules/fundattr.js => mailnews/db/gloda/modules/GlodaFundAttr.jsm
rename : mailnews/db/gloda/modules/indexer.js => mailnews/db/gloda/modules/GlodaIndexer.jsm
rename : mailnews/db/gloda/modules/index_ab.js => mailnews/db/gloda/modules/GlodaMsgIndexer.jsm
rename : mailnews/db/gloda/modules/msg_search.js => mailnews/db/gloda/modules/GlodaMsgSearcher.jsm
rename : mailnews/db/gloda/modules/public.js => mailnews/db/gloda/modules/GlodaPublic.jsm
rename : mailnews/db/gloda/modules/query.js => mailnews/db/gloda/modules/GlodaQueryClassFactory.jsm
rename : mailnews/db/gloda/modules/dbview.js => mailnews/db/gloda/modules/GlodaSyntheticView.jsm
rename : mailnews/db/gloda/modules/utils.js => mailnews/db/gloda/modules/GlodaUtils.jsm
rename : mailnews/db/gloda/modules/index_msg.js => mailnews/db/gloda/modules/IndexMsg.jsm
rename : mailnews/db/gloda/modules/log4moz.js => mailnews/db/gloda/modules/Log4moz.jsm
rename : mailnews/db/gloda/modules/mimemsg.js => mailnews/db/gloda/modules/MimeMessage.jsm
rename : mailnews/db/gloda/modules/mimeTypeCategories.js => mailnews/db/gloda/modules/MimeTypeCategories.jsm
rename : mailnews/db/gloda/modules/noun_freetag.js => mailnews/db/gloda/modules/NounFreetag.jsm
rename : mailnews/db/gloda/modules/noun_mimetype.js => mailnews/db/gloda/modules/NounMimetype.jsm
rename : mailnews/db/gloda/modules/noun_tag.js => mailnews/db/gloda/modules/NounTag.jsm
rename : mailnews/db/gloda/modules/suffixtree.js => mailnews/db/gloda/modules/SuffixTree.jsm
rename : mailnews/test/fakeserver/auth.js => mailnews/test/fakeserver/Auth.jsm
rename : mailnews/test/fakeserver/imapd.js => mailnews/test/fakeserver/Imapd.jsm
rename : mailnews/test/fakeserver/maild.js => mailnews/test/fakeserver/Maild.jsm
rename : mailnews/test/fakeserver/nntpd.js => mailnews/test/fakeserver/Nntpd.jsm
rename : mailnews/test/fakeserver/pop3d.js => mailnews/test/fakeserver/Pop3d.jsm
rename : mailnews/test/fakeserver/smtpd.js => mailnews/test/fakeserver/Smtpd.jsm
rename : mailnews/test/resources/IMAPpump.js => mailnews/test/resources/IMAPpump.jsm
rename : mailnews/test/resources/localAccountUtils.js => mailnews/test/resources/LocalAccountUtils.jsm
rename : mailnews/test/resources/mailTestUtils.js => mailnews/test/resources/MailTestUtils.jsm
rename : mailnews/test/resources/messageGenerator.js => mailnews/test/resources/MessageGenerator.jsm
rename : mailnews/test/resources/MockFactory.js => mailnews/test/resources/MockFactory.jsm
extra : amend_source : 810c5e4724ae28add2f66a87e88bc144578425e8
2020-01-25 12:05:55 +02:00
Khushil Mistry 26b9a60a50 Bug 1594000 - Convert remaining nsISimpleEnumerator users to use JS iteration in /mailnews. r=mkmelin 2020-01-13 09:32:02 +02:00
Ben Campbell 1ecbd035ad Bug 1602816 - reinstate charset detection related tests: test_detectAttachmentCharset.js, test_messageHeaders.js, test_shiftjis_csv.js. 2019-12-17 14:05:04 +02:00
Magnus Melin b72ef3ca26 Bug 1602816 - temporarily disable charset detection related test: test_detectAttachmentCharset.js, test_messageHeaders.js, test_shiftjis_csv.js. rs=bustage-fix 2019-12-16 14:51:15 +02:00
Khushil Mistry 2cd0230d32 Bug 1562313 - Convert JavaScript components to use static registration in mailnews/. r=mkmelin
--HG--
rename : mailnews/addrbook/src/nsAbAutoCompleteMyDomain.js => mailnews/addrbook/src/AbAutoCompleteMyDomain.jsm
rename : mailnews/addrbook/src/nsAbAutoCompleteSearch.js => mailnews/addrbook/src/AbAutoCompleteSearch.jsm
rename : mailnews/addrbook/src/nsAbLDAPAttributeMap.js => mailnews/addrbook/src/AbLDAPAttributeMap.jsm
rename : mailnews/addrbook/src/nsAbLDAPAutoCompleteSearch.js => mailnews/addrbook/src/AbLDAPAutoCompleteSearch.jsm
rename : mailnews/base/search/src/nsMsgTraitService.js => mailnews/base/search/src/MsgTraitService.jsm
rename : mailnews/base/src/folderLookupService.js => mailnews/base/src/FolderLookupService.jsm
rename : mailnews/base/src/nsMailNewsCommandLineHandler.js => mailnews/base/src/MailNewsCommandLineHandler.jsm
rename : mailnews/base/src/newMailNotificationService.js => mailnews/base/src/MailNotificationService.jsm
rename : mailnews/base/src/msgAsyncPrompter.js => mailnews/base/src/MsgAsyncPrompter.jsm
rename : mailnews/base/src/msgOAuth2Module.js => mailnews/base/src/OAuth2Module.jsm
rename : mailnews/compose/src/nsSMTPProtocolHandler.js => mailnews/compose/src/SMTPProtocolHandler.jsm
rename : mailnews/db/gloda/components/glautocomp.js => mailnews/db/gloda/components/GlodaAutoComplete.jsm
rename : mailnews/db/gloda/components/jsmimeemitter.js => mailnews/db/gloda/components/MimeMessageEmitter.jsm
rename : mailnews/extensions/dsn/src/dsn-service.js => mailnews/extensions/dsn/src/DSNService.jsm
rename : mailnews/extensions/mdn/src/mdn-service.js => mailnews/extensions/mdn/src/MDNService.jsm
rename : mailnews/extensions/newsblog/js/newsblog.js => mailnews/extensions/newsblog/content/NewsBlog.jsm
rename : mailnews/extensions/offline-startup/js/offlineStartup.js => mailnews/extensions/offline-startup/OfflineStartup.jsm
rename : mailnews/extensions/smime/src/smime-service.js => mailnews/extensions/smime/src/SMIMEService.jsm
rename : mailnews/import/test/unit/resources/TestMailImporter.js => mailnews/import/test/unit/resources/TestMailImporter.jsm
rename : mailnews/jsaccount/test/unit/resources/testJaMsgProtocolInfoComponent.js => mailnews/jsaccount/test/unit/resources/TestJaMsgProtocolInfoComponent.jsm
rename : mailnews/mime/src/mimeJSComponents.js => mailnews/mime/src/MimeJSComponents.jsm
rename : mailnews/news/src/nsNewsAutoCompleteSearch.js => mailnews/news/src/NewsAutoCompleteSearch.jsm
2019-11-12 13:03:00 +01:00
Geoff Lankow 78bfe8caa8 Bug 1587016 - Convert import code to use new address book provider. r=mkmelin 2019-10-12 11:26:11 +13:00
Paul Morris 8057711ec3 Bug 1577835 - Reformat mailnews/ code with eslint and Prettier. r=mkmelin
# ignore-this-changeset

These changes were achieved by:

1. Using eslint to add curly brackets to control
statements that did not have them (if, else, etc.),
thanks to the eslint rule: "curly": ["error", "all"]

Done by running |mach eslint mailnews/ --fix|

2. Reformatting the code using Prettier.

Done by deleting the mailnews/ line from
the .prettierignore file and running:
|mach eslint mailnews/ --fix|
2019-08-30 22:10:02 -04:00