├── .node-version ├── manual-tests ├── assets │ ├── imported.css │ └── linked.css ├── index.html ├── index-umd.html ├── index-umd-no-viewbox.html ├── index-umd-png-errors.html └── index-umd-throwing.html ├── src ├── __mocks__ │ └── util.js ├── svg.js ├── const.js ├── index.js ├── util.js ├── png.js └── inputProcessor.js ├── webpack.config.js ├── jest.config.js ├── .gitignore ├── .grenrc ├── renovate.json ├── e2e ├── viewport-defined.spec.js-snapshots │ ├── png-generation-viewbox-is-defined-1-firefox-darwin.png │ ├── svg-generation-viewbox-is-defined-1-firefox-darwin.png │ ├── png-generation-viewbox-is-defined-1-firefox-2x-darwin.png │ ├── svg-generation-viewbox-is-defined-1-firefox-2x-darwin.png │ ├── png-generation-viewbox-is-defined-1-Google-Chrome-darwin.png │ ├── svg-generation-viewbox-is-defined-1-Google-Chrome-darwin.png │ ├── png-generation-viewbox-is-defined-1-Google-Chrome-2x-darwin.png │ └── svg-generation-viewbox-is-defined-1-Google-Chrome-2x-darwin.png └── viewport-defined.spec.js ├── babel.config.json ├── test ├── _setup.js ├── svg.test.js ├── png.test.js ├── util.test.js └── inputProcessor.test.js ├── .github └── workflows │ ├── release_notes.yml │ ├── readme_to_gh-pages.yml │ ├── playwright.yml │ ├── node.js.yml │ └── codeql-analysis.yml ├── biome.json ├── LICENSE ├── package.json ├── playwright.config.js ├── README.md └── CHANGELOG.md /.node-version: -------------------------------------------------------------------------------- 1 | 22.15.0 2 | -------------------------------------------------------------------------------- /manual-tests/assets/imported.css: -------------------------------------------------------------------------------- 1 | .imported { 2 | fill: indianred; 3 | } -------------------------------------------------------------------------------- /manual-tests/assets/linked.css: -------------------------------------------------------------------------------- 1 | .linked { 2 | fill: lightsalmon; 3 | } -------------------------------------------------------------------------------- /src/__mocks__/util.js: -------------------------------------------------------------------------------- 1 | export const getFilename = () => 'getFilename' 2 | export const commenceDownload = jest.fn() 3 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | output: { 3 | libraryTarget: 'umd', 4 | globalObject: 'this' 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | setupFiles: ['/test/_setup.js', 'jest-canvas-mock'], 3 | testEnvironment: 'jsdom' 4 | } 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .vscode 3 | dist 4 | .DS_Store 5 | manual-tests/main.js 6 | test-results/ 7 | /playwright-report/ 8 | /blob-report/ 9 | /playwright/.cache/ 10 | -------------------------------------------------------------------------------- /.grenrc: -------------------------------------------------------------------------------- 1 | { 2 | "dataSource": "prs", 3 | "prefix": "", 4 | "onlyMilestones": false, 5 | "groupBy": false, 6 | "template": { 7 | "issue": "- [{{text}}]({{url}}) {{name}}" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["config:base"], 3 | "packageRules": [ 4 | { 5 | "depTypeList": ["devDependencies"], 6 | "automerge": true, 7 | "updateTypes": ["patch", "minor"] 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /e2e/viewport-defined.spec.js-snapshots/png-generation-viewbox-is-defined-1-firefox-darwin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy6erskunk/svg-crowbar/HEAD/e2e/viewport-defined.spec.js-snapshots/png-generation-viewbox-is-defined-1-firefox-darwin.png -------------------------------------------------------------------------------- /e2e/viewport-defined.spec.js-snapshots/svg-generation-viewbox-is-defined-1-firefox-darwin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy6erskunk/svg-crowbar/HEAD/e2e/viewport-defined.spec.js-snapshots/svg-generation-viewbox-is-defined-1-firefox-darwin.png -------------------------------------------------------------------------------- /e2e/viewport-defined.spec.js-snapshots/png-generation-viewbox-is-defined-1-firefox-2x-darwin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy6erskunk/svg-crowbar/HEAD/e2e/viewport-defined.spec.js-snapshots/png-generation-viewbox-is-defined-1-firefox-2x-darwin.png -------------------------------------------------------------------------------- /e2e/viewport-defined.spec.js-snapshots/svg-generation-viewbox-is-defined-1-firefox-2x-darwin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy6erskunk/svg-crowbar/HEAD/e2e/viewport-defined.spec.js-snapshots/svg-generation-viewbox-is-defined-1-firefox-2x-darwin.png -------------------------------------------------------------------------------- /e2e/viewport-defined.spec.js-snapshots/png-generation-viewbox-is-defined-1-Google-Chrome-darwin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy6erskunk/svg-crowbar/HEAD/e2e/viewport-defined.spec.js-snapshots/png-generation-viewbox-is-defined-1-Google-Chrome-darwin.png -------------------------------------------------------------------------------- /e2e/viewport-defined.spec.js-snapshots/svg-generation-viewbox-is-defined-1-Google-Chrome-darwin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy6erskunk/svg-crowbar/HEAD/e2e/viewport-defined.spec.js-snapshots/svg-generation-viewbox-is-defined-1-Google-Chrome-darwin.png -------------------------------------------------------------------------------- /babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "commonjs": { 4 | "presets": [["@babel/preset-env", { "modules": "cjs" }]] 5 | }, 6 | "esmodules": { 7 | "presets": [["@babel/preset-env", { "modules": false }]] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /e2e/viewport-defined.spec.js-snapshots/png-generation-viewbox-is-defined-1-Google-Chrome-2x-darwin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy6erskunk/svg-crowbar/HEAD/e2e/viewport-defined.spec.js-snapshots/png-generation-viewbox-is-defined-1-Google-Chrome-2x-darwin.png -------------------------------------------------------------------------------- /e2e/viewport-defined.spec.js-snapshots/svg-generation-viewbox-is-defined-1-Google-Chrome-2x-darwin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy6erskunk/svg-crowbar/HEAD/e2e/viewport-defined.spec.js-snapshots/svg-generation-viewbox-is-defined-1-Google-Chrome-2x-darwin.png -------------------------------------------------------------------------------- /test/_setup.js: -------------------------------------------------------------------------------- 1 | import { prefix } from '../src/const' 2 | 3 | global.createSVG = () => document.createElementNS(prefix.svg, 'svg') 4 | Object.defineProperty(global, 'URL', { 5 | writable: true, 6 | value: { 7 | createObjectURL: jest.fn() 8 | } 9 | }) 10 | -------------------------------------------------------------------------------- /src/svg.js: -------------------------------------------------------------------------------- 1 | import { commenceDownload } from './util' 2 | import { DEFAULT_FILENAME } from './const' 3 | 4 | function download(source, filename = DEFAULT_FILENAME) { 5 | const url = URL.createObjectURL( 6 | new Blob([source.source], { type: 'text/xml' }) 7 | ) 8 | 9 | commenceDownload(`${filename}.svg`, url, () => URL.revokeObjectURL(url)) 10 | } 11 | 12 | export default download 13 | -------------------------------------------------------------------------------- /.github/workflows/release_notes.yml: -------------------------------------------------------------------------------- 1 | name: Release notes 2 | 3 | on: 4 | push: 5 | # Sequence of patterns matched against refs/tags 6 | tags: 7 | - 'v*' 8 | jobs: 9 | publish: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v5 13 | - uses: smartlyio/github-release-notes-action@v1.0.0 14 | env: 15 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /src/const.js: -------------------------------------------------------------------------------- 1 | export const doctype = 2 | '' 3 | export const prefix = { 4 | xmlns: 'http://www.w3.org/2000/xmlns/', 5 | xlink: 'http://www.w3.org/1999/xlink', 6 | svg: 'http://www.w3.org/2000/svg' 7 | } 8 | export const REMOVE_TIMEOUT = 10 9 | export const DEFAULT_FILENAME = 'untitled' 10 | -------------------------------------------------------------------------------- /manual-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | manual tests 5 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import getSource from './inputProcessor' 2 | import download from './svg' 3 | import downloadPNG from './png' 4 | import { getFilename } from './util' 5 | 6 | const downloadSvg = (svgElement, filename, options) => 7 | download(getSource(svgElement, options), filename || getFilename(svgElement)) 8 | export default downloadSvg 9 | const downloadPng = (svgElement, filename, options) => 10 | downloadPNG( 11 | getSource(svgElement, options), 12 | filename || getFilename(svgElement), 13 | options?.downloadPNGOptions 14 | ) 15 | export { downloadSvg, downloadPng } 16 | -------------------------------------------------------------------------------- /test/svg.test.js: -------------------------------------------------------------------------------- 1 | import download from '../src/svg' 2 | import inputProcessor from '../src/inputProcessor' 3 | import { commenceDownload } from '../src/util' 4 | import { DEFAULT_FILENAME } from '../src/const' 5 | 6 | jest.mock('../src/util') 7 | 8 | test('download requires source', () => { 9 | expect(download).toThrow() 10 | }) 11 | 12 | test('download succeeds with empty SVG', () => { 13 | expect(() => download(inputProcessor(createSVG()))).not.toThrow() 14 | expect(commenceDownload).toHaveBeenCalledTimes(1) 15 | expect(commenceDownload.mock.calls[0][0]).toEqual(`${DEFAULT_FILENAME}.svg`) 16 | }) 17 | -------------------------------------------------------------------------------- /biome.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", 3 | "files": { 4 | "ignore": ["dist/", "manual-tests/"] 5 | }, 6 | "organizeImports": { 7 | "enabled": false 8 | }, 9 | "linter": { 10 | "enabled": true, 11 | "rules": { 12 | "recommended": true 13 | } 14 | }, 15 | "formatter": { 16 | "enabled": true, 17 | "formatWithErrors": false, 18 | "indentStyle": "space", 19 | "indentWidth": 2, 20 | "lineWidth": 80, 21 | "ignore": [] 22 | }, 23 | "javascript": { 24 | "formatter": { 25 | "quoteStyle": "single", 26 | "trailingCommas": "none", 27 | "semicolons": "asNeeded" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.github/workflows/readme_to_gh-pages.yml: -------------------------------------------------------------------------------- 1 | name: Copy README to gh-pages branch 2 | on: 3 | push: 4 | branches: [master] 5 | paths: ["README.md"] 6 | 7 | jobs: 8 | copy: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - uses: actions/checkout@v5 13 | with: 14 | ref: "gh-pages" 15 | 16 | - name: copy README to gh-pages branch 17 | run: | 18 | git fetch --depth=1 origin master 19 | git checkout origin/master README.md 20 | git config --local user.email "action@github.com" 21 | git config --local user.name "GitHub Action" 22 | git commit README.md -m 'Copy readme file from master branch' 23 | git push origin gh-pages 24 | -------------------------------------------------------------------------------- /test/png.test.js: -------------------------------------------------------------------------------- 1 | import download, { _fixSource } from '../src/png' 2 | import inputProcessor from '../src/inputProcessor' 3 | 4 | jest.mock('../src/util') 5 | 6 | test('png download requires source', () => { 7 | expect(download).toThrow() 8 | }) 9 | 10 | test('download succeeds with empty SVG', () => { 11 | expect(() => download(inputProcessor(createSVG()))).not.toThrow() 12 | }) 13 | 14 | test('download uses provided safeSource fn', () => { 15 | const safeFnMock = jest.fn() 16 | download(inputProcessor(createSVG()), undefined, { fixSource: safeFnMock }) 17 | expect(safeFnMock).toHaveBeenCalled() 18 | }) 19 | 20 | test('download succeeds with non-ascii chars ☸☹☺☻☼☾☿✓', () => { 21 | const source = 'boom! ☸☹☺☻☼☾☿✓' 22 | expect(() => _fixSource(source)).not.toThrow() 23 | }) 24 | 25 | test.todo('commenceDownload have been called') 26 | -------------------------------------------------------------------------------- /.github/workflows/playwright.yml: -------------------------------------------------------------------------------- 1 | name: Playwright Tests 2 | on: 3 | push: 4 | branches: [ main, master ] 5 | pull_request: 6 | branches: [ main, master ] 7 | jobs: 8 | test: 9 | timeout-minutes: 60 10 | runs-on: macos-latest 11 | steps: 12 | - uses: actions/checkout@v5 13 | - uses: actions/setup-node@v4 14 | with: 15 | node-version: 20 16 | - name: Install dependencies 17 | run: npm ci 18 | - name: Install Playwright Browsers 19 | run: npx playwright install --with-deps 20 | - name: Prepare manual tests 21 | run: npm run prepare-mtests 22 | - name: Run Playwright tests 23 | run: npx playwright test 24 | - uses: actions/upload-artifact@v4 25 | if: always() 26 | with: 27 | name: playwright-report 28 | path: playwright-report/ 29 | retention-days: 30 30 | -------------------------------------------------------------------------------- /src/util.js: -------------------------------------------------------------------------------- 1 | import { REMOVE_TIMEOUT, DEFAULT_FILENAME } from './const' 2 | 3 | export function getFilename(source) { 4 | if (!(source instanceof SVGElement)) { 5 | throw new Error('SVG Element is required') 6 | } 7 | 8 | return ( 9 | source.getAttribute('id') || 10 | source.getAttribute('class') || 11 | document.title.replace(/[^a-z0-9]/gi, '-').toLowerCase() || 12 | DEFAULT_FILENAME 13 | ) 14 | } 15 | 16 | export function commenceDownload(filename, imgdata, callback) { 17 | const a = document.createElement('a') 18 | document.body.appendChild(a) 19 | a.setAttribute('class', 'svg-crowbar') 20 | a.setAttribute('download', filename) 21 | a.setAttribute('href', imgdata) 22 | a.style.display = 'none' 23 | a.click() 24 | 25 | setTimeout(() => { 26 | if (callback) { 27 | callback() 28 | } 29 | document.body.removeChild(a) 30 | }, REMOVE_TIMEOUT) 31 | } 32 | -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Node.js CI 5 | 6 | on: 7 | push: 8 | branches: [ master ] 9 | pull_request: 10 | branches: [ master ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: macOS-latest 16 | 17 | strategy: 18 | matrix: 19 | node-version: [ 18, 20, 22 ] 20 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ 21 | 22 | steps: 23 | - uses: actions/checkout@v5 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v4 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - run: npm ci 29 | - run: npm run lint 30 | - run: npm run test-ci 31 | -------------------------------------------------------------------------------- /test/util.test.js: -------------------------------------------------------------------------------- 1 | import { prefix, DEFAULT_FILENAME } from '../src/const' 2 | import { getFilename } from '../src/util' 3 | 4 | const createSVG = () => document.createElementNS(prefix.svg, 'svg') 5 | describe('getFilename', () => { 6 | beforeEach(() => document.title === '') 7 | test('throws when receves not an SVG', () => { 8 | expect(getFilename).toThrow() 9 | }) 10 | 11 | test('uses default ', () => { 12 | expect(getFilename(createSVG())).toBe(DEFAULT_FILENAME) 13 | }) 14 | test('uses id', () => { 15 | const id = 'boom' 16 | const elem = createSVG() 17 | elem.id = id 18 | expect(getFilename(elem)).toEqual(id) 19 | }) 20 | 21 | test('uses classname', () => { 22 | const classname = 'whatever' 23 | const elem = createSVG() 24 | elem.classList.add(classname) 25 | expect(getFilename(elem)).toEqual(classname) 26 | }) 27 | 28 | test('uses doc title', () => { 29 | const title = 'boom' 30 | document.title = title 31 | expect(getFilename(createSVG())).toBe(title) 32 | }) 33 | }) 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 The New York Times 2 | 3 | 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: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | 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. 8 | -------------------------------------------------------------------------------- /test/inputProcessor.test.js: -------------------------------------------------------------------------------- 1 | import inputProcessor from '../src/inputProcessor' 2 | import { prefix, doctype } from '../src/const' 3 | 4 | const createSVG = () => document.createElementNS(prefix.svg, 'svg') 5 | 6 | describe('inputProcessor', () => { 7 | test('does not add styles to empty svg', () => { 8 | expect(inputProcessor).toThrow() 9 | }) 10 | 11 | test('empty SVG', () => { 12 | const result = inputProcessor(createSVG()) 13 | expect(result.id).toBe(null) 14 | expect(result.class).toBe(null) 15 | expect(result.childElementCount).toBe(0) 16 | expect(result.top).toBe(0) 17 | expect(result.left).toBe(0) 18 | expect(result.width).toBe(0) 19 | expect(result.height).toBe(0) 20 | const svgString = result.source.replace(doctype, '') 21 | const foo = document.createElement('div') 22 | foo.innerHTML = svgString 23 | expect(foo.firstElementChild.tagName).toBe('svg') 24 | expect(foo.firstElementChild.getAttribute('style')).toBe('') 25 | expect(foo.firstElementChild.children.length).toBe(0) 26 | }) 27 | }) 28 | -------------------------------------------------------------------------------- /e2e/viewport-defined.spec.js: -------------------------------------------------------------------------------- 1 | import { test, expect } from '@playwright/test' 2 | 3 | test('png generation: viewbox is defined', async ({ page }) => { 4 | await page.goto('http://localhost:3000/index-umd.html') 5 | const downloadPromise = page.waitForEvent('download') 6 | await page.getByRole('button', { name: 'PNG' }).click() 7 | const download = await downloadPromise 8 | await download.saveAs( 9 | `./manual-tests/test-results/${download.suggestedFilename()}` 10 | ) 11 | expect(download.suggestedFilename()).toBe('sample-png.png') 12 | await page.goto('http://localhost:3000/test-results/sample-png.png') 13 | await expect(page).toHaveScreenshot() 14 | }) 15 | 16 | test('svg generation: viewbox is defined', async ({ page }) => { 17 | await page.goto('http://localhost:3000/index-umd.html') 18 | const downloadPromise = page.waitForEvent('download') 19 | await page.getByRole('button', { name: 'SVG' }).click() 20 | const download = await downloadPromise 21 | await download.saveAs( 22 | `./manual-tests/test-results/${download.suggestedFilename()}` 23 | ) 24 | expect(download.suggestedFilename()).toBe('sample-svg.svg') 25 | await page.goto('http://localhost:3000/test-results/sample-svg.svg') 26 | await expect(page).toHaveScreenshot() 27 | }) 28 | -------------------------------------------------------------------------------- /src/png.js: -------------------------------------------------------------------------------- 1 | import { DEFAULT_FILENAME } from './const' 2 | import { commenceDownload } from './util' 3 | 4 | export function _fixSource(source) { 5 | return btoa( 6 | unescape( 7 | encodeURIComponent( 8 | source.replace(/[\u00A0-\u2666]/g, (c) => `&#${c.charCodeAt(0)};`) 9 | ) 10 | ) 11 | ) 12 | } 13 | 14 | const DEFAULT_OPTIONS = { 15 | debug: false, 16 | fixSource: _fixSource, 17 | scale: 1 18 | } 19 | 20 | function downloadPng( 21 | source, 22 | filename = DEFAULT_FILENAME, 23 | { 24 | debug = DEFAULT_OPTIONS.debug, 25 | fixSource = DEFAULT_OPTIONS.fixSource, 26 | scale = DEFAULT_OPTIONS.scale 27 | } = DEFAULT_OPTIONS 28 | ) { 29 | const canvas = document.createElement('canvas') 30 | const dpr = window.devicePixelRatio || 1 31 | document.body.appendChild(canvas) 32 | canvas.setAttribute('id', 'svg-image') 33 | canvas.setAttribute('width', source.width * dpr * scale) 34 | canvas.setAttribute('height', source.height * dpr * scale) 35 | if (debug === false) { 36 | canvas.style.display = 'none' 37 | } 38 | 39 | const context = canvas.getContext('2d') 40 | const imgsrc = `data:image/svg+xml;base64,${fixSource(source.source)}` 41 | const image = new Image() 42 | 43 | function onLoad() { 44 | context.scale(dpr * scale, dpr * scale) 45 | context.drawImage(image, 0, 0) 46 | const canvasdata = canvas.toDataURL('image/png') 47 | 48 | if (debug === false) { 49 | commenceDownload(`${filename}.png`, canvasdata, () => 50 | document.body.removeChild(canvas) 51 | ) 52 | } 53 | } 54 | 55 | image.onload = onLoad 56 | image.src = imgsrc 57 | if (debug === true) { 58 | document.body.appendChild(image) 59 | } 60 | } 61 | 62 | export default downloadPng 63 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "svg-crowbar", 3 | "version": "0.7.0", 4 | "description": "A library based on a Chrome-specific bookmarklet that extracts SVG nodes and accompanying styles from an HTML document and downloads them as an SVG file", 5 | "main": "./dist/cjs/index.js", 6 | "module": "./dist/esm/index.js", 7 | "files": ["dist"], 8 | "scripts": { 9 | "test": "BABEL_ENV=commonjs jest --forceExit ./test", 10 | "test-ci": "BABEL_ENV=commonjs jest --runInBand --forceExit ./test", 11 | "lint": "npx biome format . && npx biome check .", 12 | "lint-fix": "npx biome format --write . && npx biome check --write .", 13 | "clean": "rm -fr dist manual-tests/main.js", 14 | "build": "npm run clean && npm run build-umd && npm run build-cjs && npm run build-esm", 15 | "build-umd": "webpack --entry ./src/index.js --mode=production", 16 | "build-umd-dev": "webpack --entry ./src/index.js --mode=development", 17 | "build-cjs": "BABEL_ENV=commonjs babel src/* --out-dir dist/cjs --copy-files", 18 | "build-esm": "BABEL_ENV=esmodules babel src/* --out-dir dist/esm --copy-files", 19 | "prepublishOnly": "npm run test-ci && npm run build", 20 | "prepare-mtests": "npm run build-umd && cp ./dist/main.js ./manual-tests" 21 | }, 22 | "repository": "git+https://github.com/cy6erskunk/svg-crowbar.git", 23 | "keywords": ["svg-crowbar", "png-crowbar"], 24 | "author": "Igor Shevchenko ", 25 | "license": "MIT", 26 | "bugs": { 27 | "url": "https://github.com/cy6erskunk/svg-crowbar/issues" 28 | }, 29 | "homepage": "https://svg-crowbar.js.org/", 30 | "devDependencies": { 31 | "@babel/cli": "7.28.3", 32 | "@babel/core": "7.28.5", 33 | "@babel/preset-env": "7.28.5", 34 | "@biomejs/biome": "1.9.4", 35 | "@playwright/test": "1.57.0", 36 | "@types/node": "22.15.18", 37 | "babel-jest": "30.2.0", 38 | "jest": "30.2.0", 39 | "jest-canvas-mock": "2.5.2", 40 | "jest-environment-jsdom": "30.2.0", 41 | "serve": "14.2.5", 42 | "webpack": "5.104.1", 43 | "webpack-cli": "6.0.1" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /manual-tests/index-umd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Smanual tests 5 | 6 | 11 | 39 | 40 | 41 | 42 | 43 |

viewBox="0 0 500 300"

44 |
45 | 46 | Internal CSS, this text should be indigo ☸☹☺☻☼☾☿✓ 47 | Imported CSS, this text should be indianred. 48 | Linked CSS, this text should be lightsalmon. 49 | An HTML dependency, this text should be seagreen. 50 | 51 |
52 |
53 | 54 | 55 |
56 | 57 | 62 | 63 | -------------------------------------------------------------------------------- /manual-tests/index-umd-no-viewbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Smanual tests 5 | 6 | 11 | 41 | 42 | 43 | 44 | 45 |

no viewBox

46 |
47 | 48 | Internal CSS, this text should be indigo ☸☹☺☻☼☾☿✓ 49 | Imported CSS, this text should be indianred. 50 | Linked CSS, this text should be lightsalmon. 51 | An HTML dependency, this text should be seagreen. 52 | 53 |
54 |
55 |
56 | 57 | 58 |
59 |
60 | 61 |
62 |
63 | 64 | 74 | 75 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ master ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ master ] 20 | schedule: 21 | - cron: '27 7 * * 4' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | 28 | strategy: 29 | fail-fast: false 30 | matrix: 31 | language: [ 'javascript' ] 32 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] 33 | # Learn more: 34 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed 35 | 36 | steps: 37 | - name: Checkout repository 38 | uses: actions/checkout@v5 39 | 40 | # Initializes the CodeQL tools for scanning. 41 | - name: Initialize CodeQL 42 | uses: github/codeql-action/init@v3 43 | with: 44 | languages: ${{ matrix.language }} 45 | # If you wish to specify custom queries, you can do so here or in a config file. 46 | # By default, queries listed here will override any specified in a config file. 47 | # Prefix the list here with "+" to use these queries and those in the config file. 48 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 49 | 50 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 51 | # If this step fails, then you should remove it and run the build manually (see below) 52 | - name: Autobuild 53 | uses: github/codeql-action/autobuild@v3 54 | 55 | # ℹ️ Command-line programs to run using the OS shell. 56 | # 📚 https://git.io/JvXDl 57 | 58 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 59 | # and modify them (or add more) to build your code if your project 60 | # uses a compiled language 61 | 62 | #- run: | 63 | # make bootstrap 64 | # make release 65 | 66 | - name: Perform CodeQL Analysis 67 | uses: github/codeql-action/analyze@v3 68 | -------------------------------------------------------------------------------- /manual-tests/index-umd-png-errors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | manual tests 5 | 28 | 29 | 30 |
31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 | 44 |
45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
55 | 58 |
59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
69 | 72 | 73 | 84 | 85 | -------------------------------------------------------------------------------- /playwright.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | const { defineConfig, devices } = require('@playwright/test') 3 | 4 | /** 5 | * Read environment variables from file. 6 | * https://github.com/motdotla/dotenv 7 | */ 8 | // require('dotenv').config(); 9 | 10 | /** 11 | * @see https://playwright.dev/docs/test-configuration 12 | */ 13 | module.exports = defineConfig({ 14 | testDir: './e2e', 15 | /* Run tests in files in parallel */ 16 | fullyParallel: true, 17 | /* Fail the build on CI if you accidentally left test.only in the source code. */ 18 | forbidOnly: !!process.env.CI, 19 | /* Retry on CI only */ 20 | retries: process.env.CI ? 2 : 0, 21 | /* Opt out of parallel tests on CI. */ 22 | workers: process.env.CI ? 1 : undefined, 23 | /* Reporter to use. See https://playwright.dev/docs/test-reporters */ 24 | reporter: 'html', 25 | /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ 26 | use: { 27 | /* Base URL to use in actions like `await page.goto('/')`. */ 28 | // baseURL: 'http://127.0.0.1:3000', 29 | 30 | /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ 31 | trace: 'on-first-retry' 32 | }, 33 | 34 | expect: { 35 | toHaveScreenshot: { maxDiffPixels: 10 } 36 | }, 37 | 38 | /* Configure projects for major browsers */ 39 | projects: [ 40 | // { 41 | // name: 'chromium', 42 | // use: { ...devices['Desktop Chrome'] }, 43 | // }, 44 | { 45 | name: 'firefox', 46 | use: { ...devices['Desktop Firefox'], deviceScaleFactor: 1 } 47 | }, 48 | { 49 | name: 'firefox @2x', 50 | use: { ...devices['Desktop Firefox'], deviceScaleFactor: 2 } 51 | }, 52 | 53 | // { 54 | // name: 'webkit', 55 | // use: { ...devices['Desktop Safari'] }, 56 | // }, 57 | 58 | /* Test against mobile viewports. */ 59 | // { 60 | // name: 'Mobile Chrome', 61 | // use: { ...devices['Pixel 5'] }, 62 | // }, 63 | // { 64 | // name: 'Mobile Safari', 65 | // use: { ...devices['iPhone 12'] }, 66 | // }, 67 | 68 | /* Test against branded browsers. */ 69 | // { 70 | // name: 'Microsoft Edge', 71 | // use: { ...devices['Desktop Edge'], channel: 'msedge' }, 72 | // }, 73 | { 74 | name: 'Google Chrome', 75 | use: { 76 | ...devices['Desktop Chrome'], 77 | channel: 'chrome', 78 | deviceScaleFactor: 1 79 | } 80 | }, 81 | { 82 | name: 'Google Chrome @2x', 83 | use: { 84 | ...devices['Desktop Chrome'], 85 | channel: 'chrome', 86 | deviceScaleFactor: 2 87 | } 88 | } 89 | ], 90 | 91 | /* Run your local dev server before starting the tests */ 92 | webServer: { 93 | command: 'npx serve manual-tests', 94 | url: 'http://127.0.0.1:3000', 95 | reuseExistingServer: !process.env.CI 96 | } 97 | }) 98 | -------------------------------------------------------------------------------- /src/inputProcessor.js: -------------------------------------------------------------------------------- 1 | import { doctype, prefix } from './const' 2 | 3 | function getEmptySvgDeclarationComputed() { 4 | let emptySvg = document.createElementNS(prefix.svg, 'svg') 5 | document.body.appendChild(emptySvg) 6 | emptySvg.style.all = 'initial' 7 | const emptySvgDeclarationComputed = getComputedStyle(emptySvg) 8 | document.body.removeChild(emptySvg) 9 | emptySvg = null 10 | return emptySvgDeclarationComputed 11 | } 12 | 13 | function getSource(svg, { css = 'inline' } = {}) { 14 | if (!(svg instanceof SVGElement)) { 15 | throw new Error('SVG element is required') 16 | } 17 | 18 | svg.setAttribute('version', '1.1') 19 | // removing attributes so they aren't doubled up 20 | svg.removeAttribute('xmlns') 21 | svg.removeAttribute('xlink') 22 | 23 | // These are needed for the svg 24 | if (!svg.hasAttributeNS(prefix.xmlns, 'xmlns')) { 25 | svg.setAttributeNS(prefix.xmlns, 'xmlns', prefix.svg) 26 | } 27 | 28 | if (!svg.hasAttributeNS(prefix.xmlns, 'xmlns:xlink')) { 29 | svg.setAttributeNS(prefix.xmlns, 'xmlns:xlink', prefix.xlink) 30 | } 31 | 32 | if (css === 'inline') { 33 | setInlineStyles(svg, getEmptySvgDeclarationComputed()) 34 | } else if (css === 'internal') { 35 | setInternalStyles(svg) 36 | } 37 | 38 | const source = new XMLSerializer().serializeToString(svg) 39 | const rect = svg.getBoundingClientRect() 40 | 41 | const result = { 42 | top: rect.top, 43 | left: rect.left, 44 | width: rect.width, 45 | height: rect.height, 46 | class: svg.getAttribute('class'), 47 | id: svg.getAttribute('id'), 48 | name: svg.getAttribute('name'), 49 | childElementCount: svg.childElementCount, 50 | source: doctype + source 51 | } 52 | 53 | return result 54 | } 55 | 56 | function setInlineStyles(svg, emptySvgDeclarationComputed) { 57 | function explicitlySetStyle(element) { 58 | const cSSStyleDeclarationComputed = getComputedStyle(element) 59 | let key 60 | let value 61 | let computedStyleStr = '' 62 | for (let i = 0, len = cSSStyleDeclarationComputed.length; i < len; i++) { 63 | key = cSSStyleDeclarationComputed[i] 64 | value = cSSStyleDeclarationComputed.getPropertyValue(key) 65 | if (value !== emptySvgDeclarationComputed.getPropertyValue(key)) { 66 | computedStyleStr += `${key}:${value};` 67 | } 68 | } 69 | element.setAttribute('style', computedStyleStr) 70 | } 71 | function traverse(obj) { 72 | const tree = [] 73 | tree.push(obj) 74 | visit(obj) 75 | function visit(node) { 76 | if (node?.hasChildNodes()) { 77 | let child = node.firstChild 78 | while (child) { 79 | if (child.nodeType === 1 && child.nodeName !== 'SCRIPT') { 80 | tree.push(child) 81 | visit(child) 82 | } 83 | child = child.nextSibling 84 | } 85 | } 86 | } 87 | return tree 88 | } 89 | // hardcode computed css styles inside svg 90 | const allElements = traverse(svg) 91 | let i = allElements.length 92 | while (i--) { 93 | explicitlySetStyle(allElements[i]) 94 | } 95 | } 96 | 97 | function setInternalStyles(svg) { 98 | const style = document.createElement('style') 99 | style.innerHTML = Array.from(document.styleSheets) 100 | .filter( 101 | (styleSheet) => 102 | // Prevent CORS errors 103 | !styleSheet.href || styleSheet.href.startsWith(document.location.origin) 104 | ) 105 | .map((styleSheet) => 106 | Array.from(styleSheet.cssRules) 107 | .map((rule) => rule.cssText) 108 | .join(' ') 109 | ) 110 | .join(' ') 111 | svg.prepend(style) 112 | } 113 | 114 | export default getSource 115 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SVG Crowbar Library 2 | [![NPM version](https://img.shields.io/npm/v/svg-crowbar.svg)](https://www.npmjs.com/package/svg-crowbar) 3 | [![code style: Biome](https://img.shields.io/npm/v/npm.svg?logo=biome)](https://biomejs.dev/) 4 | [![Build status](https://github.com/cy6erskunk/svg-crowbar/actions/workflows/node.js.yml/badge.svg)](https://github.com/cy6erskunk/svg-crowbar/actions/workflows/node.js.yml) 5 | ![Copy README to gh-pages branch](https://github.com/cy6erskunk/svg-crowbar/workflows/Copy%20README%20to%20gh-pages%20branch/badge.svg) 6 | 7 | A standalone 3.5Kb JS client library based on Chrome [bookmarklet](https://nytimes.github.io/svg-crowbar/). 8 | 9 | The library provides functionality to trigger a download of a given SVG file having all the styles inlined, 10 | to make it look the same when opened independently from the original HTML page. 11 | 12 | It is also possible to use this library to convert an SVG to a PNG before downloading. 13 | 14 | ## Usage 15 | ```javascript 16 | import downloadSvg from 'svg-crowbar'; 17 | 18 | downloadSvg(document.querySelector('svg')); 19 | ``` 20 | or 21 | ```javascript 22 | import { downloadPng } from 'svg-crowbar'; 23 | 24 | downloadPng(document.querySelector('svg'), 'my_svg', { css: 'internal' }); 25 | ``` 26 | 27 | The `downloadSVG`/`downloadPNG` functions each have three arguments: 28 | 29 | ```javascript 30 | downloadSVG(svgElement, [filename], [options]) 31 | downloadPNG(svgElement, [filename], [options]) 32 | ``` 33 | 34 | ### Options 35 | 36 | - **svgElement** *(required)* 37 | 38 | A DOM element selector for an SVG, e.g. `document.querySelector('svg')`. An error is thrown if no valid SVG element was provided. 39 | 40 | - **filename** *(optional)* 41 | 42 | A string to set the filename. This is determined by element id, class or page title, when not provided explicitly. 43 | 44 | - **options** *(optional)* 45 | 46 | An object literal. It presently has two configurable properties: 47 | 48 | - **options.css** *(optional)* 49 | 50 | This setting determines how the SVG will be styled: 51 | 52 | - **`'inline'`** 53 | 54 | Default value. Inlines all computed styles on every element in the SVG. This setting best ensures that the exported SVG is accurate cross-browser. 55 | 56 | - **`'internal'`** 57 | 58 | Adds an internal block of styles containing only explicitly declared style rules (from `document.styleSheets`). This can drastically reduce file-sizes and build time in exported SVGs, but could be less accurate as it does not include styles from the browser's user agent stylesheet, or from cross-origin stylesheets (e.g. external webfonts). 59 | 60 | - **`'none'`** 61 | 62 | Doesn't add any CSS. This gives the smallest file-size, but you might need to manually add your own styles to exported SVGs to ensure an accurate output. You can do this by injecting a ` 14 | 15 | 16 |
17 | 23 | 28 | 29 | 40 | 41 | 42 | 43 | 44 | 51 | 52 | 53 | 54 | 61 | 62 | 70 | 77 | params: Sales Model ✓ 78 | 79 | 80 | 87 | 88 | 96 | 103 | params: Engagement Model 104 | 105 | 106 | 113 | 114 | 122 | 129 | params: Optimisation 130 | 131 | 132 | 133 | 134 | 135 |
136 |
137 | 138 | 139 |
140 | 141 | 146 | 147 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## v0.7.0 (09/08/2021) 4 | - [#433](https://github.com/cy6erskunk/svg-crowbar/pull/433) Add scaling for PNGs 5 | 6 |
7 | Updated dependencies 8 | 9 | - [#333](https://github.com/cy6erskunk/svg-crowbar/pull/333) Update dependency webpack to v5.24.4 10 | - [#332](https://github.com/cy6erskunk/svg-crowbar/pull/332) Update dependency webpack to v5.24.3 11 | - [#331](https://github.com/cy6erskunk/svg-crowbar/pull/331) Update dependency @babel/preset-env to v7.13.9 12 | - [#330](https://github.com/cy6erskunk/svg-crowbar/pull/330) Update babel monorepo to v7.13.8 13 | - [#329](https://github.com/cy6erskunk/svg-crowbar/pull/329) Update dependency webpack to v5.24.2 14 | - [#328](https://github.com/cy6erskunk/svg-crowbar/pull/328) Update dependency webpack to v5.24.1 15 | - [#327](https://github.com/cy6erskunk/svg-crowbar/pull/327) Update dependency @babel/preset-env to v7.13.5 16 | - [#324](https://github.com/cy6erskunk/svg-crowbar/pull/324) Update babel monorepo 17 | - [#325](https://github.com/cy6erskunk/svg-crowbar/pull/325) Update dependency webpack to v5.24.0 18 | - [#323](https://github.com/cy6erskunk/svg-crowbar/pull/323) Update dependency electron to v10.4.0 19 | - [#322](https://github.com/cy6erskunk/svg-crowbar/pull/322) Update dependency webpack to v5.23.0 20 | - [#321](https://github.com/cy6erskunk/svg-crowbar/pull/321) Update babel monorepo to v7.12.17 21 | - [#320](https://github.com/cy6erskunk/svg-crowbar/pull/320) Update dependency webpack to v5.22.0 22 | - [#318](https://github.com/cy6erskunk/svg-crowbar/pull/318) Update babel monorepo to v7.12.16 23 | - [#317](https://github.com/cy6erskunk/svg-crowbar/pull/317) Update Node.js to v14.15.5 24 | - [#316](https://github.com/cy6erskunk/svg-crowbar/pull/316) Update dependency webpack to v5.21.2 25 | - [#315](https://github.com/cy6erskunk/svg-crowbar/pull/315) Update dependency webpack to v5.21.1 26 | - [#314](https://github.com/cy6erskunk/svg-crowbar/pull/314) Update dependency electron to v10.3.2 27 | - [#313](https://github.com/cy6erskunk/svg-crowbar/pull/313) Update dependency webpack to v5.21.0 28 | - [#312](https://github.com/cy6erskunk/svg-crowbar/pull/312) Update dependency webpack to v5.20.2 29 | - [#311](https://github.com/cy6erskunk/svg-crowbar/pull/311) Update dependency webpack to v5.20.1 30 | - [#310](https://github.com/cy6erskunk/svg-crowbar/pull/310) Update babel monorepo to v7.12.13 31 | - [#307](https://github.com/cy6erskunk/svg-crowbar/pull/307) Update dependency webpack to v5.20.0 32 | - [#309](https://github.com/cy6erskunk/svg-crowbar/pull/309) Update dependency webpack-cli to v4.5.0 33 | - [#308](https://github.com/cy6erskunk/svg-crowbar/pull/308) Update dependency eslint to v7.19.0 34 | - [#306](https://github.com/cy6erskunk/svg-crowbar/pull/306) Update dependency electron to v10.3.1 35 | - [#305](https://github.com/cy6erskunk/svg-crowbar/pull/305) Update dependency webpack to v5.18.0 36 | - [#304](https://github.com/cy6erskunk/svg-crowbar/pull/304) Update dependency webpack to v5.17.0 37 | - [#302](https://github.com/cy6erskunk/svg-crowbar/pull/302) Update dependency webpack to v5.16.0 38 | - [#301](https://github.com/cy6erskunk/svg-crowbar/pull/301) Update dependency webpack-cli to v4.4.0 39 | - [#300](https://github.com/cy6erskunk/svg-crowbar/pull/300) Update dependency eslint to v7.18.0 40 | - [#299](https://github.com/cy6erskunk/svg-crowbar/pull/299) Update dependency electron to v10.3.0 41 | - [#298](https://github.com/cy6erskunk/svg-crowbar/pull/298) Update dependency webpack to v5.15.0 42 | - [#297](https://github.com/cy6erskunk/svg-crowbar/pull/297) Update dependency webpack to v5.14.0 43 | - [#296](https://github.com/cy6erskunk/svg-crowbar/pull/296) Update dependency webpack to v5.13.0 44 | - [#295](https://github.com/cy6erskunk/svg-crowbar/pull/295) Update dependency webpack to v5.12.3 45 | - [#294](https://github.com/cy6erskunk/svg-crowbar/pull/294) Update dependency webpack to v5.12.2 46 | - [#293](https://github.com/cy6erskunk/svg-crowbar/pull/293) Update dependency webpack to v5.12.1 47 | - [#292](https://github.com/cy6erskunk/svg-crowbar/pull/292) Update dependency webpack to v5.12.0 48 | - [#434](https://github.com/cy6erskunk/svg-crowbar/pull/434) Update dependency webpack to v5.49.0 49 | - [#431](https://github.com/cy6erskunk/svg-crowbar/pull/431) Update babel monorepo to v7.15.0 50 | - [#430](https://github.com/cy6erskunk/svg-crowbar/pull/430) Update dependency electron to v13.1.8 51 | - [#429](https://github.com/cy6erskunk/svg-crowbar/pull/429) Update dependency webpack to v5.48.0 52 | - [#428](https://github.com/cy6erskunk/svg-crowbar/pull/428) Update dependency @babel/preset-env to v7.14.9 53 | - [#427](https://github.com/cy6erskunk/svg-crowbar/pull/427) Update dependency eslint to v7.32.0 54 | - [#319](https://github.com/cy6erskunk/svg-crowbar/pull/319) Update dependency eslint to v7.31.0 55 | - [#425](https://github.com/cy6erskunk/svg-crowbar/pull/425) Update dependency webpack to v5.47.1 56 | - [#424](https://github.com/cy6erskunk/svg-crowbar/pull/424) Update dependency webpack to v5.47.0 57 | - [#423](https://github.com/cy6erskunk/svg-crowbar/pull/423) Update dependency webpack to v5.46.0 58 | - [#422](https://github.com/cy6erskunk/svg-crowbar/pull/422) Update babel monorepo to v7.14.8 59 | - [#421](https://github.com/cy6erskunk/svg-crowbar/pull/421) Update dependency webpack to v5.45.1 60 | - [#420](https://github.com/cy6erskunk/svg-crowbar/pull/420) Update dependency webpack to v5.45.0 61 | - [#419](https://github.com/cy6erskunk/svg-crowbar/pull/419) Update dependency electron to v13.1.7 62 | - [#412](https://github.com/cy6erskunk/svg-crowbar/pull/412) Update Node.js to v14.17.3 63 | - [#418](https://github.com/cy6erskunk/svg-crowbar/pull/418) Update dependency webpack to v5.44.0 64 | - [#417](https://github.com/cy6erskunk/svg-crowbar/pull/417) Update dependency webpack to v5.43.0 65 | - [#416](https://github.com/cy6erskunk/svg-crowbar/pull/416) Update dependency electron to v13.1.6 66 | - [#415](https://github.com/cy6erskunk/svg-crowbar/pull/415) Update dependency webpack to v5.42.1 67 | - [#414](https://github.com/cy6erskunk/svg-crowbar/pull/414) Update dependency webpack to v5.42.0 68 | - [#413](https://github.com/cy6erskunk/svg-crowbar/pull/413) Update dependency electron to v13.1.5 69 | - [#411](https://github.com/cy6erskunk/svg-crowbar/pull/411) Update dependency webpack to v5.41.1 70 | - [#409](https://github.com/cy6erskunk/svg-crowbar/pull/409) Update dependency webpack to v5.41.0 71 | - [#408](https://github.com/cy6erskunk/svg-crowbar/pull/408) Update dependency prettier to v2.3.2 72 | - [#406](https://github.com/cy6erskunk/svg-crowbar/pull/406) Remove travis config 73 | - [#388](https://github.com/cy6erskunk/svg-crowbar/pull/388) Update dependency electron to v13 74 | - [#405](https://github.com/cy6erskunk/svg-crowbar/pull/405) Add node.js workflow 75 | - [#356](https://github.com/cy6erskunk/svg-crowbar/pull/356) Update Node.js to v14.17.1 76 | - [#404](https://github.com/cy6erskunk/svg-crowbar/pull/404) Update dependency @babel/preset-env to v7.14.7 77 | - [#403](https://github.com/cy6erskunk/svg-crowbar/pull/403) Update dependency electron to v12.0.12 78 | - [#402](https://github.com/cy6erskunk/svg-crowbar/pull/402) Update dependency webpack to v5.40.0 79 | - [#401](https://github.com/cy6erskunk/svg-crowbar/pull/401) Update dependency webpack to v5.39.1 80 | - [#400](https://github.com/cy6erskunk/svg-crowbar/pull/400) Update dependency webpack to v5.39.0 81 | - [#399](https://github.com/cy6erskunk/svg-crowbar/pull/399) Update dependency @babel/core to v7.14.6 82 | - [#398](https://github.com/cy6erskunk/svg-crowbar/pull/398) Update babel monorepo to v7.14.5 83 | - [#397](https://github.com/cy6erskunk/svg-crowbar/pull/397) Update dependency electron to v12.0.11 84 | - [#396](https://github.com/cy6erskunk/svg-crowbar/pull/396) Update dependency webpack-cli to v4.7.2 85 | - [#395](https://github.com/cy6erskunk/svg-crowbar/pull/395) Update dependency webpack-cli to v4.7.1 86 | - [#394](https://github.com/cy6erskunk/svg-crowbar/pull/394) Update dependency prettier to v2.3.1 87 | - [#393](https://github.com/cy6erskunk/svg-crowbar/pull/393) Update dependency electron to v12.0.10 88 | - [#392](https://github.com/cy6erskunk/svg-crowbar/pull/392) Update dependency @babel/preset-env to v7.14.4 89 | - [#391](https://github.com/cy6erskunk/svg-crowbar/pull/391) Update dependency webpack to v5.38.1 90 | - [#390](https://github.com/cy6erskunk/svg-crowbar/pull/390) Update dependency webpack to v5.38.0 91 | - [#387](https://github.com/cy6erskunk/svg-crowbar/pull/387) Update dependency electron to v12.0.9 92 | - [#386](https://github.com/cy6erskunk/svg-crowbar/pull/386) Update dependency webpack to v5.37.1 93 | - [#385](https://github.com/cy6erskunk/svg-crowbar/pull/385) Update dependency electron to v12.0.8 94 | - [#384](https://github.com/cy6erskunk/svg-crowbar/pull/384) Update babel monorepo to v7.14.3 95 | - [#383](https://github.com/cy6erskunk/svg-crowbar/pull/383) Update babel monorepo to v7.14.2 96 | - [#382](https://github.com/cy6erskunk/svg-crowbar/pull/382) Update dependency webpack to v5.37.0 97 | - [#381](https://github.com/cy6erskunk/svg-crowbar/pull/381) Update dependency prettier to v2.3.0 98 | - [#380](https://github.com/cy6erskunk/svg-crowbar/pull/380) Update dependency electron to v12.0.7 99 | - [#378](https://github.com/cy6erskunk/svg-crowbar/pull/378) Update dependency webpack-cli to v4.7.0 100 | - [#377](https://github.com/cy6erskunk/svg-crowbar/pull/377) Update dependency @babel/preset-env to v7.14.1 101 | - [#376](https://github.com/cy6erskunk/svg-crowbar/pull/376) Update dependency electron to v12.0.6 102 | - [#375](https://github.com/cy6erskunk/svg-crowbar/pull/375) Update dependency webpack to v5.36.2 103 | - [#374](https://github.com/cy6erskunk/svg-crowbar/pull/374) Update babel monorepo to v7.14.0 104 | - [#373](https://github.com/cy6erskunk/svg-crowbar/pull/373) Update dependency webpack to v5.36.1 105 | - [#372](https://github.com/cy6erskunk/svg-crowbar/pull/372) Update dependency webpack to v5.36.0 106 | - [#371](https://github.com/cy6erskunk/svg-crowbar/pull/371) Update dependency eslint-config-prettier to v8.3.0 107 | - [#370](https://github.com/cy6erskunk/svg-crowbar/pull/370) Update dependency webpack to v5.35.1 108 | - [#369](https://github.com/cy6erskunk/svg-crowbar/pull/369) Update dependency webpack to v5.35.0 109 | - [#368](https://github.com/cy6erskunk/svg-crowbar/pull/368) Update dependency electron to v12.0.5 110 | - [#367](https://github.com/cy6erskunk/svg-crowbar/pull/367) Update babel monorepo to v7.13.16 111 | - [#366](https://github.com/cy6erskunk/svg-crowbar/pull/366) Update dependency webpack to v5.34.0 112 | - [#365](https://github.com/cy6erskunk/svg-crowbar/pull/365) Update dependency eslint-plugin-prettier to v3.4.0 113 | - [#364](https://github.com/cy6erskunk/svg-crowbar/pull/364) Update dependency webpack to v5.33.2 114 | - [#363](https://github.com/cy6erskunk/svg-crowbar/pull/363) Update dependency electron to v12.0.4 115 | - [#362](https://github.com/cy6erskunk/svg-crowbar/pull/362) Update dependency electron to v12.0.3 116 | - [#361](https://github.com/cy6erskunk/svg-crowbar/pull/361) Update dependency eslint-config-prettier to v8.2.0 117 | - [#360](https://github.com/cy6erskunk/svg-crowbar/pull/360) Update dependency webpack to v5.32.0 118 | - [#359](https://github.com/cy6erskunk/svg-crowbar/pull/359) Update dependency webpack to v5.31.2 119 | - [#358](https://github.com/cy6erskunk/svg-crowbar/pull/358) Update babel monorepo to v7.13.15 120 | - [#357](https://github.com/cy6erskunk/svg-crowbar/pull/357) Update dependency webpack to v5.31.0 121 | - [#355](https://github.com/cy6erskunk/svg-crowbar/pull/355) Update dependency webpack to v5.30.0 122 | - [#354](https://github.com/cy6erskunk/svg-crowbar/pull/354) Update dependency webpack to v5.29.0 123 | - [#334](https://github.com/cy6erskunk/svg-crowbar/pull/334) Update dependency electron to v12 124 | - [#335](https://github.com/cy6erskunk/svg-crowbar/pull/335) Update dependency eslint-config-prettier to v8 125 | - [#326](https://github.com/cy6erskunk/svg-crowbar/pull/326) Update Node.js to v14.16.0 126 | - [#353](https://github.com/cy6erskunk/svg-crowbar/pull/353) Update babel monorepo to v7.13.14 127 | - [#352](https://github.com/cy6erskunk/svg-crowbar/pull/352) Update dependency webpack-cli to v4.6.0 128 | - [#351](https://github.com/cy6erskunk/svg-crowbar/pull/351) Update dependency @babel/core to v7.13.13 129 | - [#350](https://github.com/cy6erskunk/svg-crowbar/pull/350) Update dependency webpack to v5.28.0 130 | - [#349](https://github.com/cy6erskunk/svg-crowbar/pull/349) Update dependency electron to v10.4.2 131 | - [#348](https://github.com/cy6erskunk/svg-crowbar/pull/348) Update dependency @babel/preset-env to v7.13.12 132 | - [#347](https://github.com/cy6erskunk/svg-crowbar/pull/347) Update dependency webpack to v5.27.2 133 | - [#346](https://github.com/cy6erskunk/svg-crowbar/pull/346) Update dependency webpack to v5.27.1 134 | - [#345](https://github.com/cy6erskunk/svg-crowbar/pull/345) Update dependency webpack to v5.27.0 135 | - [#344](https://github.com/cy6erskunk/svg-crowbar/pull/344) Update dependency webpack to v5.26.3 136 | - [#343](https://github.com/cy6erskunk/svg-crowbar/pull/343) Update dependency @jest-runner/electron to v3.0.1 137 | - [#342](https://github.com/cy6erskunk/svg-crowbar/pull/342) Update dependency webpack to v5.26.2 138 | - [#341](https://github.com/cy6erskunk/svg-crowbar/pull/341) Update dependency webpack to v5.26.1 139 | - [#340](https://github.com/cy6erskunk/svg-crowbar/pull/340) Update dependency electron to v10.4.1 140 | - [#339](https://github.com/cy6erskunk/svg-crowbar/pull/339) Update dependency webpack to v5.26.0 141 | - [#338](https://github.com/cy6erskunk/svg-crowbar/pull/338) Update dependency webpack to v5.25.1 142 | - [#337](https://github.com/cy6erskunk/svg-crowbar/pull/337) Update dependency webpack to v5.25.0 143 | - [#336](https://github.com/cy6erskunk/svg-crowbar/pull/336) Update babel monorepo to v7.13.10 144 |
145 | 146 | --- 147 | 148 | ## v0.6.5 (06/01/2021) 149 | - [#290](https://github.com/cy6erskunk/svg-crowbar/pull/290) Revert png drawing dimentions to v0.6.0 150 | 151 |
152 | Updated dependencies 153 | 154 | - [#284](https://github.com/cy6erskunk/svg-crowbar/pull/284) Update dependency webpack-cli to v4.3.1 155 | - [#291](https://github.com/cy6erskunk/svg-crowbar/pull/291) Update Node.js to the latest LTS 156 | - [#289](https://github.com/cy6erskunk/svg-crowbar/pull/289) Update dependency eslint-plugin-prettier to v3.3.1 157 | - [#287](https://github.com/cy6erskunk/svg-crowbar/pull/287) Update dependency eslint to v7.17.0 158 |
159 | 160 | --- 161 | 162 | ## v0.6.4 (29/12/2020) 163 | - [#285](https://github.com/cy6erskunk/svg-crowbar/pull/285) Fix #278 call stack exceeded 164 | 165 |
166 | Updated dependencies 167 | 168 | - [#286](https://github.com/cy6erskunk/svg-crowbar/pull/286) Update dependency webpack to v5.11.1 169 | - [#283](https://github.com/cy6erskunk/svg-crowbar/pull/283) Add test case from #75 170 | - [#282](https://github.com/cy6erskunk/svg-crowbar/pull/282) Bump node-notifier from 8.0.0 to 8.0.1 171 | - [#281](https://github.com/cy6erskunk/svg-crowbar/pull/281) Add script to prepare manual tests 172 | - [#280](https://github.com/cy6erskunk/svg-crowbar/pull/280) Add manual tests setup 173 |
174 | 175 | --- 176 | 177 | ## v0.6.3 (18/12/2020) 178 | - [#276](https://github.com/cy6erskunk/svg-crowbar/pull/276) Prevent CORS errors when using internal styles 179 | 180 | --- 181 | 182 | ## v0.6.2 (08/12/2020) 183 | - [#260](https://github.com/cy6erskunk/svg-crowbar/pull/260) Fix #259 184 | 185 |
186 | Updated dependencies 187 | 188 | - [#267](https://github.com/cy6erskunk/svg-crowbar/pull/267) Update dependency eslint to v7.15.0 189 | - [#266](https://github.com/cy6erskunk/svg-crowbar/pull/266) Update dependency webpack to v5.10.0 190 | - [#265](https://github.com/cy6erskunk/svg-crowbar/pull/265) Update dependency eslint-plugin-prettier to v3.2.0 191 | - [#264](https://github.com/cy6erskunk/svg-crowbar/pull/264) Update dependency webpack to v5.9.0 192 | - [#263](https://github.com/cy6erskunk/svg-crowbar/pull/263) Update dependency prettier to v2.2.1 193 | - [#262](https://github.com/cy6erskunk/svg-crowbar/pull/262) Update dependency webpack to v5.8.0 194 | - [#261](https://github.com/cy6erskunk/svg-crowbar/pull/261) Update dependency webpack to v5.7.0 195 | - [#258](https://github.com/cy6erskunk/svg-crowbar/pull/258) Update dependency @babel/core to v7.12.9 196 | - [#257](https://github.com/cy6erskunk/svg-crowbar/pull/257) Update babel monorepo to v7.12.8 197 | - [#256](https://github.com/cy6erskunk/svg-crowbar/pull/256) Update dependency eslint to v7.14.0 198 | - [#255](https://github.com/cy6erskunk/svg-crowbar/pull/255) Update babel monorepo to v7.12.7 199 | - [#254](https://github.com/cy6erskunk/svg-crowbar/pull/254) Update dependency prettier to v2.2.0 200 | - [#253](https://github.com/cy6erskunk/svg-crowbar/pull/253) Update dependency webpack to v5.6.0 201 | - [#252](https://github.com/cy6erskunk/svg-crowbar/pull/252) Update dependency electron to v10.1.6 202 | - [#251](https://github.com/cy6erskunk/svg-crowbar/pull/251) Update dependency webpack to v5.5.1 203 | - [#250](https://github.com/cy6erskunk/svg-crowbar/pull/250) Update dependency webpack to v5.5.0 204 | - [#248](https://github.com/cy6erskunk/svg-crowbar/pull/248) Update dependency eslint to v7.13.0 205 | - [#247](https://github.com/cy6erskunk/svg-crowbar/pull/247) Update dependency webpack-cli to v4.2.0 206 | - [#246](https://github.com/cy6erskunk/svg-crowbar/pull/246) Update jest monorepo to v26.6.3 207 | - [#245](https://github.com/cy6erskunk/svg-crowbar/pull/245) Update dependency webpack to v5.4.0 208 | - [#244](https://github.com/cy6erskunk/svg-crowbar/pull/244) Update jest monorepo to v26.6.2 209 | - [#243](https://github.com/cy6erskunk/svg-crowbar/pull/243) Update dependency webpack to v5.3.2 210 | - [#242](https://github.com/cy6erskunk/svg-crowbar/pull/242) Update dependency webpack to v5.3.1 211 | - [#241](https://github.com/cy6erskunk/svg-crowbar/pull/241) Update dependency eslint-config-prettier to v6.15.0 212 | - [#240](https://github.com/cy6erskunk/svg-crowbar/pull/240) Update dependency webpack to v5.3.0 213 | - [#239](https://github.com/cy6erskunk/svg-crowbar/pull/239) Update dependency eslint to v7.12.1 214 | - [#238](https://github.com/cy6erskunk/svg-crowbar/pull/238) Update dependency eslint to v7.12.0 215 | - [#237](https://github.com/cy6erskunk/svg-crowbar/pull/237) Update dependency electron to v10.1.5 216 | - [#235](https://github.com/cy6erskunk/svg-crowbar/pull/235) Update dependency webpack to v5.2.0 217 | - [#222](https://github.com/cy6erskunk/svg-crowbar/pull/222) Update dependency webpack-cli to v4 218 | - [#236](https://github.com/cy6erskunk/svg-crowbar/pull/236) Update jest monorepo to v26.6.1 219 | - [#234](https://github.com/cy6erskunk/svg-crowbar/pull/234) Update dependency eslint-config-prettier to v6.14.0 220 | - [#233](https://github.com/cy6erskunk/svg-crowbar/pull/233) Update dependency electron to v10.1.4 221 | - [#232](https://github.com/cy6erskunk/svg-crowbar/pull/232) Update jest monorepo to v26.6.0 222 | - [#231](https://github.com/cy6erskunk/svg-crowbar/pull/231) Update dependency @babel/core to v7.12.3 223 | - [#220](https://github.com/cy6erskunk/svg-crowbar/pull/220) Update Node.js to v12.19.0 224 | - [#230](https://github.com/cy6erskunk/svg-crowbar/pull/230) Update dependency eslint-config-prettier to v6.13.0 225 | - [#229](https://github.com/cy6erskunk/svg-crowbar/pull/229) Update dependency webpack to v5.1.3 226 | - [#228](https://github.com/cy6erskunk/svg-crowbar/pull/228) Update babel monorepo to v7.12.1 227 | - [#227](https://github.com/cy6erskunk/svg-crowbar/pull/227) Update dependency webpack to v5.1.2 228 | - [#226](https://github.com/cy6erskunk/svg-crowbar/pull/226) Update dependency webpack to v5.1.1 229 | - [#225](https://github.com/cy6erskunk/svg-crowbar/pull/225) Update babel monorepo to v7.12.0 230 | - [#223](https://github.com/cy6erskunk/svg-crowbar/pull/223) Update dependency webpack to v5 231 | - [#224](https://github.com/cy6erskunk/svg-crowbar/pull/224) Update dependency jest to v26.5.3 232 | - [#221](https://github.com/cy6erskunk/svg-crowbar/pull/221) Update dependency eslint to v7.11.0 233 | - [#219](https://github.com/cy6erskunk/svg-crowbar/pull/219) Update dependency jest to v26.5.2 234 | - [#218](https://github.com/cy6erskunk/svg-crowbar/pull/218) Update jest monorepo to v26.5.2 235 | - [#211](https://github.com/cy6erskunk/svg-crowbar/pull/211) Update Node.js to v12.18.4 236 | - [#217](https://github.com/cy6erskunk/svg-crowbar/pull/217) Update jest monorepo to v26.5.0 237 | - [#216](https://github.com/cy6erskunk/svg-crowbar/pull/216) Update dependency electron to v10.1.3 238 | - [#215](https://github.com/cy6erskunk/svg-crowbar/pull/215) Update dependency eslint to v7.10.0 239 | - [#214](https://github.com/cy6erskunk/svg-crowbar/pull/214) Update dependency eslint-config-prettier to v6.12.0 240 | - [#213](https://github.com/cy6erskunk/svg-crowbar/pull/213) Update dependency webpack to v4.44.2 241 | - [#212](https://github.com/cy6erskunk/svg-crowbar/pull/212) Update dependency prettier to v2.1.2 242 | - [#210](https://github.com/cy6erskunk/svg-crowbar/pull/210) Update dependency electron to v10.1.2 243 | - [#209](https://github.com/cy6erskunk/svg-crowbar/pull/209) Update dependency eslint to v7.9.0 244 |
245 | 246 | --- 247 | 248 | ## v0.6.1 (09/09/2020) 249 | - [#178](https://github.com/cy6erskunk/svg-crowbar/pull/178) fix(umd): re-export downloadSvg to UMD bundle 250 | - [#177](https://github.com/cy6erskunk/svg-crowbar/pull/177) Add changelog 251 | - [#176](https://github.com/cy6erskunk/svg-crowbar/pull/176) add release notes action 252 | 253 |
254 | Updated dependencies 255 | 256 | - [#208](https://github.com/cy6erskunk/svg-crowbar/pull/208) Update babel monorepo to v7.11.6 257 | - [#203](https://github.com/cy6erskunk/svg-crowbar/pull/203) Update dependency electron to v10 258 | - [#184](https://github.com/cy6erskunk/svg-crowbar/pull/184) Update Node.js to v12.18.3 259 | - [#207](https://github.com/cy6erskunk/svg-crowbar/pull/207) Update dependency eslint to v7.8.1 260 | - [#206](https://github.com/cy6erskunk/svg-crowbar/pull/206) Update dependency eslint to v7.8.0 261 | - [#205](https://github.com/cy6erskunk/svg-crowbar/pull/205) Update babel monorepo to v7.11.5 262 | - [#204](https://github.com/cy6erskunk/svg-crowbar/pull/204) Update dependency prettier to v2.1.1 263 | - [#202](https://github.com/cy6erskunk/svg-crowbar/pull/202) Update dependency prettier to v2.1.0 264 | - [#201](https://github.com/cy6erskunk/svg-crowbar/pull/201) Update dependency jest to v26.4.2 265 | - [#200](https://github.com/cy6erskunk/svg-crowbar/pull/200) Update dependency @babel/core to v7.11.4 266 | - [#199](https://github.com/cy6erskunk/svg-crowbar/pull/199) Update dependency jest to v26.4.1 267 | - [#198](https://github.com/cy6erskunk/svg-crowbar/pull/198) Update dependency electron to v9.2.1 268 | - [#197](https://github.com/cy6erskunk/svg-crowbar/pull/197) Update dependency eslint to v7.7.0 269 | - [#196](https://github.com/cy6erskunk/svg-crowbar/pull/196) Update dependency jest to v26.4.0 270 | - [#195](https://github.com/cy6erskunk/svg-crowbar/pull/195) Update jest monorepo to v26.3.0 271 | - [#194](https://github.com/cy6erskunk/svg-crowbar/pull/194) Update dependency electron to v9.2.0 272 | - [#193](https://github.com/cy6erskunk/svg-crowbar/pull/193) Update dependency @babel/core to v7.11.1 273 | - [#192](https://github.com/cy6erskunk/svg-crowbar/pull/192) Update dependency eslint to v7.6.0 274 | - [#191](https://github.com/cy6erskunk/svg-crowbar/pull/191) Update jest monorepo to v26.2.2 275 | - [#190](https://github.com/cy6erskunk/svg-crowbar/pull/190) Update babel monorepo to v7.11.0 276 | - [#189](https://github.com/cy6erskunk/svg-crowbar/pull/189) Update jest monorepo to v26.2.1 277 | - [#188](https://github.com/cy6erskunk/svg-crowbar/pull/188) Update jest monorepo to v26.2.0 278 | - [#187](https://github.com/cy6erskunk/svg-crowbar/pull/187) Update dependency webpack to v4.44.1 279 | - [#186](https://github.com/cy6erskunk/svg-crowbar/pull/186) Update dependency electron to v9.1.2 280 | - [#185](https://github.com/cy6erskunk/svg-crowbar/pull/185) Update dependency webpack to v4.44.0 281 | - [#175](https://github.com/cy6erskunk/svg-crowbar/pull/175) Update Node.js to v12.18.2 282 | - [#183](https://github.com/cy6erskunk/svg-crowbar/pull/183) Update dependency electron to v9.1.1 283 | - [#182](https://github.com/cy6erskunk/svg-crowbar/pull/182) Update dependency eslint to v7.5.0 284 | - [#181](https://github.com/cy6erskunk/svg-crowbar/pull/181) Update babel monorepo to v7.10.5 285 | - [#180](https://github.com/cy6erskunk/svg-crowbar/pull/180) Update dependency electron to v9.1.0 286 | - [#179](https://github.com/cy6erskunk/svg-crowbar/pull/179) Update dependency eslint to v7.4.0 287 | - [#155](https://github.com/cy6erskunk/svg-crowbar/pull/155) Update Jest config 288 | - [#174](https://github.com/cy6erskunk/svg-crowbar/pull/174) Update babel monorepo to v7.10.4 289 | - [#173](https://github.com/cy6erskunk/svg-crowbar/pull/173) Update jest monorepo to v26.1.0 290 | - [#172](https://github.com/cy6erskunk/svg-crowbar/pull/172) Update dependency eslint to v7.3.1 291 | - [#171](https://github.com/cy6erskunk/svg-crowbar/pull/171) Update dependency electron to v9.0.5 292 | - [#167](https://github.com/cy6erskunk/svg-crowbar/pull/167) Update Node.js to v12.18.1 293 | - [#170](https://github.com/cy6erskunk/svg-crowbar/pull/170) Update babel monorepo to v7.10.3 294 | - [#169](https://github.com/cy6erskunk/svg-crowbar/pull/169) Update dependency eslint to v7.3.0 295 | - [#168](https://github.com/cy6erskunk/svg-crowbar/pull/168) Update dependency webpack-cli to v3.3.12 296 | - [#157](https://github.com/cy6erskunk/svg-crowbar/pull/157) Update Node.js to v12.18.0 297 | - [#166](https://github.com/cy6erskunk/svg-crowbar/pull/166) Update dependency eslint-plugin-prettier to v3.1.4 298 | - [#165](https://github.com/cy6erskunk/svg-crowbar/pull/165) Update dependency electron to v9.0.4 299 | - [#164](https://github.com/cy6erskunk/svg-crowbar/pull/164) Update dependency electron to v9.0.3 300 | - [#163](https://github.com/cy6erskunk/svg-crowbar/pull/163) Update dependency eslint to v7.2.0 301 | - [#162](https://github.com/cy6erskunk/svg-crowbar/pull/162) Update dependency electron to v9.0.2 302 | - [#161](https://github.com/cy6erskunk/svg-crowbar/pull/161) Update dependency electron to v9.0.1 303 | - [#160](https://github.com/cy6erskunk/svg-crowbar/pull/160) Update babel monorepo to v7.10.2 304 | - [#159](https://github.com/cy6erskunk/svg-crowbar/pull/159) Update babel monorepo to v7.10.1 305 | - [#158](https://github.com/cy6erskunk/svg-crowbar/pull/158) Update babel monorepo to v7.10.0 306 | - [#156](https://github.com/cy6erskunk/svg-crowbar/pull/156) Update dependency eslint to v7.1.0 307 |
308 | 309 | --- 310 | 311 | ## v0.6.0 (20/05/2020) 312 | - [#153](https://github.com/cy6erskunk/svg-crowbar/pull/153) feat(png): saved image uses device pixel ratio 313 |
314 | Updated dependencies 315 | 316 | - [#154](https://github.com/cy6erskunk/svg-crowbar/pull/154) Update dependency electron to v9 317 | - [#152](https://github.com/cy6erskunk/svg-crowbar/pull/152) Update dependency electron to v8.3.0 318 | - [#151](https://github.com/cy6erskunk/svg-crowbar/pull/151) Update dependency eslint to v7 319 | - [#150](https://github.com/cy6erskunk/svg-crowbar/pull/150) Update jest monorepo to v26 (major) 320 | - [#141](https://github.com/cy6erskunk/svg-crowbar/pull/141) Update jest monorepo 321 | - [#149](https://github.com/cy6erskunk/svg-crowbar/pull/149) Update dependency @jest-runner/electron to v3 322 | - [#148](https://github.com/cy6erskunk/svg-crowbar/pull/148) Update dependency electron to v8.2.5 323 | - [#147](https://github.com/cy6erskunk/svg-crowbar/pull/147) Update babel monorepo to v7.9.6 324 | - [#146](https://github.com/cy6erskunk/svg-crowbar/pull/146) Update Node.js to v12.16.3 325 | - [#145](https://github.com/cy6erskunk/svg-crowbar/pull/145) Update dependency electron to v8.2.4 326 | - [#122](https://github.com/cy6erskunk/svg-crowbar/pull/122) Update dependency prettier to v2 327 | - [#144](https://github.com/cy6erskunk/svg-crowbar/pull/144) Pin dependency @babel/cli to 7.8.4 328 |
329 | 330 | --- 331 | 332 | ## v0.5.0 (23/04/2020) 333 | - [#119](https://github.com/cy6erskunk/svg-crowbar/pull/119) Use transpiled but unbundled modules in published package 334 |
335 | Updated dependencies 336 | 337 | - [#143](https://github.com/cy6erskunk/svg-crowbar/pull/143) Update dependency eslint-config-prettier to v6.11.0 338 | - [#142](https://github.com/cy6erskunk/svg-crowbar/pull/142) Update dependency webpack to v4.43.0 339 | - [#140](https://github.com/cy6erskunk/svg-crowbar/pull/140) Move all eslint config to one file 340 | - [#139](https://github.com/cy6erskunk/svg-crowbar/pull/139) Update to the latest Nodejs LTS 341 | - [#138](https://github.com/cy6erskunk/svg-crowbar/pull/138) Update dependency electron to v8.2.3 342 | - [#137](https://github.com/cy6erskunk/svg-crowbar/pull/137) Update dependency electron to v8.2.2 343 | - [#136](https://github.com/cy6erskunk/svg-crowbar/pull/136) Update dependency eslint-plugin-prettier to v3.1.3 344 | - [#135](https://github.com/cy6erskunk/svg-crowbar/pull/135) Update jest monorepo to v25.3.0 345 | - [#134](https://github.com/cy6erskunk/svg-crowbar/pull/134) Update dependency @babel/preset-env to v7.9.5 346 | - [#133](https://github.com/cy6erskunk/svg-crowbar/pull/133) Update dependency electron to v8.2.1 347 | - [#132](https://github.com/cy6erskunk/svg-crowbar/pull/132) Update dependency jest to v25.2.7 348 | - [#131](https://github.com/cy6erskunk/svg-crowbar/pull/131) Update jest monorepo to v25.2.6 349 | - [#130](https://github.com/cy6erskunk/svg-crowbar/pull/130) Update jest monorepo to v25.2.4 350 | - [#129](https://github.com/cy6erskunk/svg-crowbar/pull/129) Update jest monorepo to v25.2.3 351 | - [#128](https://github.com/cy6erskunk/svg-crowbar/pull/128) Update dependency jest to v25.2.2 352 | - [#127](https://github.com/cy6erskunk/svg-crowbar/pull/127) Update jest monorepo to v25.2.1 353 | - [#126](https://github.com/cy6erskunk/svg-crowbar/pull/126) Update jest monorepo to v25.2.0 354 | - [#125](https://github.com/cy6erskunk/svg-crowbar/pull/125) Update dependency electron to v8.2.0 355 | - [#124](https://github.com/cy6erskunk/svg-crowbar/pull/124) Update dependency webpack to v4.42.1 356 |
357 | 358 | --- 359 | 360 | ## v0.4.0 (23/03/2020) 361 | - [#118](https://github.com/cy6erskunk/svg-crowbar/pull/118) Remove references to global window object to fix SSR builds 362 |
363 | Updated dependencies 364 | 365 | - [#123](https://github.com/cy6erskunk/svg-crowbar/pull/123) Update dependency eslint-config-prettier to v6.10.1 366 | - [#121](https://github.com/cy6erskunk/svg-crowbar/pull/121) Update babel monorepo to v7.9.0 367 | - [#117](https://github.com/cy6erskunk/svg-crowbar/pull/117) Update dependency electron to v8.1.1 368 |
369 | 370 | --- 371 | 372 | ## v0.3.1 (06/03/2020) 373 | - [#114](https://github.com/cy6erskunk/svg-crowbar/pull/114) Add test & build task to prepublishOnly script 374 | - [#116](https://github.com/cy6erskunk/svg-crowbar/pull/116) Update dependency electron to v8.1.0 375 | - [#115](https://github.com/cy6erskunk/svg-crowbar/pull/115) Update babel monorepo to v7.8.7 376 | - [#112](https://github.com/cy6erskunk/svg-crowbar/pull/112) Update dependency electron to v8.0.3 377 | - [#111](https://github.com/cy6erskunk/svg-crowbar/pull/111) Update dependency webpack to v4.42.0 378 | - [#110](https://github.com/cy6erskunk/svg-crowbar/pull/110) Update babel monorepo to v7.8.6 379 | - [#109](https://github.com/cy6erskunk/svg-crowbar/pull/109) Update dependency electron to v8.0.2 380 | - [#108](https://github.com/cy6erskunk/svg-crowbar/pull/108) Update dependency babel-eslint to v10.1.0 381 | 382 | --- 383 | 384 | ## v0.3.0 (21/02/2020) 385 | - [#87](https://github.com/cy6erskunk/svg-crowbar/pull/87) Add 3rd CSS argument to allow inline/internal/none 386 |
387 | Update dependencies: 388 | 389 | - [#72](https://github.com/cy6erskunk/svg-crowbar/pull/72) Update babel monorepo to v7.7.0 390 | - [#71](https://github.com/cy6erskunk/svg-crowbar/pull/71) Update dependency electron to v6.1.4 391 | - [#70](https://github.com/cy6erskunk/svg-crowbar/pull/70) Update dependency electron to v6.1.3 392 | - [#69](https://github.com/cy6erskunk/svg-crowbar/pull/69) Update dependency webpack-cli to v3.3.10 393 | - [#68](https://github.com/cy6erskunk/svg-crowbar/pull/68) Update dependency eslint-config-prettier to v6.5.0 394 | - [#67](https://github.com/cy6erskunk/svg-crowbar/pull/67) Update dependency eslint to v6.6.0 395 | - [#66](https://github.com/cy6erskunk/svg-crowbar/pull/66) Update dependency electron to v6.1.2 396 | - [#65](https://github.com/cy6erskunk/svg-crowbar/pull/65) Update dependency electron to v6.1.1 397 | - [#64](https://github.com/cy6erskunk/svg-crowbar/pull/64) Update dependency electron to v6.1.0 398 | - [#62](https://github.com/cy6erskunk/svg-crowbar/pull/62) Update dependency webpack to v4.41.2 399 | - [#61](https://github.com/cy6erskunk/svg-crowbar/pull/61) Update dependency webpack to v4.41.1 400 | - [#60](https://github.com/cy6erskunk/svg-crowbar/pull/60) Update dependency @babel/core to v7.6.4 401 | - [#59](https://github.com/cy6erskunk/svg-crowbar/pull/59) Update dependency electron to v6.0.12 402 | - [#58](https://github.com/cy6erskunk/svg-crowbar/pull/58) Update babel monorepo to v7.6.3 403 | - [#104](https://github.com/cy6erskunk/svg-crowbar/pull/104) Update dependency electron to v8 404 | - [#107](https://github.com/cy6erskunk/svg-crowbar/pull/107) Update dependency electron to v6.1.8 405 | - [#106](https://github.com/cy6erskunk/svg-crowbar/pull/106) Update dependency webpack-cli to v3.3.11 406 | - [#105](https://github.com/cy6erskunk/svg-crowbar/pull/105) Update dependency webpack to v4.41.6 407 | - [#101](https://github.com/cy6erskunk/svg-crowbar/pull/101) Update jest monorepo to v25 (major) 408 | - [#103](https://github.com/cy6erskunk/svg-crowbar/pull/103) Update babel monorepo to v7.8.4 409 | - [#102](https://github.com/cy6erskunk/svg-crowbar/pull/102) Update dependency eslint-config-prettier to v6.10.0 410 | - [#100](https://github.com/cy6erskunk/svg-crowbar/pull/100) Update babel monorepo to v7.8.3 411 | - [#99](https://github.com/cy6erskunk/svg-crowbar/pull/99) Update dependency @babel/preset-env to v7.8.2 412 | - [#98](https://github.com/cy6erskunk/svg-crowbar/pull/98) Update babel monorepo to v7.8.0 413 | - [#94](https://github.com/cy6erskunk/svg-crowbar/pull/94) Update dependency webpack to v4.41.5 414 | - [#97](https://github.com/cy6erskunk/svg-crowbar/pull/97) Update dependency eslint-config-prettier to v6.9.0 415 | - [#96](https://github.com/cy6erskunk/svg-crowbar/pull/96) Update dependency eslint-config-prettier to v6.8.0 416 | - [#95](https://github.com/cy6erskunk/svg-crowbar/pull/95) Update dependency eslint to v6.8.0 417 | - [#93](https://github.com/cy6erskunk/svg-crowbar/pull/93) Update babel monorepo to v7.7.7 418 | - [#92](https://github.com/cy6erskunk/svg-crowbar/pull/92) Update dependency electron to v6.1.7 419 | - [#91](https://github.com/cy6erskunk/svg-crowbar/pull/91) Update dependency webpack to v4.41.3 420 | - [#90](https://github.com/cy6erskunk/svg-crowbar/pull/90) Update dependency eslint-plugin-prettier to v3.1.2 421 | - [#89](https://github.com/cy6erskunk/svg-crowbar/pull/89) Update dependency electron to v6.1.6 422 | - [#88](https://github.com/cy6erskunk/svg-crowbar/pull/88) Update dependency @babel/preset-env to v7.7.6 423 | - [#82](https://github.com/cy6erskunk/svg-crowbar/pull/82) Update babel monorepo to v7.7.5 424 | - [#86](https://github.com/cy6erskunk/svg-crowbar/pull/86) Update dependency @jest-runner/electron to v2.0.3 425 | - [#85](https://github.com/cy6erskunk/svg-crowbar/pull/85) Update dependency eslint to v6.7.2 426 | - [#83](https://github.com/cy6erskunk/svg-crowbar/pull/83) Update dependency eslint to v6.7.1 427 | - [#81](https://github.com/cy6erskunk/svg-crowbar/pull/81) Update dependency eslint to v6.7.0 428 | - [#80](https://github.com/cy6erskunk/svg-crowbar/pull/80) Update dependency electron to v6.1.5 429 | - [#79](https://github.com/cy6erskunk/svg-crowbar/pull/79) Update dependency eslint-config-prettier to v6.7.0 430 | - [#78](https://github.com/cy6erskunk/svg-crowbar/pull/78) Update dependency eslint-config-prettier to v6.6.0 431 | - [#77](https://github.com/cy6erskunk/svg-crowbar/pull/77) Update dependency prettier to v1.19.1 432 | - [#76](https://github.com/cy6erskunk/svg-crowbar/pull/76) Update dependency prettier to v1.19.0 433 | - [#74](https://github.com/cy6erskunk/svg-crowbar/pull/74) Update dependency @babel/core to v7.7.2 434 | - [#73](https://github.com/cy6erskunk/svg-crowbar/pull/73) Update dependency @babel/preset-env to v7.7.1 435 |
436 | 437 | --- 438 | 439 | ## v0.2.4 (07/10/2019) 440 |
441 | Update dependencies: 442 | 443 | - [#57](https://github.com/cy6erskunk/svg-crowbar/pull/57) Update dependency eslint-config-prettier to v6.4.0 444 | - [#56](https://github.com/cy6erskunk/svg-crowbar/pull/56) Update dependency electron to v6.0.11 445 | - [#55](https://github.com/cy6erskunk/svg-crowbar/pull/55) Update dependency eslint to v6.5.1 446 | - [#54](https://github.com/cy6erskunk/svg-crowbar/pull/54) Update dependency eslint to v6.5.0 447 | - [#53](https://github.com/cy6erskunk/svg-crowbar/pull/53) Update dependency webpack to v4.41.0 448 | - [#52](https://github.com/cy6erskunk/svg-crowbar/pull/52) Update babel monorepo to v7.6.2 449 | - [#51](https://github.com/cy6erskunk/svg-crowbar/pull/51) Update dependency electron to v6.0.10 450 | - [#50](https://github.com/cy6erskunk/svg-crowbar/pull/50) Update dependency eslint-plugin-prettier to v3.1.1 451 | - [#49](https://github.com/cy6erskunk/svg-crowbar/pull/49) Update dependency webpack-cli to v3.3.9 452 | - [#48](https://github.com/cy6erskunk/svg-crowbar/pull/48) Update dependency eslint to v6.4.0 453 | - [#47](https://github.com/cy6erskunk/svg-crowbar/pull/47) Update dependency webpack to v4.40.2 454 | - [#46](https://github.com/cy6erskunk/svg-crowbar/pull/46) Update dependency webpack to v4.40.1 455 | - [#45](https://github.com/cy6erskunk/svg-crowbar/pull/45) Update dependency webpack to v4.40.0 456 | - [#44](https://github.com/cy6erskunk/svg-crowbar/pull/44) Update dependency electron to v6.0.9 457 | - [#43](https://github.com/cy6erskunk/svg-crowbar/pull/43) Update dependency eslint-config-prettier to v6.3.0 458 | - [#42](https://github.com/cy6erskunk/svg-crowbar/pull/42) Update dependency electron to v6.0.8 459 | - [#41](https://github.com/cy6erskunk/svg-crowbar/pull/41) Update babel monorepo to v7.6.0 460 | - [#40](https://github.com/cy6erskunk/svg-crowbar/pull/40) Update dependency webpack-cli to v3.3.8 461 | - [#39](https://github.com/cy6erskunk/svg-crowbar/pull/39) Update dependency eslint-config-prettier to v6.2.0 462 | - [#38](https://github.com/cy6erskunk/svg-crowbar/pull/38) Re-configure Renovate automerge 463 | - [#30](https://github.com/cy6erskunk/svg-crowbar/pull/30) Update dependency webpack-cli to v3.3.7 464 | - [#29](https://github.com/cy6erskunk/svg-crowbar/pull/29) Update jest monorepo to v24.9.0 465 | - [#26](https://github.com/cy6erskunk/svg-crowbar/pull/26) Update dependency webpack to v4.39.3 466 | - [#32](https://github.com/cy6erskunk/svg-crowbar/pull/32) Update dependency eslint-config-prettier to v6.1.0 467 | - [#31](https://github.com/cy6erskunk/svg-crowbar/pull/31) Update dependency eslint to v6.3.0 468 | - [#34](https://github.com/cy6erskunk/svg-crowbar/pull/34) Update dependency babel-eslint to v10.0.3 469 | - [#37](https://github.com/cy6erskunk/svg-crowbar/pull/37) Configure renovate auto-merge 470 | - [#27](https://github.com/cy6erskunk/svg-crowbar/pull/27) Update dependency electron to v6 471 | - [#36](https://github.com/cy6erskunk/svg-crowbar/pull/36) Bump mixin-deep from 1.3.1 to 1.3.2 472 | - [#35](https://github.com/cy6erskunk/svg-crowbar/pull/35) Bump eslint-utils from 1.4.0 to 1.4.2 473 | - [#28](https://github.com/cy6erskunk/svg-crowbar/pull/28) Update dependency electron to v5.0.9 474 | - [#25](https://github.com/cy6erskunk/svg-crowbar/pull/25) Update dependency electron to v5.0.8 475 | - [#24](https://github.com/cy6erskunk/svg-crowbar/pull/24) Update dependency eslint to v6.1.0 476 | - [#23](https://github.com/cy6erskunk/svg-crowbar/pull/23) Update babel monorepo to v7.5.5 477 | - [#22](https://github.com/cy6erskunk/svg-crowbar/pull/22) Update dependency webpack to v4.37.0 478 | - [#21](https://github.com/cy6erskunk/svg-crowbar/pull/21) Update dependency electron to v5.0.7 479 | - [#20](https://github.com/cy6erskunk/svg-crowbar/pull/20) Update dependency webpack-cli to v3.3.6 480 | - [#19](https://github.com/cy6erskunk/svg-crowbar/pull/19) Bump lodash from 4.17.11 to 4.17.14 481 | - [#18](https://github.com/cy6erskunk/svg-crowbar/pull/18) chore(deps): update babel monorepo to v7.5.4 482 | - [#17](https://github.com/cy6erskunk/svg-crowbar/pull/17) chore(deps): update dependency webpack to v4.35.3 483 | - [#16](https://github.com/cy6erskunk/svg-crowbar/pull/16) Bulk update devDependencies 484 |
485 | 486 | --- 487 | 488 | ## v0.2.3 (24/06/2019) 489 | Actually do the release as v0.2.2 is identical to v0.2.1 🤦 490 | 491 | --- 492 | 493 | ## v0.2.2 (24/06/2019) 494 | - [#2](https://github.com/cy6erskunk/svg-crowbar/pull/2) Replace non-latin characters with hex codes before encoding 495 |
496 | Update dependencies: 497 | 498 | - [#8](https://github.com/cy6erskunk/svg-crowbar/pull/8) Update dependency webpack-cli to v3.3.4 499 | - [#9](https://github.com/cy6erskunk/svg-crowbar/pull/9) Update dependency eslint-config-prettier to v5 500 | - [#6](https://github.com/cy6erskunk/svg-crowbar/pull/6) Update and lock dependencies 501 | - [#5](https://github.com/cy6erskunk/svg-crowbar/pull/5) Fix travis config 502 | - [#1](https://github.com/cy6erskunk/svg-crowbar/pull/1) Configure Renovate 503 |
504 | 505 | --- 506 | 507 | ## v0.2.1 (07/02/2019) 508 | - fix(svg|png): generate files when filenames were not provided (1d23727) 509 | 510 | --- 511 | 512 | ## v0.2.0 (13/01/2019) 513 | - feat: allow specify filename explicitly (7cc89e6) 514 | --- 515 | 516 | ## v0.1.0 (26/12/2018) 517 | *No changelog for this release.* 518 | --------------------------------------------------------------------------------