Skip to content

Commit

Permalink
Remove removeDeprecatedAttrs plugin. (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkenny54 authored Oct 15, 2024
1 parent 99a1dc2 commit 789836c
Show file tree
Hide file tree
Showing 16 changed files with 9 additions and 326 deletions.
15 changes: 0 additions & 15 deletions docs/04-plugins/removeDeprecatedAttrs.mdx

This file was deleted.

2 changes: 0 additions & 2 deletions lib/builtin.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import * as prefixIds from '../plugins/prefixIds.js';
import * as removeAttributesBySelector from '../plugins/removeAttributesBySelector.js';
import * as removeAttrs from '../plugins/removeAttrs.js';
import * as removeComments from '../plugins/removeComments.js';
import * as removeDeprecatedAttrs from '../plugins/removeDeprecatedAttrs.js';
import * as removeDesc from '../plugins/removeDesc.js';
import * as removeDimensions from '../plugins/removeDimensions.js';
import * as removeDoctype from '../plugins/removeDoctype.js';
Expand Down Expand Up @@ -99,7 +98,6 @@ export const builtin = Object.freeze([
removeAttributesBySelector,
removeAttrs,
removeComments,
removeDeprecatedAttrs,
removeDesc,
removeDimensions,
removeDoctype,
Expand Down
6 changes: 0 additions & 6 deletions lib/svgo.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ export declare const _collections: {
*/
attrsGroups: Readonly<Record<string, Set<string>>>;
attrsGroupsDefaults: Readonly<Record<string, Record<string, string>>>;
/**
* @see https://www.w3.org/TR/SVG11/intro.html#Definitions
*/
attrsGroupsDeprecated: Readonly<
Record<string, { safe?: Set<string>; unsafe?: Set<string> }>
>;
/**
* @see https://www.w3.org/TR/SVG11/eltindex.html
*/
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
"commander": "^12.1.0",
"css-select": "^5.1.0",
"css-tree": "^3.0.0",
"css-what": "^6.1.0",
"csso": "^5.0.5",
"picocolors": "^1.1.0",
"sax": "^1.4.1"
Expand Down
21 changes: 0 additions & 21 deletions plugins/_collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,26 +374,6 @@ export const attrsGroupsDefaults = {
},
};

/**
* @type {Record<string, { safe?: Set<string>, unsafe?: Set<string> }>}
* @see https://www.w3.org/TR/SVG11/intro.html#Definitions
*/
export const attrsGroupsDeprecated = {
animationAttributeTarget: { unsafe: new Set(['attributeType']) },
conditionalProcessing: { unsafe: new Set(['requiredFeatures']) },
core: { unsafe: new Set(['xml:base', 'xml:lang', 'xml:space']) },
presentation: {
unsafe: new Set([
'clip',
'color-profile',
'enable-background',
'glyph-orientation-horizontal',
'glyph-orientation-vertical',
'kerning',
]),
},
};

/**
* @type {Record<string, {
* attrsGroups: Set<string>,
Expand Down Expand Up @@ -2472,7 +2452,6 @@ export default {
pathElems,
attrsGroups,
attrsGroupsDefaults,
attrsGroupsDeprecated,
elems,
editorNamespaces,
referencesProps,
Expand Down
3 changes: 0 additions & 3 deletions plugins/plugins-types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ type DefaultPlugins = {
removeComments: {
preservePatterns: Array<RegExp | string> | false;
};
removeDeprecatedAttrs: {
removeUnsafe?: boolean;
};
removeDesc: {
removeAny?: boolean;
};
Expand Down
132 changes: 0 additions & 132 deletions plugins/removeDeprecatedAttrs.js

This file was deleted.

13 changes: 0 additions & 13 deletions test/plugins/removeDeprecatedAttrs.01.svg.txt

This file was deleted.

13 changes: 0 additions & 13 deletions test/plugins/removeDeprecatedAttrs.02.svg.txt

This file was deleted.

17 changes: 0 additions & 17 deletions test/plugins/removeDeprecatedAttrs.03.svg.txt

This file was deleted.

27 changes: 0 additions & 27 deletions test/plugins/removeDeprecatedAttrs.04.svg.txt

This file was deleted.

13 changes: 0 additions & 13 deletions test/plugins/removeDeprecatedAttrs.05.svg.txt

This file was deleted.

13 changes: 0 additions & 13 deletions test/plugins/removeDeprecatedAttrs.06.svg.txt

This file was deleted.

17 changes: 0 additions & 17 deletions test/plugins/removeDeprecatedAttrs.07.svg.txt

This file was deleted.

23 changes: 0 additions & 23 deletions test/plugins/removeDeprecatedAttrs.08.svg.txt

This file was deleted.

Loading

0 comments on commit 789836c

Please sign in to comment.