Skip to content

Commit ddc7e10

Browse files
committed
[optimize] upgrade Upstream packages
1 parent 45592e9 commit ddc7e10

File tree

7 files changed

+1603
-1453
lines changed

7 files changed

+1603
-1453
lines changed

ReadMe.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Cell Router
22

3-
[Web Component][1] Router based on [WebCell][2] & [Iterable Observer][3]
3+
[Web Component][1] Router based on [WebCell][2] & [MobX][3]
44

55
[![NPM Dependency](https://david-dm.org/EasyWebApp/cell-router.svg)][4]
6-
[![CI & CD](https://github.com/EasyWebApp/cell-router/workflows/CI%20&%20CD/badge.svg)][5]
6+
[![CI & CD](https://github.com/EasyWebApp/cell-router/actions/workflows/main.yml/badge.svg)][5]
77

88
[![NPM](https://nodei.co/npm/cell-router.png?downloads=true&downloadRank=true&stars=true)][6]
99

@@ -13,26 +13,26 @@ https://web-cell.dev/scaffold/
1313

1414
## Feature
1515

16-
- [x] **Router Component** as a **Page Container**
16+
- [x] `<iframe />`-like **Route Component** as a **Page Container**
1717

1818
- [x] **Page Link** (support `<a />`, `<area />` & `<form />`)
1919

2020
- `<a href="route/path">Page title</a>`
21-
- `<a href="route/path" title="Page title" target="_self">Example page</a>`
21+
- `<a href="route/path" title="Page title">Example page</a>`
2222
- `<a href="#page-section">Page section</a>` (Scroll to an Anchor smoothly)
2323
- `<form method="get" action="route/path" />` (Form Data processed by `URLSearchParams`)
2424

2525
- [x] **Path Mode**: `location.hash` (default) & `history.pushState()`
2626

27-
- [x] **Async Loading** (recommend to use with `import()` ECMAScript proposal)
27+
- [x] **Async Loading** (recommend to use with `import()` ECMAScript syntax)
2828

2929
- [x] CSS based **Page Transition Animation** (example [CSS][7] & [TSX][8])
3030

3131
## Installation
3232

3333
```shell
3434
npm install web-cell cell-router
35-
npm install parcel-bundler -D
35+
npm install parcel -D
3636
```
3737

3838
`tsconfig.json`
@@ -139,9 +139,9 @@ documentReady.then(() =>
139139

140140
[1]: https://www.webcomponents.org/
141141
[2]: https://web-cell.dev/
142-
[3]: https://web-cell.dev/iterable-observer/
142+
[3]: https://github.com/mobxjs/mobx/tree/mobx4and5/docs
143143
[4]: https://david-dm.org/EasyWebApp/cell-router
144-
[5]: https://github.com/EasyWebApp/cell-router/actions
144+
[5]: https://github.com/EasyWebApp/cell-router/actions/workflows/main.yml
145145
[6]: https://nodei.co/npm/cell-router/
146146
[7]: https://github.com/EasyWebApp/cell-router/blob/v2/test/source/index.less#L5
147147
[8]: https://github.com/EasyWebApp/cell-router/blob/v2/test/source/page/index.tsx#L12

package.json

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,32 @@
2424
"main": "dist/index.js",
2525
"module": "dist/index.esm.js",
2626
"dependencies": {
27-
"@swc/helpers": "^0.3.3",
27+
"@swc/helpers": "^0.3.17",
2828
"mobx": ">=4.0.0 <6.0.0",
2929
"regenerator-runtime": "^0.13.9",
30-
"urlpattern-polyfill": "^1.0.0-rc5",
31-
"web-cell": "^3.0.0-beta.0",
32-
"web-utility": "^3.4.2"
30+
"urlpattern-polyfill": "^5.0.3",
31+
"web-cell": "^3.0.0-beta.1",
32+
"web-utility": "^3.7.3"
3333
},
3434
"devDependencies": {
35-
"@parcel/packager-ts": "^2.3.2",
36-
"@parcel/transformer-less": "^2.3.2",
37-
"@parcel/transformer-typescript-types": "^2.3.2",
38-
"@types/jest": "^27.4.0",
39-
"element-internals-polyfill": "^0.1.54",
35+
"@parcel/packager-ts": "~2.6.0",
36+
"@parcel/transformer-less": "~2.6.0",
37+
"@parcel/transformer-typescript-types": "~2.6.0",
38+
"@types/jest": "^28.1.1",
39+
"element-internals-polyfill": "^1.1.4",
4040
"fs-match": "^1.6.0",
41-
"husky": "^7.0.4",
42-
"jest": "^27.4.7",
41+
"husky": "^8.0.1",
42+
"jest": "^28.1.0",
43+
"jest-environment-jsdom": "^28.1.0",
4344
"koapache": "^2.2.1",
44-
"lint-staged": "^12.3.4",
45-
"parcel": "^2.3.2",
46-
"prettier": "^2.5.1",
45+
"lint-staged": "^13.0.0",
46+
"parcel": "~2.6.0",
47+
"prettier": "^2.6.2",
4748
"process": "^0.11.10",
48-
"puppeteer-core": "^13.1.3",
49-
"ts-jest": "^27.1.3",
50-
"typedoc": "^0.22.11",
51-
"typescript": "~4.3.5"
49+
"puppeteer-core": "^14.2.1",
50+
"ts-jest": "^28.0.4",
51+
"typedoc": "^0.22.17",
52+
"typescript": "~4.7.3"
5253
},
5354
"scripts": {
5455
"prepare": "husky install",
@@ -73,11 +74,5 @@
7374
},
7475
"lint-staged": {
7576
"*.{html,md,json,ts,tsx}": "prettier --write"
76-
},
77-
"browserslist": "> 0.5%, last 2 versions, not dead",
78-
"targets": {
79-
"main": {
80-
"optimize": true
81-
}
8277
}
8378
}

source/History.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { URLPattern } from 'urlpattern-polyfill';
1+
import 'urlpattern-polyfill';
22
import {
33
getVisibleText,
44
scrollTo,

test/browser.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { WebServer } from 'koapache';
2-
import { Browser, Page, launch } from 'puppeteer-core';
2+
import Puppeteer, { Browser, Page } from 'puppeteer-core';
33

44
const { npm_config_chrome } = process.env;
55

@@ -16,11 +16,11 @@ export async function bootServer() {
1616
}
1717

1818
export async function getPage(path: string) {
19-
browser =
20-
browser ||
21-
(await launch({ executablePath: npm_config_chrome, slowMo: 200 }));
22-
23-
page = page || (await browser.pages())[0];
19+
browser ||= await Puppeteer.launch({
20+
executablePath: npm_config_chrome,
21+
slowMo: 200
22+
});
23+
page ||= (await browser.pages())[0];
2424

2525
await page.goto(path);
2626

test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "cell-router-test",
33
"private": true,
44
"devDependencies": {
5-
"parcel": "^2.3.2"
5+
"parcel": "~2.6.0"
66
},
77
"scripts": {
88
"start": "parcel source/index.html --no-source-maps --open",

tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"compilerOptions": {
33
"moduleResolution": "Node",
4+
"esModuleInterop": true,
45
"downlevelIteration": true,
56
"experimentalDecorators": true,
67
"jsx": "react",
78
"jsxFactory": "createCell",
89
"jsxFragmentFactory": "Fragment",
9-
"lib": ["ES2021", "DOM", "DOM.Iterable"],
10+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
1011
"skipLibCheck": true,
11-
"target": "ES5"
12+
"target": "ES2017"
1213
},
1314
"include": ["source/*"],
1415
"typedocOptions": {

0 commit comments

Comments
 (0)