diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..5e89cf98d --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at security@mermaid.live +. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/packages/mermaid-example-diagram/package.json b/packages/mermaid-example-diagram/package.json index fa3c570b6..8898a66f6 100644 --- a/packages/mermaid-example-diagram/package.json +++ b/packages/mermaid-example-diagram/package.json @@ -29,10 +29,6 @@ "lint": "eslint --cache --ignore-path .gitignore . && yarn lint:jison && prettier --check .", "lint:fix": "eslint --fix --ignore-path .gitignore . && prettier --write .", "lint:jison": "ts-node-esm src/jison/lint.mts", - "ci": "vitest run", - "test": "yarn lint && vitest run", - "test:watch": "vitest --coverage --watch", - "todo-prepublishOnly": "yarn build && yarn test", "todo-prepare": "concurrently \"husky install ../../.husky\" \"yarn build\"", "todo-pre-commit": "lint-staged" }, diff --git a/packages/mermaid-mindmap/package.json b/packages/mermaid-mindmap/package.json index 8599f2b54..befe56016 100644 --- a/packages/mermaid-mindmap/package.json +++ b/packages/mermaid-mindmap/package.json @@ -29,10 +29,6 @@ "lint": "eslint --cache --ignore-path .gitignore . && yarn lint:jison && prettier --check .", "lint:fix": "eslint --fix --ignore-path .gitignore . && prettier --write .", "lint:jison": "ts-node-esm src/jison/lint.mts", - "ci": "vitest run", - "test": "yarn lint && vitest run", - "test:watch": "vitest --coverage --watch", - "todo-prepublishOnly": "yarn build && yarn test", "todo-prepare": "concurrently \"husky install ../../.husky\" \"yarn build\"", "todo-pre-commit": "lint-staged" }, diff --git a/packages/mermaid/package.json b/packages/mermaid/package.json index 0c42dc3b9..6ce4f8109 100644 --- a/packages/mermaid/package.json +++ b/packages/mermaid/package.json @@ -41,10 +41,6 @@ "cypress": "cypress run", "cypress:open": "cypress open", "e2e": "start-server-and-test dev http://localhost:9000/ cypress", - "ci": "vitest run", - "test": "yarn lint && vitest run", - "test:watch": "vitest --coverage --watch", - "prepublishOnly": "yarn build && yarn test", "todo-prepare": "concurrently \"husky install\" \"yarn build\"", "pre-commit": "lint-staged" }, @@ -92,8 +88,6 @@ "@types/stylis": "^4.0.2", "@typescript-eslint/eslint-plugin": "^5.37.0", "@typescript-eslint/parser": "^5.37.0", - "@vitest/coverage-c8": "^0.23.2", - "@vitest/ui": "^0.23.2", "concurrently": "^7.4.0", "coveralls": "^3.1.1", "cypress": "^10.0.0", @@ -125,8 +119,7 @@ "start-server-and-test": "^1.12.6", "ts-node": "^10.9.1", "typescript": "^4.8.3", - "unist-util-flatmap": "^1.0.0", - "vitest": "^0.23.1" + "unist-util-flatmap": "^1.0.0" }, "resolutions": { "d3": "^7.0.0" diff --git a/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts b/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts index 28b64d4f5..09df96f12 100644 --- a/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts +++ b/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts @@ -1,7 +1,6 @@ // @ts-nocheck TODO: Fix TS import moment from 'moment-mini'; import ganttDb from './ganttDb'; -import { it, describe } from 'vitest'; import { convert } from '../../tests/util'; describe('when using the ganttDb', function () { diff --git a/packages/mermaid/src/mermaid.spec.ts b/packages/mermaid/src/mermaid.spec.ts index df6439c82..8cf180ae7 100644 --- a/packages/mermaid/src/mermaid.spec.ts +++ b/packages/mermaid/src/mermaid.spec.ts @@ -1,7 +1,6 @@ import mermaid from './mermaid'; import { mermaidAPI } from './mermaidAPI'; import './diagram-api/diagram-orchestration'; -import { vi, describe, it, beforeEach, afterEach, expect } from 'vitest'; const spyOn = vi.spyOn; vi.mock('./mermaidAPI'); diff --git a/packages/mermaid/src/utils.spec.js b/packages/mermaid/src/utils.spec.js index f1523aca5..4a511b3c0 100644 --- a/packages/mermaid/src/utils.spec.js +++ b/packages/mermaid/src/utils.spec.js @@ -1,4 +1,4 @@ -import { vi, describe, it, expect, beforeEach } from 'vitest'; +import { vi } from 'vitest'; import utils from './utils'; import assignWithDepth from './assignWithDepth'; import { detectType } from './diagram-api/detectType'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 477685a45..80e619de0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -164,8 +164,6 @@ importers: '@types/stylis': ^4.0.2 '@typescript-eslint/eslint-plugin': ^5.37.0 '@typescript-eslint/parser': ^5.37.0 - '@vitest/coverage-c8': ^0.23.2 - '@vitest/ui': ^0.23.2 concurrently: ^7.4.0 coveralls: ^3.1.1 cypress: ^10.0.0 @@ -209,7 +207,6 @@ importers: ts-node: ^10.9.1 typescript: ^4.8.3 unist-util-flatmap: ^1.0.0 - vitest: ^0.23.1 dependencies: '@braintree/sanitize-url': 6.0.0 d3: 7.6.1 @@ -237,8 +234,6 @@ importers: '@types/stylis': 4.0.2 '@typescript-eslint/eslint-plugin': 5.38.0_wsb62dxj2oqwgas4kadjymcmry '@typescript-eslint/parser': 5.38.0_irgkl5vooow2ydyo6aokmferha - '@vitest/coverage-c8': 0.23.4_y2hohvmcqnhseytaw4yjcnsnkm - '@vitest/ui': 0.23.4 concurrently: 7.4.0 coveralls: 3.1.1 cypress: 10.8.0 @@ -271,7 +266,6 @@ importers: ts-node: 10.9.1_typescript@4.8.3 typescript: 4.8.3 unist-util-flatmap: 1.0.0 - vitest: 0.23.4_y2hohvmcqnhseytaw4yjcnsnkm packages/mermaid-example-diagram: specifiers: @@ -3582,24 +3576,6 @@ packages: - terser dev: true - /@vitest/coverage-c8/0.23.4_y2hohvmcqnhseytaw4yjcnsnkm: - resolution: {integrity: sha512-jmD00a5DQH9gu9K+YdvVhcMuv2CzHvU4gCnySS40Ec5hKlXtlCzRfNHl00VnhfuBeaQUmaQYe60BLT413HyDdg==} - dependencies: - c8: 7.12.0 - vitest: 0.23.4_y2hohvmcqnhseytaw4yjcnsnkm - transitivePeerDependencies: - - '@edge-runtime/vm' - - '@vitest/browser' - - '@vitest/ui' - - happy-dom - - jsdom - - less - - sass - - stylus - - supports-color - - terser - dev: true - /@vitest/ui/0.23.4: resolution: {integrity: sha512-lNZVTTrkHThGAwNQ1ah1qCNnm70r7OLB5LCUdSqboStve/1eKTrtt27QfDSSUTG8AVJQzU0eaN/j8UocH+CqfA==} dependencies: @@ -13187,49 +13163,6 @@ packages: - terser dev: true - /vitest/0.23.4_y2hohvmcqnhseytaw4yjcnsnkm: - resolution: {integrity: sha512-iukBNWqQAv8EKDBUNntspLp9SfpaVFbmzmM0sNcnTxASQZMzRw3PsM6DMlsHiI+I6GeO5/sYDg3ecpC+SNFLrQ==} - engines: {node: '>=v14.16.0'} - hasBin: true - peerDependencies: - '@edge-runtime/vm': '*' - '@vitest/browser': '*' - '@vitest/ui': '*' - happy-dom: '*' - jsdom: '*' - peerDependenciesMeta: - '@edge-runtime/vm': - optional: true - '@vitest/browser': - optional: true - '@vitest/ui': - optional: true - happy-dom: - optional: true - jsdom: - optional: true - dependencies: - '@types/chai': 4.3.3 - '@types/chai-subset': 1.3.3 - '@types/node': 18.7.21 - '@vitest/ui': 0.23.4 - chai: 4.3.6 - debug: 4.3.4 - jsdom: 20.0.0 - local-pkg: 0.4.2 - strip-literal: 0.4.2 - tinybench: 2.1.5 - tinypool: 0.3.0 - tinyspy: 1.0.2 - vite: 3.1.3 - transitivePeerDependencies: - - less - - sass - - stylus - - supports-color - - terser - dev: true - /vm2/3.9.11: resolution: {integrity: sha512-PFG8iJRSjvvBdisowQ7iVF580DXb1uCIiGaXgm7tynMR1uTBlv7UJlB1zdv5KJ+Tmq1f0Upnj3fayoEOPpCBKg==} engines: {node: '>=6.0'}