Skip to content

Commit e411737

Browse files
authored
Merge pull request #50 from htbkoo/upgrade-dependencies
feat: Upgrade depedencies to reduce vulnerabilities
2 parents 8c730bf + c139470 commit e411737

40 files changed

+168
-1806
lines changed

.github/workflows/nodejs.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,39 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
node-version: [16.x]
18+
node-version: [20.x]
1919

2020
steps:
2121
- uses: actions/checkout@v1
22+
23+
# Reference: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action
24+
- name: Cache node modules
25+
id: cache-npm
26+
uses: actions/cache@v4.0.2
27+
env:
28+
cache-name: cache-node-modules
29+
with:
30+
# npm cache files are stored in `~/.npm` on Linux/macOS
31+
path: ~/.npm
32+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
33+
restore-keys: |
34+
${{ runner.os }}-build-${{ env.cache-name }}-
35+
${{ runner.os }}-build-
36+
${{ runner.os }}-
37+
38+
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
39+
name: List the state of node modules
40+
continue-on-error: true
41+
run: npm list
42+
2243
- name: Use Node.js ${{ matrix.node-version }}
2344
uses: actions/setup-node@v1
2445
with:
2546
node-version: ${{ matrix.node-version }}
2647
- name: npm install, build, and test
2748
run: |
2849
npm ci
29-
CI="" npm run build --if-present
50+
CI="" npm run npm:build --if-present
3051
npm test
3152
env:
3253
CI: true

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- uses: actions/setup-node@v3
3737
with:
3838
# TODO: extract this to strategy.matrix, reference: https://github.com/orgs/community/discussions/26284#discussioncomment-3251198
39-
node-version: 16
39+
node-version: 20
4040

4141
- run: npm ci
4242
- run: npm test
@@ -48,7 +48,7 @@ jobs:
4848
- uses: actions/checkout@v4
4949
- uses: actions/setup-node@v3
5050
with:
51-
node-version: 16
51+
node-version: 20
5252
registry-url: https://registry.npmjs.org/
5353
- run: npm ci
5454
- run: npm publish

bin/build.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const path = require("path");
2+
const fs = require("fs");
3+
4+
const baseDirPath = `${__dirname}/..`;
5+
const src = path.normalize(`${baseDirPath}/public`);
6+
const dst = path.normalize(`${baseDirPath}/build`);
7+
8+
fs.copyFileSync(src, dst);
9+
console.log(`Copied from ${src} to ${dst}`);
10+
11+

docs/asset-manifest.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/images/CssToAndFromReact-logo.svg

Lines changed: 0 additions & 43 deletions
This file was deleted.

docs/images/CssToReact-logo.svg

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/images/body-bg.png

-2.34 KB
Binary file not shown.

docs/images/highlight-bg.jpg

-30.3 KB
Binary file not shown.

docs/images/hr.png

-130 Bytes
Binary file not shown.

docs/images/octocat-icon.png

-477 Bytes
Binary file not shown.

docs/images/tar-gz-icon.png

-741 Bytes
Binary file not shown.

docs/images/zip-icon.png

-735 Bytes
Binary file not shown.

docs/index.html

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,37 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/CssToAndFromReact/manifest.json"><link rel="shortcut icon" href="/CssToAndFromReact/favicon.ico"><title>Convert Css to and from React Style JSON by htbkoo</title><meta http-equiv="X-UA-Compatible" content="chrome=1"><meta name="Description" content="Easy online tool for transforming CSS into Facebook React style JSON. Great for copy/pasting without the translation errors."><link href="https://fonts.googleapis.com/css?family=Chivo:900" rel="stylesheet"><link rel="stylesheet" href="stylesheets/stylesheet.css" media="screen"><link rel="stylesheet" href="stylesheets/github-dark.css" media="screen"><link rel="stylesheet" href="stylesheets/print.css" media="print"><!--[if lt IE 9]>
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6+
<meta name="theme-color" content="#000000">
7+
<!--
8+
manifest.json provides metadata used when your web app is added to the
9+
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
10+
, HtmlUnknownTarget -->
11+
12+
<!--would be filled in by npm run build-->
13+
<!--suppress HtmlUnknownTarget, HtmlUnknownTarget -->
14+
<link rel="manifest" href="https://htbkoo.github.io/CssToAndFromReact/manifest.json">
15+
<!--suppress HtmlUnknownTarget, HtmlUnknownTarget -->
16+
<link rel="shortcut icon" href="https://htbkoo.github.io/CssToAndFromReact/favicon.ico">
17+
<title>Convert Css to and from React Style JSON by htbkoo</title>
18+
19+
<meta http-equiv="X-UA-Compatible" content="chrome=1">
20+
<meta name="Description"
21+
CONTENT="Easy online tool for transforming CSS into Facebook React style JSON. Great for copy/pasting without the translation errors.">
22+
<link href='https://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
23+
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
24+
<link rel="stylesheet" type="text/css" href="stylesheets/github-dark.css" media="screen">
25+
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">
26+
<!--[if lt IE 9]>
227
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script>
3-
<![endif]--><script src="https://www.googletagmanager.com/gtag/js?id=G-1HNLXQ7KKW"></script><script id="google-analytics">const isGoogleAnalyticsTrackingEnabled = "true" === "true".toLowerCase();
28+
<![endif]-->
29+
30+
<!-- Google Analytics 4 - BEGIN -->
31+
<script src="https://www.googletagmanager.com/gtag/js?id=G-1HNLXQ7KKW">
32+
</script>
33+
<script id="google-analytics">
34+
const isGoogleAnalyticsTrackingEnabled = true;
435
const gaMeasurementId = "G-1HNLXQ7KKW";
536

637
if (isGoogleAnalyticsTrackingEnabled && typeof gaMeasurementId !== "undefined") {
@@ -17,4 +48,16 @@
1748
} else {
1849
console.log("Google Analytics gaMeasurementId is not defined, thus not initializing");
1950
}
20-
}</script><link href="/CssToAndFromReact/static/css/main.3a0c27da.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><a href="https://github.com/htbkoo/CssToAndFromReact" target="_blank"><img style="position:absolute;top:0;right:0;border:0" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a><div id="container"><div class="inner"><header style="text-align:center"><img src="images/CssToAndFromReact-logo.svg" alt="logo"/></header><p>This simple little tool (forked to <a href="https://github.com/htbkoo/CssToAndFromReact">htbkoo/CssToAndFromReact</a> from <a href="https://github.com/staxmanade/CssToReact">staxmanade/CssToReact</a>) is intended to help translate plain <code>CSS</code> into and back from the <a href="https://facebook.github.io/react/tips/inline-styles.html">React in-line style</a> specific JSON representation. Making it easy to copy and paste into an inline React component or a CSS stylesheet.</p><section id="main"></section><p>Hint: Just edit one of the textarea and the other would update accordingly.</p><footer>This tool is originally created by <a href="http://staxmanade.com">Staxmanade</a>.<br/>And is forked by <a href="https://github.com/htbkoo">htbkoo</a>.</footer></div></div><script type="text/javascript" src="/CssToAndFromReact/static/js/main.a24dad77.js"></script></body></html>
51+
}
52+
</script>
53+
<!-- Google Analytics 4 - END -->
54+
55+
</head>
56+
<body onload="window.location = 'https://htbkoo.github.io/personal-portfolio/tools/cssToAndFromReact?utm_source=cssToAndFromReact'">
57+
<noscript>
58+
You need to enable JavaScript to run this app.
59+
</noscript>
60+
It should redirect to <a href="https://htbkoo.github.io/personal-portfolio/tools/cssToAndFromReact?utm_source=cssToAndFromReact">the page hosted on GitHub</a>.
61+
If it does not, please click on the above link manually.
62+
</body>
63+
</html>

docs/service-worker.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/static/css/main.3a0c27da.css

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/static/css/main.3a0c27da.css.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/static/js/main.a24dad77.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/static/js/main.a24dad77.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/stylesheets/github-dark.css

Lines changed: 0 additions & 124 deletions
This file was deleted.

0 commit comments

Comments
 (0)