Skip to content

Commit

Permalink
Merge branch 'main' into rr7
Browse files Browse the repository at this point in the history
* main:
  Release 18.0.3
  Release @plone/registry 2.1.2
  Preparing for 18.0.3
  Fix weird issue in images build with typings (#6471)
  Release 18.0.2
  Release @plone/providers 1.0.0-alpha.5
  Release @plone/scripts 3.8.1
  Release @plone/components 2.1.1
  Fix packaging and plone/components src export (#6470)
  Release @plone/registry 2.1.1
  Repackage registry
  Release 18.0.1
  Release @plone/providers 1.0.0-alpha.4
  Release @plone/components 2.1.0
  Release @plone/client 1.0.0-alpha.20
  Release @plone/scripts 3.8.0
  Release @plone/registry 2.1.0
  Get rid of all appearances of parcel in core. (#6469)
  Replace parcel with tsup. Better types, better tsconfig. Move to ESM. (#6468)
  • Loading branch information
sneridagh committed Nov 5, 2024
2 parents 767e998 + 0a7bd48 commit b2cc5e8
Show file tree
Hide file tree
Showing 47 changed files with 251 additions and 1,366 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const config = {
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 0,
},
},
{
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,4 @@ docs/_build/
/.tool-versions
docs/source/news

.turbo
.parcel-cache/
tsconfig.tsbuildinfo
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ public-hoist-pattern[]=*prettier*
public-hoist-pattern[]=*stylelint*
public-hoist-pattern[]=*cypress*
public-hoist-pattern[]=*process*
public-hoist-pattern[]=*parcel*
29 changes: 27 additions & 2 deletions docs/source/release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,34 @@ myst:

<!-- towncrier release notes start -->

## 18.0.0 (2024-10-31)
## 18.0.3 (2024-11-05)

### Bugfix

- Fixed image generation because of a bug in the docker build with registry typings. @sneridagh [#6471](https://github.com/plone/volto/issues/6471)

## 18.0.2 (2024-11-05)

## 18.0.0 (Unreleased)
### Internal

- Fix missing export src in @plone/components Also improve packaging in packages. @sneridagh [#6470](https://github.com/plone/volto/issues/6470)

## 18.0.1 (2024-11-05)

### Bugfix

- Fix ERR_REQUIRE from ESM module requiring CJS module in `@plone/registry` fix tests. @sneridagh [#6458](https://github.com/plone/volto/issues/6458)

### Internal

- Improve exports in @plone/registry, adapt the Jest test setup. @sneridagh [#6461](https://github.com/plone/volto/issues/6461)
- Removed `parcel` completely from core. @sneridagh [#6469](https://github.com/plone/volto/issues/6469)

### Documentation

- Fix display of nvm version when installing it for Contributing to Volto. @stevepiercy [#6460](https://github.com/plone/volto/issues/6460)

## 18.0.0 (2024-10-31)

(Summary)

Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
"update:browserlist": "pnpm --filter @plone/volto add caniuse-lite && pnpm --filter @plone/volto remove caniuse-lite"
},
"devDependencies": {
"@parcel/packager-ts": "^2.12.0",
"@parcel/transformer-typescript-types": "^2.12.0",
"concurrently": "^8.2.2",
"husky": "9.0.11",
"lint-staged": "15.2.2",
Expand Down
2 changes: 0 additions & 2 deletions packages/blocks/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@ news
towncrier.toml
.changelog.draft
node_modules/
.parcel-cache
.parcelrc
.release-it.json
.eslintrc.js
8 changes: 0 additions & 8 deletions packages/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
"access": "public"
},
"main": "src/index.ts",
"targets": {
"main": {
"includeNodeModules": false
}
},
"scripts": {
"test": "vitest",
"dry-release": "release-it --dry-run",
Expand All @@ -52,13 +47,10 @@
},
"dependencies": {},
"devDependencies": {
"@parcel/packager-ts": "^2.12.0",
"@parcel/transformer-typescript-types": "^2.12.0",
"@plone/registry": "workspace:*",
"@plone/types": "workspace:*",
"@types/react": "^18",
"@types/react-dom": "^18",
"parcel": "^2.12.0",
"release-it": "17.1.1",
"tsconfig": "workspace:*",
"typescript": "^5.6.3",
Expand Down
7 changes: 7 additions & 0 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@

<!-- towncrier release notes start -->

## 1.0.0-alpha.20 (2024-11-05)

### Internal

- Bump local `typescript` version. @sneridagh [#6461](https://github.com/plone/volto/pull/6461)
- Replace `parcel` with `tsup`. @sneridagh [#6466](https://github.com/plone/volto/pull/6466)

## 1.0.0-alpha.19 (2024-10-18)

### Feature
Expand Down
1 change: 0 additions & 1 deletion packages/client/news/6461.internal

This file was deleted.

1 change: 0 additions & 1 deletion packages/client/news/6466.internal

This file was deleted.

2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
],
"license": "MIT",
"version": "1.0.0-alpha.19",
"version": "1.0.0-alpha.20",
"repository": {
"type": "git",
"url": "[email protected]:plone/volto.git"
Expand Down
2 changes: 0 additions & 2 deletions packages/components/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ lib
!.yarn/releases
!.yarn/sdks
!.yarn/versions

.parcel-cache/
12 changes: 12 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@

<!-- towncrier release notes start -->

## 2.1.1 (2024-11-05)

### Internal

- Improve packaging and bring back the export for `src` folder. @sneridagh

## 2.1.0 (2024-11-05)

### Internal

- Replace `parcel` with `tsup`. Better types, better tsconfig. Move to ESM. @sneridagh [#6467](https://github.com/plone/volto/issues/6467)

## 2.0.0 (2024-10-31)

### Internal
Expand Down
1 change: 0 additions & 1 deletion packages/components/news/6467.internal

This file was deleted.

5 changes: 3 additions & 2 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
],
"license": "MIT",
"version": "2.0.0",
"version": "2.1.1",
"repository": {
"type": "git",
"url": "http://github.com/plone/components.git"
Expand All @@ -29,7 +29,8 @@
"import": "./dist/index.js",
"default": "./dist/index.cjs"
},
"./dist/*.css": "./dist/*.css"
"./dist/*.css": "./dist/*.css",
"./src/*": "./src/*"
},
"homepage": "https://plone.org",
"keywords": [
Expand Down
13 changes: 3 additions & 10 deletions packages/helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,9 @@
"access": "public"
},
"main": "src/index.ts",
"targets": {
"main": {
"includeNodeModules": false
}
},
"scripts": {
"watch": "parcel watch",
"build": "parcel build",
"watch": "tsup",
"build": "tsup",
"test": "vitest",
"dry-release": "release-it --dry-run",
"release": "release-it",
Expand All @@ -54,14 +49,12 @@
},
"dependencies": {},
"devDependencies": {
"@parcel/packager-ts": "^2.12.0",
"@parcel/transformer-typescript-types": "^2.12.0",
"@plone/types": "workspace:*",
"@types/react": "^18",
"@types/react-dom": "^18",
"parcel": "^2.12.0",
"release-it": "^17.1.1",
"tsconfig": "workspace:*",
"tsup": "^8.3.5",
"typescript": "^5.6.3",
"vitest": "^2.1.3"
}
Expand Down
2 changes: 0 additions & 2 deletions packages/providers/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@ news
towncrier.toml
.changelog.draft
node_modules/
.parcel-cache
.parcelrc
.release-it.json
.eslintrc.js
9 changes: 0 additions & 9 deletions packages/providers/.parcelrc

This file was deleted.

13 changes: 13 additions & 0 deletions packages/providers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@

<!-- towncrier release notes start -->

## 1.0.0-alpha.5 (2024-11-05)

### Internal

- Improve packaging. @sneridagh

## 1.0.0-alpha.4 (2024-11-05)

### Internal

- Bump local `typescript` version. @sneridagh [#6461](https://github.com/plone/volto/issues/6461)
- Replace `parcel` with `tsup`. Better types, better tsconfig. Move to ESM. @sneridagh [#6468](https://github.com/plone/volto/issues/6468)

## 1.0.0-alpha.3 (2024-10-18)

## 1.0.0-alpha.2 (2024-10-18)
Expand Down
1 change: 0 additions & 1 deletion packages/providers/news/6461.internal

This file was deleted.

36 changes: 16 additions & 20 deletions packages/providers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"funding": "https://github.com/sponsors/plone",
"license": "MIT",
"version": "1.0.0-alpha.3",
"version": "1.0.0-alpha.5",
"repository": {
"type": "git",
"url": "https://github.com/plone/volto.git"
Expand All @@ -28,22 +28,23 @@
"publishConfig": {
"access": "public"
},
"source": "./src/index.ts",
"main": "./dist/main.js",
"module": "./dist/module.mjs",
"types": "./dist/index.d.ts",
"type": "module",
"files": [
"dist",
"README.md"
],
"main": "./dist/index.js",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
"import": "./dist/module.mjs",
"require": "./dist/main.js"
},
"./src/*": "./src/*"
"import": "./dist/index.js",
"default": "./dist/index.cjs"
}
},
"scripts": {
"watch": "parcel watch",
"build": "parcel build",
"build:force": "rm -rf dist && parcel build --no-cache",
"build": "tsup",
"build:force": "tsup",
"check:exports": "attw --pack .",
"test": "vitest",
"dry-release": "release-it --dry-run",
"release": "release-it",
Expand All @@ -67,18 +68,13 @@
"react-aria-components": "^1.4.0"
},
"devDependencies": {
"@parcel/config-default": "^2.12.0",
"@parcel/core": "^2.12.0",
"@parcel/packager-ts": "^2.12.0",
"@parcel/transformer-js": "^2.12.0",
"@parcel/transformer-react-refresh-wrap": "^2.12.0",
"@parcel/transformer-typescript-types": "^2.12.0",
"@arethetypeswrong/cli": "^0.16.4",
"@plone/types": "workspace:*",
"@types/react": "^18",
"@types/react-dom": "^18",
"parcel": "^2.12.0",
"release-it": "17.1.1",
"tsconfig": "workspace:*",
"tsup": "^8.3.5",
"typescript": "^5.6.3",
"vitest": "^2.1.3"
}
Expand Down
9 changes: 7 additions & 2 deletions packages/providers/src/AppRouter.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import React, { createContext, ReactNode, useContext, useMemo } from 'react';
import React, {
createContext,
type ReactNode,
useContext,
useMemo,
} from 'react';
import { RouterProvider } from 'react-aria-components';
import { flattenToAppURL as defaultFlattenToAppURL } from './utils';

Expand All @@ -17,7 +22,7 @@ interface AppRouter {
useLocation: () => Location | undefined;
useParams: (opts?: any) => Record<string, string>;
navigate: (path: string) => void;
useHref: (to: string, options?: any) => string;
useHref?: (to: string, options?: any) => string;
flattenToAppURL: (path: string | undefined) => string | undefined;
}

Expand Down
17 changes: 10 additions & 7 deletions packages/providers/src/PloneProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
import React, { createContext, ReactNode, useContext, useMemo } from 'react';
import React, {
createContext,
type ReactNode,
useContext,
useMemo,
} from 'react';
import { QueryClient } from '@tanstack/react-query';
import { AppRouterProvider, Location } from './AppRouter';
import { AppRouterProvider, type Location } from './AppRouter';
import { PloneClientProvider } from './PloneClient';
import PloneClient from '@plone/client';
import { flattenToAppURL as defaultFlattenToAppURL } from './utils';

interface PloneProvider {
ploneClient: InstanceType<typeof PloneClient>;
queryClient: QueryClient;
ploneClient?: InstanceType<typeof PloneClient>;
queryClient?: QueryClient;
useLocation: () => Location | undefined;
useParams: (opts?: any) => Record<string, string>;
navigate: (path: string) => void;
useHref: (to: string, options?: any) => string;
useHref?: (to: string, options?: any) => string;
flattenToAppURL: (path: string | undefined) => string | undefined;
}

const PloneProviderContext = createContext<PloneProvider>({
ploneClient: null,
queryClient: null,
useLocation: () => ({
href: '',
pathname: '',
Expand Down
25 changes: 23 additions & 2 deletions packages/providers/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
{
"extends": "tsconfig/react-library.json",
"include": ["src", "src/**/*.js"],
"compilerOptions": {
"esModuleInterop": true,
"skipLibCheck": true,
"target": "es2022",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,
"verbatimModuleSyntax": true,

"strict": true,
"noImplicitOverride": true,

"lib": ["es2022", "dom", "dom.iterable"],
"module": "preserve",
"noEmit": true,

"jsx": "react-jsx",

"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src"],
"exclude": [
"node_modules",
"build",
Expand Down
Loading

0 comments on commit b2cc5e8

Please sign in to comment.