Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove next-sw and other monorepo packages #109

Merged
merged 9 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": ["@next-pwa-example/*", "tests-utils", "next-pwa-tests", "docs"]
"ignore": ["@next-pwa-example/*", "next-pwa-tests", "docs"]
}
2 changes: 2 additions & 0 deletions .changeset/soft-ears-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
1 change: 0 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ module.exports = {
"import/internal-regex": "^@ducanh2912/",
"import/external-module-folders": [
"packages/next-pwa",
"packages/next-sw",
"packages/utils",
"packages/constants",
"node_modules",
Expand Down
51 changes: 0 additions & 51 deletions .github/ISSUE_TEMPLATE/1-bug-next-sw.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,7 @@ body:
value: Thanks for taking the time to file a feature request! Please fill out this form as completely as possible.
- type: markdown
attributes:
value: 'Feature requests will be converted to the GitHub Discussions "Ideas" section.'
- type: dropdown
id: project
attributes:
multiple: false
label: Which project is this feature idea for?
options:
- "@ducanh2912/next-pwa"
- "@ducanh2912/next-sw"
validations:
required: true
value: 'Feature requests will be converted to the GitHub Discussions "Ideas" section when suitable.'
- type: textarea
attributes:
label: Describe the feature you'd like to request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,9 @@ body:
- type: textarea
attributes:
label: Provide environment information
description: Please provide the version of `next` and `@ducanh2912/next-pwa`/`@ducanh2912/next-sw` that you are currently using.
description: Please provide the version of `next` and `@ducanh2912/next-pwa` that you are currently using.
validations:
required: true
- type: dropdown
id: project
attributes:
multiple: false
label: Whose documentation is this feedback for?
options:
- "@ducanh2912/next-pwa"
- "@ducanh2912/next-sw"
- type: textarea
attributes:
label: Describe the problem
Expand Down
7 changes: 2 additions & 5 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ coverage/
.DS_Store
*.pem

*.css
*.json

.vercel/

**/public/workbox**
Expand All @@ -56,5 +53,5 @@ coverage/
# other files
LICENSE
CODE_OF_CONDUCT.md
*.css
*.json

tsconfig.json
2 changes: 1 addition & 1 deletion README.md
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is the documentation for DuCanh's `next-pwa` and `next-sw`!
This is the documentation for DuCanh's PWA suite!

## Getting started

Expand Down
13 changes: 2 additions & 11 deletions docs/content/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,9 @@ type: Docs

# Welcome to DuCanh's PWA suite for Next.js!

## Variants
Take a look around:

- There are two different variants of this plugin:

- [`next-pwa`](/docs/next-pwa/getting-started)
- [`next-sw` (not stable)](/docs/next-sw)

## What's the difference between these two?

- `next-pwa` is a stable package, which makes use of Workbox to generate the service worker for you. Many available
configurations are inherited from it. This is the recommended option if you are not sure.
- `next-sw` is NOT stable, and is built from ground up. This one is more limited and lightweight.
- [`next-pwa`](/docs/next-pwa/getting-started)

## What's the plan for the future?

Expand Down
8 changes: 0 additions & 8 deletions docs/content/next-sw/index.mdx

This file was deleted.

14 changes: 7 additions & 7 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
},
"dependencies": {
"@ducanh2912/next-pwa": "workspace:*",
"@mantine/hooks": "7.1.2",
"@mantine/hooks": "7.1.3",
"@tabler/icons-react": "2.39.0",
"bright": "0.8.4",
"client-only": "0.0.1",
"contentlayer": "0.3.4",
"highlight.js": "11.9.0",
"next": "13.5.4",
"next": "13.5.5",
"next-contentlayer": "0.3.4",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand All @@ -27,11 +27,11 @@
"zustand": "4.4.3"
},
"devDependencies": {
"@types/extend": "3.0.2",
"@types/hast": "3.0.1",
"@types/mdast": "4.0.1",
"@types/extend": "3.0.3",
"@types/hast": "3.0.2",
"@types/mdast": "4.0.2",
"@types/mdx": "2.0.8",
"@types/node": "20.8.4",
"@types/node": "20.8.7",
"@types/react": "18.2.28",
"@types/react-dom": "18.2.13",
"@types/uuid": "9.0.5",
Expand All @@ -49,7 +49,7 @@
"rehype-highlight": "7.0.0",
"rehype-sanitize": "6.0.0",
"tailwindcss": "3.3.3",
"typescript": "5.3.0-dev.20231011",
"typescript": "5.3.0-dev.20231018",
"unified": "10.1.2",
"unist-util-is": "6.0.0",
"unist-util-visit": "5.0.0"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/utils/buildDocsTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { allDocs, type Docs } from "contentlayer/generated";
import { v4 as uuidv4 } from "uuid";

const treePriority: Record<string, string[]> = {
"/docs": ["next-pwa", "next-sw"],
"/docs": ["next-pwa"],
"/docs/next-pwa": [
"getting-started",
"configuring",
Expand Down
4 changes: 2 additions & 2 deletions examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
},
"dependencies": {
"@ducanh2912/next-pwa": "latest",
"next": "13.5.4",
"next": "13.5.5",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@types/node": "20.8.4",
"@types/node": "20.8.7",
"@types/react": "18.2.28",
"@types/react-dom": "18.2.13",
"typescript": "5.2.2"
Expand Down
8 changes: 4 additions & 4 deletions examples/custom-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
"@ducanh2912/next-pwa": "latest",
"@fastify/compress": "6.4.0",
"cross-env": "7.0.3",
"fastify": "4.24.0",
"next": "13.5.4",
"fastify": "4.24.2",
"next": "13.5.5",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@swc/core": "1.3.92",
"@types/node": "20.8.4",
"@swc/core": "1.3.93",
"@types/node": "20.8.7",
"@types/react": "18.2.28",
"@types/react-dom": "18.2.13",
"nodemon": "3.0.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/custom-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
},
"dependencies": {
"@ducanh2912/next-pwa": "latest",
"next": "13.5.4",
"next": "13.5.5",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@types/node": "20.8.4",
"@types/node": "20.8.7",
"@types/react": "18.2.28",
"@types/react-dom": "18.2.13",
"typescript": "5.2.2"
Expand Down
4 changes: 2 additions & 2 deletions examples/lifecycle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
},
"dependencies": {
"@ducanh2912/next-pwa": "latest",
"next": "13.5.4",
"next": "13.5.5",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@types/node": "20.8.4",
"@types/node": "20.8.7",
"@types/react": "18.2.28",
"@types/react-dom": "18.2.13",
"typescript": "5.2.2"
Expand Down
21 changes: 4 additions & 17 deletions examples/lifecycle/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -18,22 +14,13 @@
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"types": [
"@ducanh2912/next-pwa/workbox"
],
"types": ["@ducanh2912/next-pwa/workbox"],
"plugins": [
{
"name": "next"
}
]
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
6 changes: 3 additions & 3 deletions examples/next-i18next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"express": "4.18.2",
"fastify-compress": "4.1.0",
"i18next": "23.5.1",
"next": "13.5.4",
"next": "13.5.5",
"next-i18next": "14.0.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-i18next": "13.2.2"
"react-i18next": "13.3.0"
},
"devDependencies": {
"@types/node": "20.8.4",
"@types/node": "20.8.7",
"@types/react": "18.2.28",
"@types/react-dom": "18.2.13",
"typescript": "5.2.2"
Expand Down
4 changes: 2 additions & 2 deletions examples/next-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
},
"dependencies": {
"@ducanh2912/next-pwa": "latest",
"next": "13.5.4",
"next": "13.5.5",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@types/node": "20.8.4",
"@types/node": "20.8.7",
"@types/react": "18.2.28",
"@types/react-dom": "18.2.13",
"typescript": "5.2.2"
Expand Down
4 changes: 2 additions & 2 deletions examples/offline-fallback-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
},
"dependencies": {
"@ducanh2912/next-pwa": "latest",
"next": "13.5.4",
"next": "13.5.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"sharp": "0.32.6"
},
"devDependencies": {
"@types/node": "20.8.4",
"@types/node": "20.8.7",
"@types/react": "18.2.28",
"@types/react-dom": "18.2.13",
"typescript": "5.2.2"
Expand Down
4 changes: 2 additions & 2 deletions examples/web-push/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
},
"dependencies": {
"@ducanh2912/next-pwa": "latest",
"next": "13.5.4",
"next": "13.5.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"web-push": "3.6.6"
},
"devDependencies": {
"@types/node": "20.8.4",
"@types/node": "20.8.7",
"@types/react": "18.2.28",
"@types/react-dom": "18.2.13",
"@types/web-push": "3.6.1",
Expand Down
Loading