minista 2.4.1 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -31,7 +31,7 @@ $ npm init minista@latest
31
31
  ### Manual Setup
32
32
 
33
33
  ```bash
34
- $ npm install --save-dev minista react react-dom
34
+ $ npm install --save-dev minista react@17 react-dom@17
35
35
  ```
36
36
 
37
37
  ```bash
package/dist/build.js CHANGED
@@ -42,22 +42,16 @@ import { renderHtml } from "./render.js";
42
42
  import { slashEnd, reactStylesToString } from "./utils.js";
43
43
  const __filename = url.fileURLToPath(import.meta.url);
44
44
  const __dirname = path.dirname(__filename);
45
- const ministaPkgUrl = path.resolve(__dirname + "/../package.json");
46
- const ministaPkgUrlRelative = path.relative(".", ministaPkgUrl);
47
- const ministaPkg = JSON.parse(fs.readFileSync(ministaPkgUrlRelative, "utf8"));
48
45
  const userPkgPath = path.resolve("package.json");
49
46
  const userPkgFilePath = path.relative(process.cwd(), userPkgPath);
50
47
  const userPkg = JSON.parse(fs.readFileSync(userPkgFilePath, "utf8"));
51
48
  const esbuildExternals = [
52
- ...Object.keys(ministaPkg.dependencies || {}),
53
- ...Object.keys(ministaPkg.devDependencies || {}),
54
- ...Object.keys(ministaPkg.peerDependencies || {}),
55
- ...Object.keys(userPkg.dependencies || {}),
56
- ...Object.keys(userPkg.devDependencies || {}),
57
- ...Object.keys(userPkg.peerDependencies || {}),
58
- "*.css",
59
- "*.scss",
60
- "*.sass"
49
+ "react",
50
+ "react/*",
51
+ "react-dom",
52
+ "react-dom/*",
53
+ "react-helmet",
54
+ "react-helmet/*"
61
55
  ];
62
56
  const esbuildLoaders = {
63
57
  ".jpg": "file",
package/dist/download.js CHANGED
@@ -15,7 +15,7 @@ async function downloadFiles(entryPoints, remoteUrl, remoteName, downloadOutDir,
15
15
  const html = await fs.readFile(entryPoint, "utf8");
16
16
  const parsedHtml = parseHtml(html);
17
17
  const imgTags = parsedHtml.getElementsByTagName("img");
18
- const sourseTags = parsedHtml.getElementsByTagName("sourse");
18
+ const sourceTags = parsedHtml.getElementsByTagName("source");
19
19
  if (imgTags.length > 0) {
20
20
  for (const item of imgTags) {
21
21
  const itemSrc = item.getAttribute("src");
@@ -34,8 +34,8 @@ async function downloadFiles(entryPoints, remoteUrl, remoteName, downloadOutDir,
34
34
  }
35
35
  }
36
36
  }
37
- if (sourseTags.length > 0) {
38
- for (const item of sourseTags) {
37
+ if (sourceTags.length > 0) {
38
+ for (const item of sourceTags) {
39
39
  const itemSrc = item.getAttribute("src");
40
40
  const itemSrcset = item.getAttribute("srcset");
41
41
  if (itemSrc && matchSrcUrls(itemSrc, remoteUrl)) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "minista",
3
3
  "description": "Next.js Like Development with 100% Static Generate",
4
- "version": "2.4.1",
4
+ "version": "2.4.2",
5
5
  "bin": {
6
6
  "minista": "./bin/minista.js"
7
7
  },
@@ -101,8 +101,8 @@
101
101
  "@types/js-beautify": "^1.13.3",
102
102
  "@types/mime-types": "^2.1.1",
103
103
  "@types/node": "^17.0.31",
104
- "@types/react": "^17.0.43",
105
- "@types/react-dom": "^17.0.14",
104
+ "@types/react": "^17.0.45",
105
+ "@types/react-dom": "^17.0.16",
106
106
  "@types/react-helmet": "^6.1.5",
107
107
  "@types/uuid": "^8.3.4",
108
108
  "react": "^17.0.2",