Commit Graph

32 Commits

Author SHA1 Message Date
libraryupgrader 1b03bafb12 build: Updating browserslist to 4.16.6
* https://npmjs.com/advisories/1747 (CVE-2021-23364)

Change-Id: Id24db33314062bf1ebb324a160199a75ea8a5071
2021-05-28 02:48:48 +00:00
libraryupgrader a79dcd6299 build: Updating npm dependencies
* jsdoc: 3.6.3 → 3.6.7
  * https://npmjs.com/advisories/1674 (CVE-2021-23358)
* stylelint-config-wikimedia: 0.10.1 → 0.10.3
  * https://npmjs.com/advisories/1693 (CVE-2021-23368)
* lodash: 4.17.19 → 4.17.21
  * https://npmjs.com/advisories/1673 (CVE-2021-23337)
* html-webpack-plugin: 4.0.0-beta.11 → 4.5.2
  * https://npmjs.com/advisories/1673 (CVE-2021-23337)
* hosted-git-info: 2.8.8 → 2.8.9
  * https://npmjs.com/advisories/1677 (CVE-2021-23362)
* url-parse: 1.4.7 → 1.5.1
  * https://npmjs.com/advisories/1678 (CVE-2021-27515)
* @stylelint/postcss-markdown: 0.36.1 → 0.36.2
  * https://npmjs.com/advisories/1700 (CVE-2020-7753)
* websocket-extensions: 0.1.3 → 0.1.4
  * https://npmjs.com/advisories/1710 (CVE-2020-7662)

Change-Id: I39cf6b3998197938fff7126bf70c7b0e3ed0898a
2021-05-16 23:12:09 +00:00
libraryupgrader 37d7761eba build: Updating ssri to 6.0.2
* https://npmjs.com/advisories/565

Change-Id: Ic1e29c12fb0bdb01fc7d153d73509c1bfbe649f7
2021-04-15 13:55:13 +00:00
libraryupgrader 57326a0290 build: Updating y18n to 4.0.1
* https://npmjs.com/advisories/1654 (CVE-2020-7774)

Change-Id: Id525485ab8f37690c47394a110fa78295418c7e7
2021-03-30 13:02:47 +00:00
libraryupgrader 2ac57c85ea build: Updating elliptic to 6.5.4
* https://npmjs.com/advisories/1648 (CVE-2020-28498)

Change-Id: I7770e9015aa2da482aee8e59eee8245713f9eee7
2021-03-08 18:17:21 +00:00
libraryupgrader b5465a9841 build: Updating prismjs to 1.23.0
* https://npmjs.com/advisories/1638 (CVE-2021-23341)

Additional changes:
* Dropped .php5 and .inc files from .phpcs.xml (T200956).

Change-Id: If1118f28dbdf741ddbab89724aaab07624787f9c
2021-03-05 04:27:04 +00:00
libraryupgrader e3d48bca71 build: Updating npm dependencies
* bundlesize: 0.18.0 → 0.18.1
  * https://npmjs.com/advisories/1594 (CVE-2020-28168)
* github-build: 1.2.1 → 1.2.2
  * https://npmjs.com/advisories/1594 (CVE-2020-28168)

Change-Id: I6eab00d09acf94935fd22a5a2d3551109b599f21
2021-01-08 04:51:31 +00:00
libraryupgrader d49790d546 build: Updating npm dependencies
* node-fetch: 2.6.0 → 2.6.1
  * https://npmjs.com/advisories/1556 (CVE-2020-15168)
* elliptic: 6.5.2 → 6.5.3
  * https://npmjs.com/advisories/1547 (CVE-2020-13822)
* webpack: 4.43.0 → 4.44.2
  * https://npmjs.com/advisories/1548
* terser-webpack-plugin: 1.4.3 → 1.4.5
  * https://npmjs.com/advisories/1548
* bl: 4.0.2 → 4.0.3
  * https://npmjs.com/advisories/1555
* node-fetch: 2.6.0 → 2.6.1
  * https://npmjs.com/advisories/1556 (CVE-2020-15168)
* ini: 1.3.5 → 1.3.8
  * https://npmjs.com/advisories/1589

Additional changes:
* Added the "composer phan" command to conveniently run phan.

Change-Id: I5755f281e2916775999b53c74696515005758ed7
2021-01-03 19:13:50 +00:00
libraryupgrader c4cc51d744 build: Updating lodash to 4.17.19
* https://npmjs.com/advisories/1523
* CVE-2019-10744

Change-Id: Id98f8d8854499931f5d59de6ebfb02d56ea342a8
2020-07-11 15:46:35 +00:00
Ed Sanders 36e91dc04f build: Update devDependencies
Applies new ESLint documentation rules

Change-Id: I7fe458cf52e98baf92f3baec2d9ff54484326673
2020-07-01 14:43:39 -07:00
libraryupgrader 74e19abeec build: Updating npm dependencies
* stylelint-config-wikimedia: 0.9.0 → 0.10.1
* webpack: 4.42.1 → 4.43.0
  * https://npmjs.com/advisories/1179
* markdown-to-jsx: 6.11.0 → 6.11.4
  * https://npmjs.com/advisories/1219

Change-Id: I9fcae139a55916c1ad881583361f41b61d5fe641
2020-06-12 05:51:50 +00:00
Jan Drewniak a3acacc1a4 Add bundlesize test for ResourceLoader modules.
Adds a bundlesize test that measures the bytesize of
individual ResourceLoader modules.
This test depends on a running mediawiki instance as well as
the $MW_SERVER and $MW_SCRIPT_PATH environment variables.

ResourceLoader modules are fetched from a URL and piped
into a bundlesize command based on a custom configuration file.

The test can be run with `npm run test:size`.

Bug: T244276
Change-Id: I4f4534921ccbc6bd4f99229c8dd36b1279dde640
2020-06-11 19:51:20 +02:00
Libraryupgrader 1d0fd0bd1b build: Updating eslint-config-wikimedia to 0.15.3
Change-Id: Id8e58bed6af439ccbb12f8947b046c76e7b242c9
2020-04-30 12:47:54 -07:00
libraryupgrader a89c424181 build: Updating grunt-banana-checker to 0.9.0
Change-Id: Ia656ffd71cdbf846cadff005ea34a47bb78bad78
2020-04-17 23:31:20 +00:00
libraryupgrader bf16830b21 build: Updating npm dependencies
* webpack: 4.42.0 → 4.42.1
  * https://npmjs.com/advisories/1179
* cacache: 12.0.3 → 12.0.4
  * https://npmjs.com/advisories/1179
* mkdirp: 0.5.1 → 0.5.5
  * https://npmjs.com/advisories/1179
* postcss-sass: 0.4.2 → 0.4.4
  * https://npmjs.com/advisories/1179

Change-Id: I7d4b86c7bd6f0ce44007f2758e2b1612b69ba420
2020-04-05 14:08:32 +00:00
Stephen Niedzielski bd7bd75569 [JavaScript] Validate types
Lift the mists of confusion by checking that all JavaScript types align.
No ignores! This is the JavaScript equivalent to Phan.

This patch adds the necessary infrastructure for verifying typing and
fixes the few flaws found.

Bug: T239262
Change-Id: I2557471421196ea46cd13dfb786a52968fbfcc97
2020-03-16 09:10:08 -06:00
AronDemian cc6a7cca61 Remove unnecessary devdependency 'stylelint'
package-lock.json regenerated using the following process to ensure a clean slate:
rm -r node_modules package-lock.json  ;  npm i

Bug: T247004
Change-Id: Ie7720509ef37b178538a54854c28153ed73e375e
2020-03-13 06:50:23 +01:00
Stephen Niedzielski f4f7f3623c [dev] Run `npm t` on Git pre-commit hook
Execute `npm test` prior to committing. This saves back-and-forth with
Jenkins. This is the same configuration used by Popups,
MobileFrontend, MinervaNeue, NearbyPages, ContentTranslation, and
others.

Change-Id: If61ab4f28b0ccd38492d11a4cd8a92a97b2eb582
2020-03-11 07:49:48 -06:00
libraryupgrader 15041cf0ee build: Updating acorn to 6.4.1
* https://npmjs.com/advisories/1488

Change-Id: Ifed5a93c0cb894d5a15d5134bf72e0f8aab92c5a
2020-03-09 21:48:09 +00:00
libraryupgrader e9d9949048 build: Updating acorn to 7.1.1
* https://npmjs.com/advisories/1488

Change-Id: I4a6240c578be9b490cb824e24dbc252be60d9c7b
2020-03-08 19:06:33 +00:00
AronDemian b9968d9d93 build: Add 'svgo', SVG minifier script and unify SVGO rules
Adds:
- npm run svgmin
- .svgo.yaml: unified SVGO rules from Wikimedia coding conventions

Bug: T247004
Change-Id: I7017ecfebb811fa8d626747a830ad000774bbf2f
2020-03-07 19:47:58 -08:00
jenkins-bot 5b1d77fb9d Merge "Replace Grunt tasks with npm scripts in package.json" 2020-02-27 17:48:52 +00:00
Jan Drewniak 98b70067c9 Replace Grunt tasks with npm scripts in package.json
Adds the following npm scripts:
- npm run lint
- npm run lint:js
- npm run lint:styles
- npm run lint:i18n

Bug: T242781
Change-Id: I0c2cfce73a02029b9d0c4d329309aff477cb02d4
2020-02-27 16:32:12 +01:00
Nicholas Ray 7b7c948bf6 Add 'jsdoc-wmf-theme' to jsdoc
This adds the wmf theme styles to our jsdoc as can be seen on
https://doc.wikimedia.org/Parsoid/master/.

There is a caveat with this though. jsdoc-wmf-theme adds warnings for
unlinked symbols (e.g. 'return {jQuery}') [1] which causes the jsdoc doc
generation to fail since it is set to fail on warnings (we have it
configured with `pedantic: true`).

If we add the jsdoc-wmf-theme, we will need to be stricter about our
symbol usage which could be a good thing or just be tedious and
annoying.

What do you think?

[1] https://github.com/cscott/jsdoc-wmf-theme/blob/master/publish.js#L29

Bug: T239258
Change-Id: Icade62a278d7e685cbda28a8ca26a1b703e64f19
2020-02-14 10:43:46 -07:00
Nicholas Ray a79bb8dff4 build: Replace JSDuck with JSDoc
* jsdoc.json was copied from Minerva. The markdown plugin from that
config was removed since there no usages of that in Vector.

* Added latest jsdoc dependency to package.json

* Copied 'jsdoc' task from Minerva into Vector. Revised storybook output
so that multiple docs (storybook + jsdoc) could be in /docs

* Made collapsibleTabs.js JSDoc compliant (This was really the only
thing using jsduck syntax)

* Modified Gruntfile stylelinter to ignore docs folder

Bug: T239258
Change-Id: Id07d591ffe7bf0ac021109051e89b91ffdcf4c78
2020-02-14 10:29:00 -07:00
jdlrobson ea2bcd44f2 Add storybook to Vector
- Update package.json with the new dependencies.
- A script storybook.sh pulls down CSS and LESS imports from external
dependencies. This copies the approach taken in Popups and MobileFrontend.
- Icons from external repos are maintained within the repo in SVG-only form.
Using load.php modules is also possible, but will pull down other unnecessary icons
and break if any of these modules are changed. Decided that we should manually maintain
these for the time being given there are only 3 icons.
- Several LESS files now import the variables file. I think it's useful for stories
to only import the CSS they use as this encourages us to modularise our CSS. Before these
imports were not necessary as they inherit imports from index.less. This will have no impact
on the bundle size as the LESS compiler silently discards duplicate imports
- stories/utils.js provides a useful placeholder function for generalising our hook entry
points.

Bug: T242674
Change-Id: I722e84d2fb57653a2f96142dc3e5248043261746
2020-01-31 16:59:15 +08:00
libraryupgrader 24b72c8bfa build: Updating npm dependencies
* grunt-stylelint: 0.12.0 → 0.13.0
* stylelint-config-wikimedia: 0.7.0 → 0.8.0

Additional changes:
* Also sorted "composer fix" command to run phpcbf last.

Change-Id: I59abf3b90868ae225a70bc3c0ba287f2c2335c8b
2020-01-10 18:36:03 +00:00
Ed Sanders c61f6469db build: Update linters
Change-Id: I17a65638e0c7d074d4c1db282b278798e875fbe1
2019-10-31 21:43:20 +00:00
Ed Sanders 370f52e692 build: Update linters
Change-Id: I58969b531c70eba70a7fa7a8fc0ba1ad521ba9f5
2019-10-07 16:41:27 +01:00
libraryupgrader 9eacb7ea30 build: Updating eslint-utils to 1.4.2
* https://npmjs.com/advisories/1118

Additional changes:
* Added .eslintcache to .gitignore.

Change-Id: I4a30cdbb28b52a7b2f2745ba5d644778cd301fdf
2019-08-24 03:17:50 +00:00
libraryupgrader 7cc8756e6f build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 24.0.0 → 26.0.0

npm:
* lodash: 4.17.11 → 4.17.14
  * https://npmjs.com/advisories/1065
  * CVE-2019-10744
* set-value: 2.0.0 → 2.0.1
  * https://npmjs.com/advisories/1012
  * CVE-2019-10747
* union-value: 1.0.0 → 1.0.1
  * https://npmjs.com/advisories/1012
  * CVE-2019-10747
* mixin-deep: 1.3.1 → 1.3.2
  * https://npmjs.com/advisories/1013
  * CVE-2019-10746

Change-Id: If00a2166eb92474205bda4823643565eab6acb8f
2019-07-16 07:51:49 +00:00
libraryupgrader 5914274354 build: Updating npm dependencies for security issues
* Updated stylelint-config-wikimedia to 0.6.0, addressing:
  * https://npmjs.com/advisories/786

Committed package-lock.json (T179229) too.

Change-Id: I8eafeb13195b405344ea6ce3da85a4c0f1c4e2a8
2019-06-09 06:51:07 +00:00