Skip to content

Commit

Permalink
build: update dependencies and add pnpm7 (#276)
Browse files Browse the repository at this point in the history
* build: update dependencies and scripts for pnpm7

* ci: add ci pnpm7 support

* chore: add .nvmrc
  • Loading branch information
riccardoperra committed Jun 10, 2022
1 parent d09a0c0 commit 16a6632
Show file tree
Hide file tree
Showing 19 changed files with 285 additions and 363 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@v2
- uses: pnpm/[email protected]
with:
version: 6.23.2
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
Expand All @@ -39,10 +39,6 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Lint
run: |
pnpm lint
- name: Build
run: |
pnpm build:prod
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v2
- uses: pnpm/[email protected]
with:
version: 6.23.2
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
Expand All @@ -35,4 +35,4 @@ jobs:
run: pnpm install

- name: Lint
run: pnpm lint --filter @codeimage/*
run: pnpm lint
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v2
- uses: pnpm/[email protected]
with:
version: 6.23.2
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
Expand Down
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
save-exact=true
save-prefix=

strict-peer-dependencies=true

shell-emulator=true
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.13.2
2 changes: 1 addition & 1 deletion apps/codeimage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"solid-app-router": "^0.3.3",
"solid-codemirror": "^1.0.3",
"solid-headless": "^0.10.12",
"solid-js": "^1.4.2",
"solid-js": "^1.4.4",
"solid-use": "^0.3.4",
"tinykeys": "^1.4.0",
"workbox-precaching": "^6.5.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export const CustomEditorPreview = (

createEffect(() =>
batch(() => {
// @ts-expect-error Deep type
setOptions({
value: props.code,
extensions: [
Expand Down
4 changes: 2 additions & 2 deletions apps/codeimage/src/core/hooks/from-observable-object.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {Observable} from 'rxjs';
import {createStore, DeepReadonly, reconcile} from 'solid-js/store';
import {createStore, reconcile} from 'solid-js/store';
import {select} from '@ngneat/elf';
import {onCleanup} from 'solid-js';

export function fromObservableObject<T>(store: Observable<T>) {
const initialValue = {} as T;
const [state, setState] = createStore<T>(initialValue);
const sub = store.pipe(select(state => state)).subscribe(nextState => {
setState(reconcile(nextState as DeepReadonly<T>));
setState(reconcile(nextState));
});
onCleanup(() => sub.unsubscribe());
return state;
Expand Down
4 changes: 3 additions & 1 deletion apps/codeimage/src/state/editor/createEditors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ function $createEditorsStore() {
const isActive = createSelector(activeEditorId);

onMount(async () => {
const idbState = await idb.get<PersistedEditorState>(IDB_KEY);
const idbState = await idb
.get<PersistedEditorState>(IDB_KEY)
.catch(() => null);
if (idbState) {
// Versioning state tabs -> TODO: not needed if id is not createUniqueId from solid
const editors = idbState.editors.slice(0, MAX_TABS).map(editor => ({
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@
},
"scripts": {
"prepare": "husky install",
"dev": "pnpm dev --filter=@codeimage/app",
"libs:build": "pnpm --parallel --filter='./packages' --filter='!@codeimage/config' build && pnpm libs:build:config",
"dev": "pnpm --filter=@codeimage/app dev",
"libs:build": "pnpm libs:build:core && pnpm libs:build:config",
"libs:build:core": "pnpm --filter \"{packages/**}\" --filter='!@codeimage/config' --parallel build",
"libs:build:config": "pnpm --filter=@codeimage/config build",
"libs:build:watch": "pnpm --parallel --aggregate-output --filter ./packages --filter='!@codeimage/config' --filter build:watch",
"lint": "pnpm lint --recursive --parallel --filter='@codeimage/*'",
"typecheck": "pnpm typecheck --recursive --parallel --filter='@codeimage/*'",
"build:prod": "pnpm patch-solid-exports && pnpm libs:build && pnpm --filter='@codeimage/config' --filter='@codeimage/app' build",
"libs:build:watch": "pnpm --filter \"{packages/**}\" --filter='!@codeimage/config' --parallel --aggregate-output build:watch",
"lint": "pnpm --filter='@codeimage/*' --parallel -r lint",
"typecheck": "pnpm --filter='@codeimage/*' --recursive --parallel typecheck",
"build:prod": "pnpm patch-solid-exports && pnpm libs:build && pnpm --filter=@codeimage/app build",
"changeset:pr": "changeset version && ts-node scripts/sync-package.ts",
"pre-commit": "lint-staged --relative",
"pre-commit-prettier": "prettier --write",
Expand Down Expand Up @@ -76,7 +77,6 @@
"typescript": "^4.7.3"
},
"engines": {
"node": ">=14.x",
"pnpm": ">=6.23.2"
"pnpm": ">=7"
}
}
}
6 changes: 3 additions & 3 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@
"@codemirror/view": "^0.20.6",
"@codemirror/legacy-modes": "^0.20.0",
"material-icon-theme": "^4.17.0",
"solid-js": "^1.4.2"
"solid-js": "^1.4.4"
},
"peerDependencies": {
"@codeimage/theme": "workspace:*",
"@codemirror/state": "^0.20.0",
"@codemirror/view": "^0.20.4",
"@codemirror/language": "^0.20.0",
"solid-js": "^1.4.2"
"solid-js": "^1.4.4"
},
"devDependencies": {
"rimraf": "^3.0.2",
"typescript": "^4.6.4",
"typescript": "^4.7.3",
"vite": "^2.9.8",
"vite-plugin-dts": "^1.1.1",
"vite-plugin-solid": "^2.2.6"
Expand Down
2 changes: 2 additions & 0 deletions packages/dom-export/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
7 changes: 7 additions & 0 deletions packages/dom-export/.lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"**/*.{ts,tsx,js,jsx,json}": [
"pnpm lint",
"pnpm pre-commit-prettier",
"pnpm pre-commit-eslint"
]
}
3 changes: 1 addition & 2 deletions packages/dom-export/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"svg"
],
"scripts": {
"lint": "eslint 'src/**/*.{js,ts}?(x)' --fix",
"lint": "eslint . --ext .js,.jsx,.mjs,.ts,.tsx -c ../../.eslintrc.js",
"build": "vite build"
},
"lint-staged": {
Expand Down Expand Up @@ -53,7 +53,6 @@
],
"devDependencies": {
"@types/node": "17.0.40",
"imagediff": "^1.0.8",
"lint-staged": "^13.0.0",
"prettier": "^2.6.2",
"rimraf": "^3.0.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/locale/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
},
"dependencies": {
"@solid-primitives/i18n": "^1.1.0",
"solid-js": "^1.4.2"
"solid-js": "^1.4.4"
},
"peerDependencies": {
"solid-js": "^1.4.2"
},
"devDependencies": {
"rimraf": "^3.0.2",
"typescript": "^4.6.4",
"typescript": "^4.7.3",
"vite": "^2.9.8",
"vite-plugin-dts": "^1.1.1",
"vite-plugin-solid": "^2.2.6"
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"devDependencies": {
"rimraf": "^3.0.2",
"typescript": "^4.6.4",
"typescript": "^4.7.3",
"vite": "^2.9.9",
"vite-plugin-dts": "^1.1.1",
"vite-plugin-solid": "^2.2.6"
Expand Down
32 changes: 16 additions & 16 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
"@vanilla-extract/recipes": "^0.2.4",
"@vanilla-extract/dynamic": "^2.0.2",
"solid-headless": "^0.10.12",
"@solid-aria/interactions": "^0.0.5",
"@solid-aria/focus": "^0.0.7",
"@solid-aria/overlays": "^0.0.3",
"@solid-aria/utils": "^0.0.5",
"@solid-aria/interactions": "^0.0.7",
"@solid-aria/focus": "^0.0.9",
"@solid-aria/overlays": "^0.0.5",
"@solid-aria/utils": "^0.0.6",
"@solid-primitives/utils": "^2.0.1",
"@solid-primitives/refs": "^0.2.0",
"@solid-primitives/props": "^2.1.2",
"solid-use": "^0.3.4",
"solid-js": "^1.4.2",
"solid-js": "^1.4.4",
"csstype": "^3.1.0",
"clsx": "^1.1.1",
"@floating-ui/dom": "^0.5.1",
Expand All @@ -55,22 +55,22 @@
"clsx": "^1.1.1",
"@floating-ui/dom": "^0.5.1",
"@floating-ui/core": "^0.7.1",
"@solid-aria/interactions": "^0.0.5",
"@solid-aria/focus": "^0.0.7",
"@solid-aria/overlays": "^0.0.3",
"@solid-aria/utils": "^0.0.5",
"@solid-aria/dialog": "^0.0.2",
"@solid-aria/button": "^0.0.4",
"@solid-aria/i18n": "^0.0.6",
"@solid-primitives/utils": "^2.0.1",
"@solid-aria/interactions": "^0.0.7",
"@solid-aria/focus": "^0.0.9",
"@solid-aria/overlays": "^0.0.5",
"@solid-aria/utils": "^0.0.6",
"@solid-aria/dialog": "^0.0.5",
"@solid-aria/button": "^0.0.6",
"@solid-aria/i18n": "^0.0.7",
"@solid-primitives/utils": "^2.1.0",
"@solid-primitives/refs": "^0.2.0",
"@solid-primitives/props": "^2.1.2"
"@solid-primitives/props": "^2.1.7"
},
"devDependencies": {
"@types/node": "^17.0.31",
"rimraf": "^3.0.2",
"solid-js": "^1.4.2",
"typescript": "^4.6.4",
"solid-js": "^1.4.4",
"typescript": "^4.7.3",
"vite": "^2.9.8",
"vite-plugin-dts": "^1.1.1",
"vite-plugin-solid": "^2.2.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/lib/primitives/ColorPicker/ColorPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function ColorPicker(props: PropsWithChildren<ColorPickerProps>) {

const {buttonProps} = createButton(
{
onPress: () => state.open(),
onClick: () => state.open(),
},
() => triggerRef,
);
Expand Down
Loading

0 comments on commit 16a6632

Please sign in to comment.