Skip to content

Commit 289d9bb

Browse files
fix(token-publisher): update deprecated packages (#2983)
* feat(coverage-plugin): update teh threshold to 95% * fix(token-publisher): update deprecated packages * fix: update styling
1 parent c5e3a92 commit 289d9bb

File tree

6 files changed

+58
-54
lines changed

6 files changed

+58
-54
lines changed

packages/plugin-figma-token-publisher/package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,15 @@
1111
},
1212
"dependencies": {
1313
"react": "17.0.1",
14-
"react-dom": "17.0.1"
15-
},
16-
"devDependencies": {
14+
"react-dom": "17.0.1",
1715
"@figma/plugin-typings": "1.81.0",
18-
"@types/react-dom": "17.0.0",
1916
"@types/react": "17.0.0",
17+
"@types/react-dom": "17.0.0",
2018
"@types/set-value": "4.0.1",
2119
"css-loader": "6.7.1",
2220
"figma-plugin-ds": "0.1.8",
23-
"html-webpack-inline-source-plugin": "1.0.3",
24-
"html-webpack-plugin": "^5.6.3",
21+
"html-inline-script-webpack-plugin": "3.2.1",
22+
"html-webpack-plugin": "5.6.3",
2523
"is-plain-object": "5.0.0",
2624
"is-primitive": "3.0.1",
2725
"js-string-compression": "1.0.1",
@@ -30,7 +28,7 @@
3028
"ts-loader": "9.4.2",
3129
"typescript": "4.9.5",
3230
"url-loader": "4.1.1",
33-
"webpack-cli": "5.1.4",
34-
"webpack": "5.97.1"
31+
"webpack": "5.97.1",
32+
"webpack-cli": "5.1.4"
3533
}
3634
}

packages/plugin-figma-token-publisher/src/app/components/App.tsx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,20 @@ const App = (): ReactElement => {
7878
Cancel
7979
</button>
8080
</section>
81-
<p className="section-title">Exported Icons:</p>
82-
<textarea
83-
className="input__field input__field--margin"
84-
style={{ width: '100%', height: 200 }}
85-
value={svgString}
86-
/>
81+
{svgString ? (
82+
<>
83+
<label htmlFor="exportedIcons" className="label">
84+
Exported Icons:
85+
</label>
86+
<textarea
87+
id="exportedIcons"
88+
className="input__field input__field--margin"
89+
style={{ height: 200 }}
90+
value={svgString}
91+
readOnly
92+
/>
93+
</>
94+
) : null}
8795
</section>
8896
);
8997
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div id="react-page"></div>
1+
<div id="react-page"></div>

packages/plugin-figma-token-publisher/src/app/styles/ui.css

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,35 @@
1313
.input__field--margin {
1414
margin-bottom: 40px !important;
1515
}
16+
17+
textarea.input__field {
18+
border: 1px solid var(--figma-color-border, #e5e5e5);
19+
resize: vertical;
20+
font-family: inherit;
21+
padding: 8px;
22+
border-radius: 2px;
23+
}
24+
25+
textarea.input__field:focus {
26+
outline: none;
27+
border-color: var(--figma-color-border-selected, #18a0fb);
28+
}
29+
1630
.button {
1731
margin-left: 20px;
1832
}
1933

2034
.section-title {
2135
display: block !important;
22-
margin-bottom: 30px;
36+
margin-bottom: 16px;
37+
font-size: 13px;
38+
font-weight: 500;
39+
color: var(--figma-color-text, #000000);
40+
line-height: 20px;
41+
}
42+
43+
.label {
44+
font-size: 11px;
45+
font-weight: 600;
46+
color: var(--figma-color-text, #000000a9) !important;
2347
}

packages/plugin-figma-token-publisher/webpack.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const path = require('path');
2-
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
32
const HtmlWebpackPlugin = require('html-webpack-plugin');
3+
const HtmlInlineScriptPlugin = require('html-inline-script-webpack-plugin');
44

55
module.exports = (env, argv) => ({
66
mode: argv.mode === 'production' ? 'production' : 'development',
@@ -40,9 +40,9 @@ module.exports = (env, argv) => ({
4040
new HtmlWebpackPlugin({
4141
template: 'src/app/index.html',
4242
filename: 'ui.html',
43-
inlineSource: '.(js)$',
4443
chunks: ['ui'],
44+
inject: 'body',
4545
}),
46-
new HtmlWebpackInlineSourcePlugin(HtmlWebpackPlugin),
46+
new HtmlInlineScriptPlugin(),
4747
],
4848
});

packages/plugin-figma-token-publisher/yarn.lock

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,10 @@
103103
"@types/react" "*"
104104

105105
"@types/react@*":
106-
version "18.2.38"
107-
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.38.tgz#3605ca41d3daff2c434e0b98d79a2469d4c2dd52"
108-
integrity sha512-cBBXHzuPtQK6wNthuVMV6IjHAFkdl/FOPFIlkd81/Cd1+IqkHu/A+w4g43kaQQoYHik/ruaQBDL72HyCy1vuMw==
106+
version "19.2.2"
107+
resolved "https://registry.yarnpkg.com/@types/react/-/react-19.2.2.tgz#ba123a75d4c2a51158697160a4ea2ff70aa6bf36"
108+
integrity sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA==
109109
dependencies:
110-
"@types/prop-types" "*"
111-
"@types/scheduler" "*"
112110
csstype "^3.0.2"
113111

114112
@@ -119,11 +117,6 @@
119117
"@types/prop-types" "*"
120118
csstype "^3.0.2"
121119

122-
"@types/scheduler@*":
123-
version "0.16.8"
124-
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.8.tgz#ce5ace04cfeabe7ef87c0091e50752e36707deff"
125-
integrity sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==
126-
127120
128121
version "4.0.1"
129122
resolved "https://registry.yarnpkg.com/@types/set-value/-/set-value-4.0.1.tgz#7caf185556a67c2d9051080931853047423c93bd"
@@ -569,11 +562,6 @@ escalade@^3.2.0:
569562
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5"
570563
integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==
571564

572-
escape-string-regexp@^1.0.5:
573-
version "1.0.5"
574-
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
575-
integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==
576-
577565
578566
version "5.1.1"
579567
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
@@ -681,6 +669,11 @@ he@^1.2.0:
681669
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
682670
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
683671

672+
673+
version "3.2.1"
674+
resolved "https://registry.yarnpkg.com/html-inline-script-webpack-plugin/-/html-inline-script-webpack-plugin-3.2.1.tgz#32ae9a4a743c508bda854386c9af3b2e358bb5b7"
675+
integrity sha512-PEj9Ve31BE0dva6eTD6wHMOztgIdPxF6gx3wad7ohBkCn7MXpuUvPC9t5ThMJ2NrVi1jWGBYU76DfoS+8dabRw==
676+
684677
html-minifier-terser@^6.0.2:
685678
version "6.1.0"
686679
resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#bfc818934cc07918f6b3669f5774ecdfd48f32ab"
@@ -694,16 +687,7 @@ html-minifier-terser@^6.0.2:
694687
relateurl "^0.2.7"
695688
terser "^5.10.0"
696689

697-
698-
version "1.0.0-beta.2"
699-
resolved "https://registry.yarnpkg.com/html-webpack-inline-source-plugin/-/html-webpack-inline-source-plugin-1.0.0-beta.2.tgz#71a9234c170ef18df6e51f4594a09b540ff03111"
700-
integrity sha512-ydsEKdp0tnbmnqRAH2WSSMXerCNYhjes5b79uvP2BU3p6cyk+6ucNMsw5b5xD1QxphgvBBA3QqVmdcpu8QLlRQ==
701-
dependencies:
702-
escape-string-regexp "^1.0.5"
703-
slash "^1.0.0"
704-
source-map-url "^0.4.0"
705-
706-
html-webpack-plugin@^5.6.3:
690+
707691
version "5.6.3"
708692
resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.6.3.tgz#a31145f0fee4184d53a794f9513147df1e653685"
709693
integrity sha512-QSf1yjtSAsmf7rYBV7XX86uua4W/vkhIt0xNXKbsi2foEeW7vjJQz4bhnpL3xH+l1ryl1680uNv968Z+X6jSYg==
@@ -1199,11 +1183,6 @@ shebang-regex@^3.0.0:
11991183
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
12001184
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
12011185

1202-
slash@^1.0.0:
1203-
version "1.0.0"
1204-
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
1205-
integrity sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg==
1206-
12071186
source-map-js@^1.2.1:
12081187
version "1.2.1"
12091188
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46"
@@ -1217,11 +1196,6 @@ source-map-support@~0.5.20:
12171196
buffer-from "^1.0.0"
12181197
source-map "^0.6.0"
12191198

1220-
source-map-url@^0.4.0:
1221-
version "0.4.1"
1222-
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56"
1223-
integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==
1224-
12251199
source-map@^0.6.0, source-map@~0.6.0:
12261200
version "0.6.1"
12271201
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"

0 commit comments

Comments
 (0)