mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-18 18:04:17 +00:00
* fix(plugin): let OMP and Pi plugin updates through without uninstalling (#833) Every OMP update was blocked, because OMP's native upgrade replaces cache folders that projects outside its inventory may still use. The only way to move an OMP binding to a new commit was to uninstall first. An update now runs the same pair a source change already uses: the scoped removal adapter (cache kept), then an install under a fresh marketplace and cache identity. A refresh always takes a new identity, because OMP installs from the catalog it cached when the marketplace was added, and that catalog still names the old version. If the removal cannot be verified, the update is blocked; update --all still skips it with the reason. Pi was blocked whenever the catalog plugin name differed from its package.json name. That happens after an upstream npm rename, for example when npm refused the original name. Pi installs by path, and Skillshare keys the binding by the catalog name, so the npm name never reaches either, and the check only stopped working installs. Updating one package across several Agents stopped every Agent as soon as one was blocked. Each failing Agent is now reported with its reason while the others update, and the command exits non-zero. A single --target, or a package with no other Agent to update, stays blocked as before, so a dry-run still fails when nothing would update. * fix(plugin): let one update --all refresh several OMP packages Every OMP removal proves itself against a fingerprint of the whole native registry and lock. In a single update --all plan, the first package's removal and reinstall rewrite those shared files. The second package's removal therefore saw "OMP native files changed", so only one OMP package could update per run. The same applied to a sync that replaced the sources of several OMP packages. A removal now also fingerprints only its own installation: its registry entry, its lock entry, its package manifest and its runtime link. After an earlier change in the same apply has written to that OMP target, the removal re-reads the files and runs every ownership check again. It goes ahead only if that own fingerprint still matches the preview. A change outside Skillshare to the package's own entries still blocks it. Without an earlier write in the apply, the full-file check is unchanged. The fake OMP in the tests now merges installs into the registry and lock and lists them in a stable order, as the real one keeps other plugins.
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])