Migrated to pnpm

This commit is contained in:
Prozilla 2024-06-17 21:46:01 +02:00
parent ade2774b90
commit 50edb84001
No known key found for this signature in database
GPG key ID: 5858DFE71CAF31EE
36 changed files with 6064 additions and 8361 deletions

2
.changeset/README.md Normal file
View file

@ -0,0 +1,2 @@
# Changesets

11
.changeset/config.json Normal file
View file

@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}

2
.gitignore vendored
View file

@ -2,6 +2,8 @@
# dependencies
/node_modules
/packages/*/node_modules
/packages/apps/*/node_modules
/.pnp
.pnp.js

1
.npmrc Normal file
View file

@ -0,0 +1 @@
git-checks=false

View file

@ -1,8 +1,9 @@
{
"npm.packageManager": "pnpm",
"editor.rulers": [
120
],
"workbench.colorCustomizations": {
"editorRuler.foreground": "#1F1F1F"
}
},
}

2
.vscode/tasks.json vendored
View file

@ -4,7 +4,7 @@
{
"label": "Start ProzillaOS",
"type": "shell",
"command": "npm start",
"command": "pnpm start",
"group": "none",
"presentation": {
"reveal": "always",

View file

@ -4,7 +4,6 @@ import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import react from "eslint-plugin-react";
import reactRefresh from "eslint-plugin-react-refresh";
import * as pluginImport from "eslint-plugin-import";
export default tseslint.config(
eslint.configs.recommended,
@ -23,9 +22,6 @@ export default tseslint.config(
plugins: {
react,
"react-refresh": reactRefresh,
import: {
rules: pluginImport.rules
}
},
rules: {
"quotes": "off",
@ -70,7 +66,6 @@ export default tseslint.config(
"warn",
{ "allowConstantExport": true }
],
"import/no-relative-packages": "error"
},
}
);

8296
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "@prozilla-os/prozilla-os",
"version": "0.1.0",
"name": "prozilla-os-monorepo",
"version": "0.0.0",
"private": true,
"author": {
"name": "Prozilla",
@ -11,58 +11,58 @@
"repository": "https://github.com/Prozilla/ProzillaOS",
"type": "module",
"scripts": {
"preinstall": "npx only-allow pnpm",
"start": "vite",
"build": "tsc && vite build",
"serve": "vite preview --port 8080",
"stage": "tsx scripts/stage",
"predeploy": "npm run build && npm run stage",
"predeploy": "pnpm run build && pnpm run stage",
"deploy": "tsx scripts/deploy",
"fetch": "tsx scripts/fetchRepository"
"fetch": "tsx scripts/fetchRepository",
"ci:test": "pnpm -r --parallel run test",
"ci:update": "npx changeset && pnpm changeset version",
"ci:release": "pnpm changeset publish"
},
"workspaces": [
"packages/prozilla-os",
"packages/core",
"packages/apps/file-explorer"
],
"dependencies": {
"@prozilla-os/core": "^1.0.0",
"@prozilla-os/file-explorer": "^1.0.0",
"@fortawesome/fontawesome-svg-core": "^6.4.0",
"@fortawesome/free-regular-svg-icons": "^6.4.0",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"@fortawesome/fontawesome-svg-core": "^6.5.2",
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"@fortawesome/react-fontawesome": "^0.2.2",
"@vitejs/plugin-react-swc": "^3.7.0",
"anser": "^2.1.1",
"escape-carriage": "^1.3.1",
"markdown-to-jsx": "^7.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-draggable": "^4.4.5",
"react-error-boundary": "^4.0.13",
"react-ga4": "^2.1.0",
"markdown-to-jsx": "^7.4.7",
"prozilla-os": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",
"react-svg": "^16.1.18",
"react-svg": "^16.1.34",
"react-syntax-highlighter": "^15.5.0",
"react-tabs": "^6.0.2",
"vite": "^5.2.12",
"vite": "^5.3.1",
"vite-plugin-svgr": "^4.2.0"
},
"devDependencies": {
"@eslint/js": "^9.2.0",
"@changesets/cli": "^2.27.5",
"@eslint/js": "^9.5.0",
"@types/eslint": "^8.56.10",
"@types/gh-pages": "^6.1.0",
"@types/node": "^20.12.8",
"@types/react": "^18.3.1",
"@types/node": "^20.14.2",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react-syntax-highlighter": "^15.5.13",
"eslint": "^8.57.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react": "^7.34.2",
"eslint-plugin-react-refresh": "^0.4.7",
"gh-pages": "^5.0.0",
"stylelint": "^16.6.1",
"tsx": "^4.15.4",
"tsx": "^4.15.6",
"typescript": "^5.4.5",
"typescript-eslint": "^7.8.0",
"typescript-eslint": "^7.13.1",
"vite-plugin-checker": "^0.6.4"
},
"browserslist": {
@ -76,5 +76,6 @@
"last 1 firefox version",
"last 1 safari version"
]
}
},
"packageManager": "pnpm@9.1.4"
}

View file

@ -0,0 +1,16 @@
# @prozilla-os/file-explorer
## 1.0.3
### Patch Changes
- Updated dependencies
- @prozilla-os/core@1.0.6
## 1.0.2
### Patch Changes
- Fixed dependencies
- Updated dependencies
- @prozilla-os/core@1.0.5

View file

@ -1,6 +1,6 @@
{
"name": "@prozilla-os/file-explorer",
"version": "1.0.0",
"version": "1.0.3",
"author": {
"name": "Prozilla",
"email": "business@prozilla.dev",
@ -21,13 +21,13 @@
"@fortawesome/fontawesome-svg-core": "^6.5.2",
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"@fortawesome/react-fontawesome": "^0.2.2",
"react": "^18.3.1",
"@prozilla-os/core": "^1.0.0"
"@prozilla-os/core": "workspace:*",
"react": "^18.3.1"
},
"devDependencies": {
"typescript": "^5.4.5"
},
"files": [
"src/index.ts"
"src/**/*"
]
}

View file

@ -0,0 +1,16 @@
# @prozilla-os/core
## 1.0.6
### Patch Changes
- Fixed tracking manager
- @prozilla-os/file-explorer@1.0.3
## 1.0.5
### Patch Changes
- Fixed dependencies
- Updated dependencies
- @prozilla-os/file-explorer@1.0.2

View file

@ -1,6 +1,6 @@
{
"name": "@prozilla-os/core",
"version": "1.0.0",
"version": "1.0.6",
"author": {
"name": "Prozilla",
"email": "business@prozilla.dev",
@ -18,11 +18,11 @@
},
"license": "MIT",
"dependencies": {
"@prozilla-os/file-explorer": "^1.0.0",
"@fortawesome/fontawesome-svg-core": "^6.5.2",
"@fortawesome/free-regular-svg-icons": "^6.5.2",
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"@fortawesome/react-fontawesome": "^0.2.2",
"@prozilla-os/file-explorer": "workspace:*",
"react": "^18.3.1",
"react-draggable": "^4.4.6",
"react-error-boundary": "^4.0.13",
@ -34,7 +34,7 @@
"typescript": "^5.4.5"
},
"files": [
"src/index.ts"
"src/**/*"
],
"publishConfig": {
"registry": "https://npm.pkg.github.com",

View file

@ -1,8 +1,8 @@
export { ProzillaOS } from "./prozilla-os/ProzillaOS";
export { Taskbar } from "./taskbar/Taskbar";
export { WindowsView } from "./windows/WindowsView";
export { ModalsView } from "./modals/ModalsView";
export { Desktop } from "./desktop/Desktop";
export * from "./_utils";
export * from "./actions";
export * from "./modals";

View file

@ -2,5 +2,6 @@ export { DialogBox } from "./dialog-box/DialogBox";
export { WindowedModal } from "./_utils/WindowedModal";
export { FileSelector } from "./file-selector/FileSelector";
export { Share } from "./share/Share";
export { ModalsView } from "./ModalsView";
export type { ModalProps } from "./ModalView";

View file

@ -8,4 +8,13 @@ export const CODE_EXTENSIONS = [
"html",
"xml",
"yml"
];
export const IMAGE_EXTENSIONS = [
"png",
"jpeg",
"svg",
"gif",
"webp",
"ico"
];

View file

@ -12,15 +12,17 @@ export class AppsConfig {
constructor(options: OptionalInterface<AppsConfigOptions> = {}) {
const { apps } = options as AppsConfigOptions;
const appIds: string[] = [];
apps.forEach((app) => {
if (appIds.includes(app.id))
throw new Error(`Duplicate app ID found: ${app.id}`
+ "\nApp IDs must be unique.");
if (apps != null) {
const appIds: string[] = [];
apps.forEach((app) => {
if (appIds.includes(app.id))
throw new Error(`Duplicate app ID found: ${app.id}`
+ "\nApp IDs must be unique.");
this.apps.push(app);
appIds.push(app.id);
});
this.apps.push(app);
appIds.push(app.id);
});
}
}
getAppById(id: string): App | null {

View file

@ -15,8 +15,12 @@ export class TrackingManager {
const { trackingConfig } = this.#systemManager;
this.measurementId = trackingConfig.enabled ? trackingConfig.GAMeasurementId : null;
if (this.measurementId != null)
ReactGA.initialize(this.measurementId);
try {
if (this.measurementId != null)
ReactGA.initialize(this.measurementId);
} catch (error) {
console.error(error);
}
return this;
}
@ -27,6 +31,10 @@ export class TrackingManager {
if (this.measurementId == null)
return;
ReactGA.event(options);
try {
ReactGA.event(options);
} catch (error) {
console.error(error);
}
}
}

View file

@ -1,4 +1,4 @@
import { IMAGE_FORMATS } from "../../../../../apps/media-viewer/config/mediaViewer.config";
import { IMAGE_EXTENSIONS } from "../../../constants/virtualDrive.const";
import { WindowsManager } from "../../windows/windowsManager";
import { VirtualBase, VirtualBaseJson } from "../virtualBase";
@ -120,7 +120,7 @@ export class VirtualFile extends VirtualBase {
let iconUrl = null;
if (this.source != null && this.extension != null && IMAGE_FORMATS.includes(this.extension))
if (this.source != null && this.extension != null && IMAGE_EXTENSIONS.includes(this.extension))
return this.source;
const { virtualDriveConfig } = this.getRoot().systemManager;

View file

@ -0,0 +1,19 @@
# prozilla-os
## 1.0.6
### Patch Changes
- Fixed tracking manager
- Updated dependencies
- @prozilla-os/core@1.0.6
- @prozilla-os/file-explorer@1.0.3
## 1.0.5
### Patch Changes
- Fixed dependencies
- Updated dependencies
- @prozilla-os/file-explorer@1.0.2
- @prozilla-os/core@1.0.5

View file

@ -0,0 +1,3 @@
# prozilla-os
A React component library for building web-based operating systems made in TypeScript by Prozilla.

View file

@ -0,0 +1,43 @@
{
"name": "prozilla-os",
"description": "A React component library for building web-based operating systems made in TypeScript by Prozilla.",
"version": "1.0.6",
"homepage": "https://os.prozilla.dev/",
"author": {
"name": "Prozilla",
"email": "business@prozilla.dev",
"url": "https://prozilla.dev/"
},
"main": "src/index.ts",
"type": "module",
"scripts": {
"test": "tsc --watch"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Prozilla/ProzillaOS.git",
"directory": "packages/prozilla-os"
},
"license": "MIT",
"keywords": [
"react",
"typescript",
"web-os",
"components",
"internet-os",
"virtual-desktop"
],
"dependencies": {
"@prozilla-os/core": "workspace:*",
"@prozilla-os/file-explorer": "workspace:*"
},
"devDependencies": {
"typescript": "^5.4.5"
},
"files": [
"src/**/*"
],
"publishConfig": {
"access": "public"
}
}

View file

@ -0,0 +1,2 @@
export * from "@prozilla-os/core";
export * from "@prozilla-os/file-explorer";

View file

@ -0,0 +1,5 @@
{
"extends": "../../tsconfig.json",
"include": ["src/**/*"],
"exclude": ["node_modules"]
}

5860
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load diff

3
pnpm-workspace.yaml Normal file
View file

@ -0,0 +1,3 @@
packages:
- "packages/*"
- "packages/apps/*"

View file

@ -1,6 +1,6 @@
import { ProzillaOS } from "prozilla-os";
import { ReactElement } from "react";
import { Router } from "./router/Router";
import { ProzillaOS } from "@prozilla-os/core";
import { desktopConfig } from "./config/desktop.config";
import { NAME, TAG_LINE } from "./config/branding.config";
import { appsConfig } from "./config/apps.config";

View file

@ -1,7 +1,7 @@
import { ReactSVG } from "react-svg";
import { NAME } from "../../config/branding.config";
import styles from "./StandaloneHeader.module.css";
import { Button } from "@prozilla-os/core";
import { Button } from "prozilla-os";
import { faTimes } from "@fortawesome/free-solid-svg-icons";
interface StandaloneHeaderProps {

View file

@ -1,5 +1,4 @@
import { AppsConfig } from "@prozilla-os/core";
import { fileExplorer } from "@prozilla-os/file-explorer";
import { AppsConfig, fileExplorer } from "prozilla-os";
export const appsConfig = new AppsConfig({
apps: [

View file

@ -1,4 +1,4 @@
import { ANSI } from "@prozilla-os/core";
import { ANSI } from "prozilla-os";
export const NAME = "ProzillaOS";
export const TAG_LINE = "Web-based Operating System";

View file

@ -1,4 +1,4 @@
import { DesktopConfig } from "@prozilla-os/core";
import { DesktopConfig } from "prozilla-os";
export const desktopConfig = new DesktopConfig({
wallpapers: [

View file

@ -1,4 +1,4 @@
import { VirtualDriveConfig } from "@prozilla-os/core";
import { VirtualDriveConfig } from "prozilla-os";
export const virtualDriveConfig = new VirtualDriveConfig({
fileIcon: "/assets/apps/file-explorer/icons/file.svg",

View file

@ -2,7 +2,7 @@ import { BrowserRouter, Route, Routes } from "react-router-dom";
import { DefaultRoute } from "./routes/DefaultRoute";
import { StandaloneRoute } from "./routes/StandaloneRoute";
import { NoRoute } from "./routes/NoRoute";
import { useSystemManager } from "@prozilla-os/core";
import { useSystemManager } from "prozilla-os";
export function Router() {
const { appsConfig } = useSystemManager();

View file

@ -1,4 +1,4 @@
import { Desktop, ModalsView, Taskbar, WindowsView } from "@prozilla-os/core";
import { Desktop, ModalsView, Taskbar, WindowsView } from "prozilla-os";
export function DefaultRoute() {
return <>

View file

@ -1,6 +1,6 @@
import { faArrowRight } from "@fortawesome/free-solid-svg-icons";
import styles from "./NoRoute.module.css";
import { Button, utilStyles } from "@prozilla-os/core";
import { Button, utilStyles } from "prozilla-os";
export function NoRoute() {
return <span className={styles.NoRoute}>

View file

@ -1,7 +1,7 @@
import { useCallback, useEffect, useState } from "react";
import styles from "./StandaloneRoute.module.css";
import { NAME } from "../../config/branding.config";
import { App, generateUrl, getViewportParams, ModalsView, openUrl, setViewportIcon, setViewportTitle } from "@prozilla-os/core";
import { App, generateUrl, getViewportParams, ModalsView, openUrl, setViewportIcon, setViewportTitle } from "prozilla-os";
import { StandaloneHeader } from "../../components/standalone/StandaloneHeader";
interface StandaloneRouteProps {