Skip to content

Commit

Permalink
Merge branch 'master' into issue/3030
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeHyeonKim19 authored Jun 5, 2020
2 parents fcdb971 + 63eb80b commit 80e75c8
Show file tree
Hide file tree
Showing 228 changed files with 20,453 additions and 11,225 deletions.
14 changes: 12 additions & 2 deletions .eleventy.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
'use strict';

module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(
require('@11ty/eleventy-plugin-inclusive-language'),
{
words:
'simply,obviously,basically,of course,clearly,everyone knows,however,easy'
}
);

eleventyConfig.addPassthroughCopy('docs/css');
eleventyConfig.addPassthroughCopy('docs/js');
eleventyConfig.addPassthroughCopy('docs/images');
eleventyConfig.addPassthroughCopy('docs/CNAME');
eleventyConfig.addPassthroughCopy('docs/_headers');
eleventyConfig.addPassthroughCopy('docs/favicon.ico');

eleventyConfig.addPassthroughCopy('docs/example');

/* Markdown Plugins */
const markdown = require('markdown-it')({
html: true,
linkify: true
linkify: true,
typographer: true
});

markdown.use(require('markdown-it-anchor'), {
Expand All @@ -31,6 +39,8 @@ module.exports = function(eleventyConfig) {

markdown.use(require('markdown-it-prism'));

markdown.use(require('markdown-it-emoji'));

eleventyConfig.setLibrary('md', markdown);

return {
Expand Down
5 changes: 4 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
coverage/
mocha.js
*.fixture.js
docs/
docs/_site
docs/_dist
docs/example
out/
!lib/mocha.js
test/integration/fixtures
!.*.js
*.min.js
64 changes: 42 additions & 22 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,63 @@ extends:
- semistandard
- plugin:prettier/recommended
env:
node: yes
browser: yes
node: true
browser: true
parserOptions:
ecmaVersion: 5
ecmaFeatures:
globalReturn: no
jsx: no
jsx: false
sourceType: script
rules:
strict:
- error
- safe
# disallow Object.assign
no-restricted-properties:
- error
- object: 'Object'
property: 'assign'
overrides:
- files:
- scripts/**/*.js
- package-scripts.js
- karma.conf.js
- .wallaby.js
- .eleventy.js
- bin/*
- lib/cli/**/*.js
- test/node-unit/**/*.js
- test/integration/options/watch.spec.js
- test/integration/helpers.js
- lib/growl.js
- 'docs/js/**/*.js'
env:
node: false
- files:
- '.eleventy.js'
- '.wallaby.js'
- 'package-scripts.js'
- 'karma.conf.js'
- 'bin/*'
- 'docs/_data/**/*.js'
- 'lib/cli/**/*.js'
- 'lib/nodejs/**/*.js'
- 'scripts/**/*.js'
- 'test/integration/helpers.js'
- 'test/integration/options/watch.spec.js'
- 'test/node-unit/**/*.js'
parserOptions:
ecmaVersion: 6
ecmaVersion: 2018
env:
browser: no

browser: false
rules:
no-restricted-properties:
- off
- object: 'Object'
property: 'assign'
- files:
- esm-utils.js
parserOptions:
ecmaVersion: 2018
sourceType: module
parser: babel-eslint
env:
browser: false
- files:
- test/**/*.{js,mjs}
env:
mocha: yes
mocha: true
globals:
expect: no
expect: readonly
- files:
- bin/*
- lib/**/*.js
Expand Down Expand Up @@ -73,11 +94,10 @@ overrides:
# disallow property access of `global.<timer>.*`
- selector: '*[object.object.name=global][object.property.name=/(Date|(set|clear)(Timeout|Immediate|Interval))/]:expression'
message: *GH-237

- files:
- test/**/*.mjs
parserOptions:
ecmaVersion: 6
ecmaVersion: 2018
sourceType: module

- files:
Expand Down
54 changes: 45 additions & 9 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ community should be respectful when dealing with other members as well as with p
We are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put
down other participants. Harassment and other exclusionary behavior aren’t acceptable. This includes, but is not limited to:

* Violent threats or language directed against another person.
* Discriminatory jokes and language.
* Posting sexually explicit or violent material.
* Posting (or threatening to post) other people’s personally identifying information (“doxing”).
* Personal insults, especially those using racist or sexist terms.
* Unwelcome sexual attention.
* Advocating for, or encouraging, any of the above behavior.
* Repeated harassment of others. In general, if someone asks you to stop, then stop.
- Violent threats or language directed against another person.
- Discriminatory jokes and language.
- Posting sexually explicit or violent material.
- Posting (or threatening to post) other people’s personally identifying information (“doxing”).
- Personal insults, especially those using racist or sexist terms.
- Unwelcome sexual attention.
- Advocating for, or encouraging, any of the above behavior.
- Repeated harassment of others. In general, if someone asks you to stop, then stop.

## When we disagree, try to understand why

Expand All @@ -55,4 +55,40 @@ Original text courtesy of the Speak Up! project and Django Project.

## QUESTIONS?

If you have questions, please see the FAQ. If that doesn’t answer your questions, feel free to email [email protected].
If you have questions, please see the FAQ. If that doesn’t answer your questions, feel free to email [email protected].

# OpenJS Foundation Code of Conduct

The OpenJS Foundation and its member projects use the Contributor
Covenant v1.4.1 as its Code of Conduct. Refer to the following
for the full text:

- [english](https://www.contributor-covenant.org/version/1/4/code-of-conduct)
- [translations](https://www.contributor-covenant.org/translations)

Refer to the section on reporting and escalation in this document for the specific emails that can be used to report and escalate issues.

## Reporting

### Project Spaces

For reporting issues in spaces related to a member project please use the email provided by the project for reporting. Projects handle CoC issues related to the spaces that they maintain. Projects maintainers commit to:

- maintain the confidentiality with regard to the reporter of an incident
- to participate in the path for escalation as outlined in
the section on Escalation when required.

### Foundation Spaces

For reporting issues in spaces managed by the OpenJS Foundation, for example, repositories within the OpenJS organization, use the email `[email protected]`. The Cross Project Council (CPC) is responsible for managing these reports and commits to:

- maintain the confidentiality with regard to the reporter of an incident
- to participate in the path for escalation as outlined in
the section on Escalation when required.

## Escalation

The OpenJS Foundation maintains a Code of Conduct Panel (CoCP). This is a foundation-wide team established to manage escalation when a reporter believes that a report to a member project or the CPC has not been properly handled. In order to escalate to the CoCP send an email to `"[email protected]`.

For more information, refer to the full
[Code of Conduct governance document](https://github.com/openjs-foundation/bootstrap/blob/master/proposals/stage-1/CODE_OF_CONDUCT/FOUNDATION_CODE_OF_CONDUCT_REQUIREMENTS.md).
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Follow these steps to get going. If you are having trouble, don't be afraid to [

> PRO TIP: After `npm install`, run `npm start` to see a list of commands which can be run with `npm start <command>` (powered by [nps](https://npm.im/nps)).
1. [Install Node.js 8.x or newer](https://nodejs.org/en/download/).
1. [Install Node.js 10.12.0 or newer](https://nodejs.org/en/download/).
- If you're new to installing Node, a tool like [nvm](https://github.com/creationix/nvm#install-script) can help you manage multiple version installations.
- You will need [Google Chrome](https://www.google.com/chrome/) to run browser-based tests locally.
1. Follow [Github's documentation](https://help.github.com/articles/fork-a-repo/) on setting up Git, forking and cloning.
Expand Down
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
open_collective: mochajs
12 changes: 4 additions & 8 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"linters": {
"(bin/*|*.js|**/*.js)": ["eslint --fix", "git add"],
"(*.{json,yml,md,html}|**/*.{json,yml,md,html})": [
"prettier --write",
"git add"
]
},
"ignore": ["docs/**/*.js", "test/**/*.fixture.js", "package*.json"]
"*.js": ["eslint --fix", "git add"],
"bin/*": ["eslint --fix", "git add"],
"!(package*).json": ["prettier --write", "git add"],
"*.{yml,md,html}": ["prettier --write", "git add"]
}
3 changes: 2 additions & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"first-header-h1": false,
"first-line-h1": false,
"commands-show-output": false,
"single-h1": false
"single-h1": false,
"fenced-code-language": false
}
20 changes: 14 additions & 6 deletions .mocharc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
require: test/setup
ui: bdd
require: 'test/setup'
ui: 'bdd'
global:
- okGlobalA,okGlobalB
- okGlobalC
- callback*
timeout: 300
- 'okGlobalA,okGlobalB'
- 'okGlobalC'
- 'callback*'
timeout: 1000
parallel: true
watch-ignore:
- '.*'
- 'docs/_dist/**'
- 'docs/_site/**'
- 'node_modules'
- 'coverage'
- 'cache'
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12
15 changes: 13 additions & 2 deletions .nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@
"text-summary"
],
"exclude": [
"lib/browser",
"test/**/*"
"coverage/**",
"docs/**",
"packages/*/test{,s}/**",
"**/*.d.ts",
"test{,s}/**",
"test{,-*}.{js,cjs,mjs,ts}",
"**/*{.,-}test.{js,cjs,mjs,ts}",
"**/__tests__/**",
"**/{karma,rollup,webpack}.config.js",
"**/{babel.config,.eslintrc,.mocharc}.{js,cjs}",
"lib/browser/**",
"package-scripts.js",
"scripts/**"
]
}
47 changes: 31 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ stages:

# defaults
language: node_js
node_js: '12'
node_js: '14'
addons:
apt:
packages:
Expand All @@ -38,17 +38,26 @@ jobs:
include:
- script: COVERAGE=1 npm start test.node
after_success: npm start coveralls
name: 'Latest Node.js (with coverage)'
- script: MOCHA_PARALLEL=0 npm start test.node.unit
name: 'Latest Node.js (unit tests in serial mode)'
- &node
script: npm start test.node
node_js: '13'
name: 'Node.js v13'

- &node
script: npm start test.node
node_js: '10'
node_js: '12'
name: 'Node.js v12'

- <<: *node
node_js: '8'
node_js: '10'
name: 'Node.js v10'

- script: npm start test.bundle test.browser
# XXX: update when canvas supplies a prebuilt binary for Node.js v12.x
node_js: 10
name: 'Browser'
node_js: 12
install: npm ci # we need the native modules here
addons:
artifacts:
Expand All @@ -60,35 +69,41 @@ jobs:

- stage: lint
script: npm start lint
name: 'JS & Markdown'

# smoke tests use default npm.
- &smoke
stage: smoke
env: null
before_install: true
install: npm install --production

script: ./bin/mocha --no-config --reporter spec test/sanity/sanity.spec.js
name: 'Latest Node.js'
script: ./bin/mocha --no-config --reporter spec test/smoke/smoke.spec.js
cache:
directories:
- ~/.npm
- node_modules # npm install, unlike npm ci, doesn't wipe node_modules

- <<: *smoke
node_js: '10'
node_js: '12'
name: 'Node.js v12'

- <<: *smoke
node_js: '8'
node_js: '10'
name: 'Node.js v10'

- stage: precache
script: true
name: 'Prime cache'

env:
- 'NODE_OPTIONS="--trace-warnings"'

notifications:
email: false
urls:
# for gitter mochajs/mocha
- secure: fUrHenYJs+pTuLtgBRoYyrlyfVekxaIGmLWq7bhUUqBj/7p5eCkQFn13LlPht0/4WWZOiPBcdTN7tKnz3Ho7ATUJhAchvOWDUgL5gtTvOzeCHbPuCvHz/VLK6hMoPdbLA45M864NDLotfHvyh62WgQaVw9iPc80eb+umaDPrYiU=
# for gitter mochajs/contributors
- secure: rGMGYWBaZgEa9i997jJHKzjI8WxECqLi6BqsMhvstDq9EeTeXkZFVfz4r6G3Xugsk3tFwb/pDpiYo1OK36kA5arUJTCia51u4Wn+c7lHKcpef/vXztoyucvw6/jXdVm/FQz1jztYYbqdyAOWC2BV8gYvg5F8TpK05UGCe5R0bRA=
on_success: change
on_failure: always
webhooks:
urls:
# for gitter mochajs/contributors
- secure: rGMGYWBaZgEa9i997jJHKzjI8WxECqLi6BqsMhvstDq9EeTeXkZFVfz4r6G3Xugsk3tFwb/pDpiYo1OK36kA5arUJTCia51u4Wn+c7lHKcpef/vXztoyucvw6/jXdVm/FQz1jztYYbqdyAOWC2BV8gYvg5F8TpK05UGCe5R0bRA=
on_success: change
on_failure: always
Loading

0 comments on commit 80e75c8

Please sign in to comment.