From b641fa8f5c2eee72c97c2e56bb93edc8faad2500 Mon Sep 17 00:00:00 2001 From: Shachar <34343793+ShaMan123@users.noreply.github.com> Date: Fri, 26 Aug 2022 08:54:22 +0300 Subject: [PATCH 01/77] Update README.md --- README.md | 240 +++++++++++++----------------------------------------- 1 file changed, 58 insertions(+), 182 deletions(-) diff --git a/README.md b/README.md index 8c134beef02..16b22d5d214 100644 --- a/README.md +++ b/README.md @@ -2,82 +2,85 @@ -FabricJS.com is a **simple and powerful Javascript HTML5 canvas library**. It is also an **SVG-to-canvas parser**. +A **simple and powerful Javascript HTML5 canvas library**. + -[![Build Status](https://secure.travis-ci.org/fabricjs/fabric.js.svg?branch=master)](http://travis-ci.org/#!/kangax/fabric.js) +[![Build Status](https://secure.travis-ci.org/fabricjs/fabric.js.svg?branch=master)](http://travis-ci.org/#!/fabricjs/fabric.js) [![Code Climate](https://d3s6mut3hikguw.cloudfront.net/github/kangax/fabric.js/badges/gpa.svg)](https://codeclimate.com/github/kangax/fabric.js) [![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/fabricjs/fabric.js) [![CDNJS version](https://img.shields.io/cdnjs/v/fabric.js.svg)](https://cdnjs.com/libraries/fabric.js) +[![CDNJS](https://data.jsdelivr.com/v1/package/npm/fabric/badge)](https://www.jsdelivr.com/package/npm/fabric) + [![NPM version](https://badge.fury.io/js/fabric.svg)](http://badge.fury.io/js/fabric) [![Downloads per month](https://img.shields.io/npm/dm/fabric.svg)](https://www.npmjs.org/package/fabric) [![Bower version](https://badge.fury.io/bo/fabric.svg)](http://badge.fury.io/bo/fabric) -## Features -- drag-n-drop objects on canvas, -- scale, move, rotate and group objects with mouse, -- use predefined shapes or create custom objects, -- works super-fast with many objects, -- supports JPG, PNG, JSON and SVG formats, -- ready-to-use image filters, -- create animations, -- and much more! +--- -
+[![](https://img.shields.io/static/v1?label=Sponsor%20asturur&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/asturur) +[![](https://img.shields.io/static/v1?label=Sponsor%20melchiar&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/melchiar) +[![](https://img.shields.io/static/v1?label=Sponsor%20ShaMan123&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/ShaMan123) +[![](https://img.shields.io/static/v1?label=Patreon&message=%F0%9F%91%8D&logo=Patreon&color=blueviolet)](https://www.patreon.com/fabricJS) -Introduction -  •   -Docs -  •   -Demos -  •   -Kitchensink -  •   -Benchmarks -  •   -Contribution -
+----- -
+## Features +- Interactive + - drag-n-drop objects on canvas + - scale, move, rotate and group objects with mouse + - built in controls and animations +- use predefined shapes or create custom objects +- works super-fast with many objects +- supports JPG, PNG, JSON and SVG formats +- ready-to-use image filters +- create animations +- and much more! -## Quick Start -``` +## Installation + +```bash $ npm install fabric --save +// or +$ yarn add fabric ``` -After this, you can import fabric like so: +```js -``` +// es6 imports +import { fabric } from "fabric"; + +// cjs const fabric = require("fabric").fabric; + ``` -Or you can use this instead if your build pipeline supports ES6 imports: +### Node.js +If you are using Fabric.js in a Node.js script, you will depend on [node-canvas](https://github.com/Automattic/node-canvas) for a canvas implementation (`HTMLCanvasElement` replacement) and [jsdom](https://github.com/jsdom/jsdom) for a `window` implementation. +Follow these [instructions](https://github.com/Automattic/node-canvas#compiling) to get `node-canvas` up and running. -``` -import { fabric } from "fabric"; -``` +### Browser es6 +see [browser modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) for using es6 imports in the browser or use a dedicated bundler. -NOTE: If you are using Fabric.js in a Node.js script, you will depend on [node-canvas](https://github.com/Automattic/node-canvas). `node-canvas` is an HTML canvas replacement that works on top of native libraries. Please [follow the instructions](https://github.com/Automattic/node-canvas#compiling) to get it up and running. +### CDN -NOTE: es6 imports won't work in browser or with bundlers which expect es6 module like vite. Use commonjs syntax instead. +[cdnjs](https://cdnjs.com/libraries/fabric.js), [jsdelivr](https://www.jsdelivr.com/package/npm/fabric) -## Usage +## Qucik Start ### Plain HTML ```html - - + ``` -### ReactJS +#### ReactJS ```tsx import React, { useEffect, useRef } from 'react'; @@ -115,47 +120,66 @@ export const FabricJSCanvas = () => { ``` -## Contributing - -See the [Contribution Guide](/CONTRIBUTING.md) - - -## Goals +#### Node.js -- Unit tested -- Modular -- Cross-browser -- [Fast](https://github.com/kangax/fabric.js/wiki/Focus-on-speed) -- No browser sniffing for critical functionality -- Runs under es6 strict mode -- Runs on a server under [Node.js](http://nodejs.org/) (active stable releases and latest of current) (see [Node.js limitations](https://github.com/fabricjs/fabric.js/wiki/Fabric-limitations-in-node.js)) -- Follows [Semantic Versioning](http://semver.org/) +```js +const http = require('http'); +const { fabric } = require('fabric'); + +const port = 8080; + +http + .createServer((req, res) => { + const canvas = new fabric.Canvas(null, { width: 100, height: 100 }); + const rect = new fabric.Rect({ width: 20, height: 50, fill: '#ff0000' }); + const text = new fabric.Text('fabric.js', { fill: 'blue', fontSize: 24 }); + canvas.add(rect, text); + canvas.renderAll(); + if (req.url === '/download') { + canvas.createPNGStream().pipe(res); + } + else { + const imageData = canvas.toDataURL(); + res.writeHead(200, '', { 'Content-Type': 'text/html' }); + res.write(``); + res.end(); + } + }) + .listen(port, (err) => { + if (err) throw err; + console.log(`> Ready on http://localhost:${port}`); + }); +``` -## Supported browsers +## Supported Browsers - Firefox 4+ - Safari 5+ - Opera 9.64+ - Chrome (all versions) - Edge (chromium based, all versions) -- IE11 and Edge legacy, not supported + +IE11 and Edge legacy are **not** supported + + +## Contributing, Developing and More + +Follow the [Contribution Guide](/CONTRIBUTING.md) -## More resources +## More Resources - [Fabric.js on Twitter](https://twitter.com/fabricjs) - [Fabric.js on CodeTriage](https://www.codetriage.com/kangax/fabric.js) - [Fabric.js on Stackoverflow](https://stackoverflow.com/questions/tagged/fabricjs) - [Fabric.js on jsfiddle](https://jsfiddle.net/user/fabricjs/fiddles/) - [Fabric.js on Codepen.io](https://codepen.io/tag/fabricjs) -- [Presentation from BK.js](http://www.slideshare.net/kangax/fabricjs-building-acanvaslibrarybk) -- [Presentation from Falsy Values](http://www.slideshare.net/kangax/fabric-falsy-values-8067834) ## Credits - [@kangax](https://twitter.com/kangax) -- [Andrea Bogazzi](https://twitter.com/AndreaBogazzi) +- [asturur](https://github.com/asturur), [Andrea Bogazzi](https://twitter.com/AndreaBogazzi) - [melchiar](https://github.com/melchiar) - [ShaMan123](https://github.com/ShaMan123) - Ernest Delgado for the original idea of [manipulating images on canvas](http://www.ernestdelgado.com/archive/canvas/) @@ -163,5 +187,5 @@ See the [Contribution Guide](/CONTRIBUTING.md) - [Sergey Nisnevich](http://nisnya.com) for help with geometry logic - [Stefan Kienzle](https://twitter.com/kienzle_s) for help with bugs, features, documentation, GitHub issues - [Shutterstock](http://www.shutterstock.com/jobs) for the time and resources invested in using and improving Fabric.js -- [and all the other GitHub contributors](https://github.com/fabricjs/fabric.js/graphs/contributors) +- [and all the other contributors](https://github.com/fabricjs/fabric.js/graphs/contributors) From f52628f8313cb5914064717e35eada7863e0f8c8 Mon Sep 17 00:00:00 2001 From: Shachar <34343793+ShaMan123@users.noreply.github.com> Date: Fri, 26 Aug 2022 10:23:59 +0300 Subject: [PATCH 04/77] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a143980864..609661ad817 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ See [browser modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Gu ```html - + + + ``` -#### ReactJS +### ReactJS ```tsx -import React, { useEffect, useRef } from 'react'; -import { fabric } from 'fabric'; +import React, {useEffect, useRef} from 'react' +import {fabric} from 'fabric' -export const FabricJSCanvas = () => { - const canvasEl = useRef(null); +const FabricJSCanvas = () => { + const canvasEl = useRef(null) useEffect(() => { const options = { ... }; const canvas = new fabric.Canvas(canvasEl.current, options); @@ -127,84 +105,184 @@ export const FabricJSCanvas = () => { updateCanvasContext(canvas); return () => { updateCanvasContext(null); - canvas.dispose(); + canvas.dispose() } }, []); - + return () }); +export default FabricJSCanvas; +``` + +NOTE: Fabric.js requires a `window` object. + +## Building + +1. Build distribution file **[~77K minified, ~20K gzipped]** + + $ node build.js + + 1.1 Or build a custom distribution file, by passing (comma separated) module names to be included. + + $ node build.js modules=text,serialization,parser + // or + $ node build.js modules=text + // or + $ node build.js modules=parser,text + // etc. + + By default (when none of the modules are specified) only basic functionality is included. + See the list of modules below for more information on each one of them. + Note that default distribution has support for **static canvases** only. + + To get minimal distribution with interactivity, make sure to include corresponding module: + + $ node build.js modules=interaction + + 1.2 You can also include all modules like so: + $ node build.js modules=ALL + + 1.3 You can exclude a few modules like so: + + $ node build.js modules=ALL exclude=gestures,image_filters + +2. Create a minified distribution file + + # Using YUICompressor (default option) + $ node build.js modules=... minifier=yui + + # or Google Closure Compiler + $ node build.js modules=... minifier=closure + +3. Enable AMD support via require.js (requires uglify) + + $ node build.js requirejs modules=... + +4. Create source map file for better productive debugging (requires uglify or google closure compiler).
More information about [source maps](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/). + + $ node build.js sourcemap modules=... + + If you use google closure compiler you have to add `sourceMappingURL` manually at the end of the minified file all.min.js (see issue https://code.google.com/p/closure-compiler/issues/detail?id=941). + + //# sourceMappingURL=fabric.min.js.map + +5. Ensure code guidelines are met (prerequisite: `npm -g install eslint`) + + $ npm run lint && npm run lint_tests + +## Testing + +### 1. Install NPM packages + +``` +$ npm install ``` -#### Node.js - -```js -const http = require('http'); -const { fabric } = require('fabric'); - -const port = 8080; - -http - .createServer((req, res) => { - const canvas = new fabric.Canvas(null, { width: 100, height: 100 }); - const rect = new fabric.Rect({ width: 20, height: 50, fill: '#ff0000' }); - const text = new fabric.Text('fabric.js', { fill: 'blue', fontSize: 24 }); - canvas.add(rect, text); - canvas.renderAll(); - if (req.url === '/download') { - res.setHeader('Content-Type', 'image/png'); - res.setHeader('Content-Disposition', 'attachment; filename="fabric.png"'); - canvas.createPNGStream().pipe(res); - } - else if (req.url === '/view') { - canvas.createPNGStream().pipe(res); - } - else { - const imageData = canvas.toDataURL(); - res.writeHead(200, '', { 'Content-Type': 'text/html' }); - res.write(``); - res.end(); - } - }) - .listen(port, (err) => { - if (err) throw err; - console.log(`> Ready on http://localhost:${port}, http://localhost:${port}/view, http://localhost:${port}/download`); - }); +### 2. Run tests Chrome and Node (by default): + ``` +$ testem +``` + +See testem docs for more info: https://github.com/testem/testem + +## Optional modules + +These are the optional modules that could be specified for inclusion, when building custom version of fabric: + +- **text** — Adds support for static text (`fabric.Text`) +- **itext** — Adds support for interactive text (`fabric.IText`, `fabric.Textbox`) +- **serialization** — Adds support for `loadFromJSON`, `loadFromDatalessJSON`, and `clone` methods on `fabric.Canvas` +- **interaction** — Adds support for interactive features of fabric — selecting/transforming objects/groups via mouse/touch devices. +- **parser** — Adds support for `fabric.parseSVGDocument`, `fabric.loadSVGFromURL`, and `fabric.loadSVGFromString` +- **image_filters** — Adds support for image filters, such as grayscale of white removal. +- **easing** — Adds support for animation easing functions +- **node** — Adds support for running fabric under node.js, with help of [jsdom](https://github.com/tmpvar/jsdom) and [node-canvas](https://github.com/learnboost/node-canvas) libraries. +- **freedrawing** — Adds support for free drawing +- **erasing** — Adds support for object erasing using an eraser brush +- **gestures** — Adds support for multitouch gestures with help of [Event.js](https://github.com/mudcube/Event.js) +- **object_straightening** — Adds support for rotating an object to one of 0, 90, 180, 270, etc. depending on which is angle is closer. +- **animation** — Adds support for animation (`fabric.util.animate`, `fabric.util.requestAnimFrame`, `fabric.Object#animate`, `fabric.Canvas#fxCenterObjectH/#fxCenterObjectV/#fxRemove`) + +Additional flags for build script are: + +- **requirejs** — Makes fabric requirejs AMD-compatible in `dist/fabric.js`. _Note:_ an unminified, requirejs-compatible version is always created in `dist/fabric.require.js` +- **no-strict** — Strips "use strict" directives from source +- **no-svg-export** — Removes svg exporting functionality +- **sourcemap** - Generates a sourceMap file and adds the `sourceMappingURL` (only if uglifyjs is used) to `dist/fabric.min.js` ---- +For example: -## Other Solutions + node build.js modules=ALL exclude=json no-strict no-svg-export -| Project | Description | Demo | -| ------------- | ------------- | :-------------: | -| [Three.js](https://github.com/mrdoob/three.js/) | 3D graphics | -| [PixiJS](https://github.com/pixijs/pixijs) | WebGL renderer | -| [Konva](https://github.com/konvajs/konva) | *Competition* | ❌ | -| [Canvas2PDF](https://github.com/joshua-gould/canvas2pdf) | PDF renderer | -| [html-to-image](https://github.com/bubkoo/html-to-image) | HTML to image/canvas | +## Goals +- Unit tested (1150+ tests at the moment, 79%+ coverage) +- Modular (~60 small ["classes", modules, mixins](http://fabricjs.com/docs/)) +- Cross-browser +- [Fast](https://github.com/kangax/fabric.js/wiki/Focus-on-speed) +- Encapsulated in one object +- No browser sniffing for critical functionality +- Runs under ES5 strict mode +- Runs on a server under [Node.js](http://nodejs.org/) (active stable releases and latest of current) (see [Node.js limitations](https://github.com/kangax/fabric.js/wiki/Fabric-limitations-in-node.js)) +- Follows [Semantic Versioning](http://semver.org/) -## More Resources +## Supported browsers + +- Firefox 4+ +- Safari 5+ +- Opera 9.64+ +- Chrome (all versions) +- Edge (chromium based, all versions) +- IE11 and Edge legacy, not supported. Fabric up to 5.0 is written with ES5 in mind, but no specific tests are run for those browsers. + +You can [run automated unit tests](http://fabricjs.com/test/unit/) right in the browser. + +## More resources - [Fabric.js on Twitter](https://twitter.com/fabricjs) - [Fabric.js on CodeTriage](https://www.codetriage.com/kangax/fabric.js) - [Fabric.js on Stackoverflow](https://stackoverflow.com/questions/tagged/fabricjs) - [Fabric.js on jsfiddle](https://jsfiddle.net/user/fabricjs/fiddles/) - [Fabric.js on Codepen.io](https://codepen.io/tag/fabricjs) +- [Presentation from BK.js](http://www.slideshare.net/kangax/fabricjs-building-acanvaslibrarybk) +- [Presentation from Falsy Values](http://www.slideshare.net/kangax/fabric-falsy-values-8067834) - -## Credits [![Patreon](https://img.shields.io/static/v1?label=Patreon&message=%F0%9F%91%8D&logo=Patreon&color=blueviolet)](https://www.patreon.com/fabricJS) +## Credits - [@kangax](https://twitter.com/kangax) -- [asturur](https://github.com/asturur), [Andrea Bogazzi](https://twitter.com/AndreaBogazzi) -[![Sponsor asturur](https://img.shields.io/static/v1?label=Sponsor%20asturur&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/asturur) -- [melchiar](https://github.com/melchiar) [![Sponsor melchiar](https://img.shields.io/static/v1?label=Sponsor%20melchiar&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/melchiar) -- [ShaMan123](https://github.com/ShaMan123) [![Sponsor ShaMan123](https://img.shields.io/static/v1?label=Sponsor%20ShaMan123&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/ShaMan123) +- [Andrea Bogazzi](https://twitter.com/AndreaBogazzi) for help with bugs, new features, documentation, GitHub issues +- [melchiar](https://github.com/melchiar) +- [ShaMan123](https://github.com/ShaMan123) - Ernest Delgado for the original idea of [manipulating images on canvas](http://www.ernestdelgado.com/archive/canvas/) - [Maxim "hakunin" Chernyak](http://twitter.com/hakunin) for ideas, and help with various parts of the library throughout its life - [Sergey Nisnevich](http://nisnya.com) for help with geometry logic - [Stefan Kienzle](https://twitter.com/kienzle_s) for help with bugs, features, documentation, GitHub issues - [Shutterstock](http://www.shutterstock.com/jobs) for the time and resources invested in using and improving Fabric.js -- [and all the other contributors](https://github.com/fabricjs/fabric.js/graphs/contributors) +- [and all the other GitHub contributors](https://github.com/kangax/fabric.js/graphs/contributors) + +## Sponsor authors + +- https://flattr.com/@kangax +- https://github.com/sponsors/asturur +- https://www.patreon.com/fabricJS + +## MIT License + +Copyright (c) 2008-2015 Printio (Juriy Zaytsev, Maxim Chernyak) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/package-lock.json b/package-lock.json index 54a8d19611b..23b56b7c87a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,6 @@ "fuzzy": "^0.1.3", "inquirer": "^8.2.1", "inquirer-checkbox-plus-prompt": "^1.0.1", - "js-yaml": "^4.1.0", "kill-port": "^2.0.1", "moment": "^2.29.1", "nyc": "^15.1.0", @@ -42,8 +41,7 @@ "rollup-plugin-ts": "^3.0.2", "source-map-support": "^0.5.21", "testem": "^3.8.0", - "typescript": "^4.7.4", - "yaml": "^2.1.1" + "typescript": "^4.7.4" }, "engines": { "node": ">=14.0.0" @@ -404,6 +402,12 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/@eslint/eslintrc/node_modules/globals": { "version": "13.17.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", @@ -419,6 +423,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/@eslint/eslintrc/node_modules/type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", @@ -490,28 +506,6 @@ "node": ">=8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -1317,10 +1311,13 @@ } }, "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } }, "node_modules/array-flatten": { "version": "1.1.1", @@ -2657,6 +2654,12 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -2768,6 +2771,18 @@ "node": ">=8" } }, + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/eslint/node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -4610,12 +4625,13 @@ "dev": true }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "dependencies": { - "argparse": "^2.0.1" + "argparse": "^1.0.7", + "esprima": "^4.0.0" }, "bin": { "js-yaml": "bin/js-yaml.js" @@ -6634,7 +6650,7 @@ "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, "node_modules/statuses": { @@ -6779,28 +6795,6 @@ "tap-parser": "bin/cmd.js" } }, - "node_modules/tap-parser/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/tap-parser/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/tap-parser/node_modules/minipass": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", @@ -6928,15 +6922,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/testem/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, "node_modules/testem/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -6962,19 +6947,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/testem/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/testem/node_modules/npmlog": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", @@ -7523,15 +7495,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "devOptional": true }, - "node_modules/yaml": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz", - "integrity": "sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==", - "dev": true, - "engines": { - "node": ">= 14" - } - }, "node_modules/yargs": { "version": "15.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", @@ -7852,6 +7815,12 @@ "strip-json-comments": "^3.1.1" }, "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "globals": { "version": "13.17.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", @@ -7861,6 +7830,15 @@ "type-fest": "^0.20.2" } }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, "type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", @@ -7911,25 +7889,6 @@ "resolve-from": "^5.0.0" }, "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, "resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -8509,10 +8468,13 @@ } }, "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } }, "array-flatten": { "version": "1.1.1", @@ -9479,6 +9441,12 @@ "color-convert": "^2.0.1" } }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -9554,6 +9522,15 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -10998,12 +10975,13 @@ "dev": true }, "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { - "argparse": "^2.0.1" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, "jsdom": { @@ -12493,7 +12471,7 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, "statuses": { @@ -12599,25 +12577,6 @@ "minipass": "^2.2.0" }, "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, "minipass": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", @@ -12728,15 +12687,6 @@ "readable-stream": "^3.6.0" } }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -12759,16 +12709,6 @@ "wide-align": "^1.1.5" } }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, "npmlog": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", @@ -13178,12 +13118,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "devOptional": true }, - "yaml": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz", - "integrity": "sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==", - "dev": true - }, "yargs": { "version": "15.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", diff --git a/package.json b/package.json index 7a0864dcb2b..436594ac8a1 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,6 @@ "fuzzy": "^0.1.3", "inquirer": "^8.2.1", "inquirer-checkbox-plus-prompt": "^1.0.1", - "js-yaml": "^4.1.0", "kill-port": "^2.0.1", "moment": "^2.29.1", "nyc": "^15.1.0", @@ -109,8 +108,7 @@ "rollup-plugin-ts": "^3.0.2", "source-map-support": "^0.5.21", "testem": "^3.8.0", - "typescript": "^4.7.4", - "yaml": "^2.1.1" + "typescript": "^4.7.4" }, "engines": { "node": ">=14.0.0" From 9460710f326ea5c83f68f66e40c5b0529c6cf4b4 Mon Sep 17 00:00:00 2001 From: ShaMan123 Date: Tue, 27 Sep 2022 11:57:11 +0300 Subject: [PATCH 76/77] Delete bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 45 ---------------------------- 1 file changed, 45 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 0ad30524d0f..00000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -name: Bug report -about: Create a report with a reproducible test case in a JSFIDDLE, For anything else use the github DISCUSSIONS feature. Anything different than a bug report will be closed automatically. ---- - - - - - - - -## Version - -5.0.0 - - - - -## Test Case - -- [ ] [Browser Issue Template](https://jsfiddle.net/Lcp2h3nv/) -- [ ] [Node Issue Template](https://codesandbox.io/s/exciting-browser-ytb701) - -## Information about environment - -Nodejs or browser? -Which browsers? - -## Steps To Reproduce - -1. - -
Error Message & Stack Trace

- -```txt - -``` - -

- -## Expected Behavior - -## Actual Behavior - - From 7d6d65fee1735e97bbd2ebdeebb5000c80278bdf Mon Sep 17 00:00:00 2001 From: ShaMan123 Date: Tue, 27 Sep 2022 12:16:27 +0300 Subject: [PATCH 77/77] Revert "Update bug_report.yml" This reverts commit a1f5fd815970b54ae72a3d9913974bb6806cda26. --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 0a6628b89d8..8f96b113366 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -57,7 +57,7 @@ body: label: In What environments are you experiencing the problem? description: >- checkout the [supported - browsers](https://github.com/fabricjs/fabric.js/README.md#supported-browsersenvironments) + browsers](/README.md#supported-browsersenvironments) multiple: true options: - Firefox