Skip to content

Commit

Permalink
Merge pull request #791 from gregberge/upgrade-deps
Browse files Browse the repository at this point in the history
chore: upgrade deps
  • Loading branch information
gregberge committed Oct 27, 2022
2 parents e700943 + 290748b commit 1b65014
Show file tree
Hide file tree
Showing 53 changed files with 24,069 additions and 30,026 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,19 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [14.x, 16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
uses: actions/setup-node@v3

- name: Use latest npm
run: npm i -g npm@latest --registry=https://registry.npmjs.org
if: ${{ matrix.node-version == '12.x' || matrix.node-version == '14.x' }}
if: ${{ matrix.node-version == '14.x' }}

- name: Install dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18
2 changes: 1 addition & 1 deletion examples/mocha-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"test": "mocha --loader=./mock-loader.js example.test.js"
},
"devDependencies": {
"mocha": "^10.0.0"
"mocha": "^10.1.0"
}
}
6 changes: 3 additions & 3 deletions examples/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"start": "webpack serve"
},
"devDependencies": {
"@svgr/webpack": "^6.2.1",
"@svgr/webpack": "^6.5.0",
"html-webpack-plugin": "^5.5.0",
"webpack": "^5.64.0",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.9.2"
"webpack-dev-server": "^4.11.1"
}
}
13,866 changes: 7,246 additions & 6,620 deletions package-lock.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
"test": "jest --runInBand"
},
"devDependencies": {
"@babel/core": "^7.18.5",
"@babel/preset-env": "^7.18.2",
"@babel/preset-typescript": "^7.17.12",
"@babel/core": "^7.19.6",
"@babel/preset-env": "^7.19.4",
"@babel/preset-typescript": "^7.18.6",
"@rollup/plugin-json": "^4.1.0",
"@types/jest": "^28.1.2",
"@typescript-eslint/eslint-plugin": "^5.28.0",
"@typescript-eslint/parser": "^5.28.0",
"babel-jest": "^28.1.1",
"@types/jest": "^29.2.0",
"@typescript-eslint/eslint-plugin": "^5.41.0",
"@typescript-eslint/parser": "^5.41.0",
"babel-jest": "^29.2.2",
"codecov": "^3.8.3",
"conventional-github-releaser": "^3.1.5",
"esbuild": "^0.14.46",
"eslint": "^8.18.0",
"eslint-plugin-react": "^7.30.0",
"esbuild": "^0.15.12",
"eslint": "^8.26.0",
"eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0",
"jest": "^28.1.1",
"lerna": "^5.1.4",
"jest": "^29.2.2",
"lerna": "^6.0.1",
"react": "^18.2.0",
"rollup": "^2.75.6",
"rollup-plugin-dts": "^4.2.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-plugin-add-jsx-attribute/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('plugin', () => {
elements: ['div'],
attributes: [{ name: 'disabled', value: 'true' }],
}),
).toMatchInlineSnapshot(`"<div disabled=\\"true\\" />;"`)
).toMatchInlineSnapshot(`"<div disabled="true" />;"`)

expect(
testPlugin('<div />', {
Expand Down Expand Up @@ -83,7 +83,7 @@ describe('plugin', () => {
},
],
}),
).toMatchInlineSnapshot(`"<div><span foo=\\"bar\\" {...props} /></div>;"`)
).toMatchInlineSnapshot(`"<div><span foo="bar" {...props} /></div>;"`)
})

it('should replace attribute', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('plugin', () => {
testPlugin('<div something="cool" />', {
values: [{ value: 'cool', newValue: 'not cool' }],
}),
).toMatchInlineSnapshot(`"<div something=\\"not cool\\" />;"`)
).toMatchInlineSnapshot(`"<div something="not cool" />;"`)

expect(
testPlugin('<div something="cool" />', {
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-plugin-svg-dynamic-title/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('title plugin', () => {
expect(
testPlugin(`<svg><title>{"Hello"}</title></svg>`),
).toMatchInlineSnapshot(
`"<svg>{title === undefined ? <title id={titleId}>{\\"Hello\\"}</title> : title ? <title id={titleId}>{title}</title> : null}</svg>;"`,
`"<svg>{title === undefined ? <title id={titleId}>{"Hello"}</title> : title ? <title id={titleId}>{title}</title> : null}</svg>;"`,
)
})
it('should preserve any existing title attributes', () => {
Expand Down Expand Up @@ -73,7 +73,7 @@ describe('desc plugin', () => {
expect(
testPlugin(`<svg><desc>{"Hello"}</desc></svg>`, { tag: 'desc' }),
).toMatchInlineSnapshot(
`"<svg>{desc === undefined ? <desc id={descId}>{\\"Hello\\"}</desc> : desc ? <desc id={descId}>{desc}</desc> : null}</svg>;"`,
`"<svg>{desc === undefined ? <desc id={descId}>{"Hello"}</desc> : desc ? <desc id={descId}>{desc}</desc> : null}</svg>;"`,
)
})
it('should preserve any existing desc attributes', () => {
Expand Down
12 changes: 4 additions & 8 deletions packages/babel-plugin-svg-em-dimensions/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,24 @@ describe('plugin', () => {
it('replaces width / height attributes', () => {
expect(
testPlugin('<svg foo="bar" width="100" height="200" />'),
).toMatchInlineSnapshot(
`"<svg foo=\\"bar\\" width=\\"1em\\" height=\\"1em\\" />;"`,
)
).toMatchInlineSnapshot(`"<svg foo="bar" width="1em" height="1em" />;"`)
})

it('adds theme if they are not present', () => {
expect(testPlugin('<svg foo="bar" />')).toMatchInlineSnapshot(
`"<svg foo=\\"bar\\" width=\\"1em\\" height=\\"1em\\" />;"`,
`"<svg foo="bar" width="1em" height="1em" />;"`,
)
})

it('accepts numeric values', () => {
expect(
testPlugin('<svg foo="bar" />', { width: 24, height: 24 }),
).toMatchInlineSnapshot(`"<svg foo=\\"bar\\" width={24} height={24} />;"`)
).toMatchInlineSnapshot(`"<svg foo="bar" width={24} height={24} />;"`)
})

it('accepts string values', () => {
expect(
testPlugin('<svg foo="bar" />', { width: '2em', height: '2em' }),
).toMatchInlineSnapshot(
`"<svg foo=\\"bar\\" width=\\"2em\\" height=\\"2em\\" />;"`,
)
).toMatchInlineSnapshot(`"<svg foo="bar" width="2em" height="2em" />;"`)
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ describe('plugin', () => {
`import Svg from 'react-native-svg'; <svg><g /><div /></svg>;`,
)
expect(code).toMatchInlineSnapshot(`
"import Svg, { G } from 'react-native-svg';
/* SVGR has dropped some elements not supported by react-native-svg: div */
<Svg><G /></Svg>;"
`)
"import Svg, { G } from 'react-native-svg';
/* SVGR has dropped some elements not supported by react-native-svg: div */
<Svg><G /></Svg>;"
`)
})
})

1 comment on commit 1b65014

@vercel
Copy link

@vercel vercel bot commented on 1b65014 Oct 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

svgr – ./

svgr-gregberge.vercel.app
api.react-svgr.com
svgr-git-main-gregberge.vercel.app

Please sign in to comment.