Skip to content

Commit

Permalink
Merge pull request #73 from vordgi/get-72
Browse files Browse the repository at this point in the history
get-72 release 1.4.0
  • Loading branch information
vordgi authored May 12, 2024
2 parents addc861 + d60a9cc commit 193c98c
Show file tree
Hide file tree
Showing 84 changed files with 339 additions and 1,256 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/auto-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,10 @@ jobs:
pnpm playwright install
pnpm build
pnpm test
working-directory: ./tests/nextjs-app

- name: Test package contexts
run: |
pnpm install next@canary
pnpm playwright install
pnpm build
pnpm test
working-directory: ./tests/server-contexts
working-directory: ./tests/base

- name: Set summary
run: |
NEXT_VERSION=$(node -p "require('next/package.json').version")
echo "$NEXT_VERSION" >> $GITHUB_STEP_SUMMARY
working-directory: ./tests/nextjs-app
working-directory: ./tests/base
10 changes: 1 addition & 9 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,7 @@ jobs:
pnpm playwright install
pnpm build
pnpm test
working-directory: ./tests/nextjs-app

- name: Test package contexts
run: |
pnpm add next@canary
pnpm playwright install
pnpm build
pnpm test
working-directory: ./tests/server-contexts
working-directory: ./tests/base

- name: Publish on main
if: "!contains(github.ref_name, 'canary')"
Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(Former [next-impl-getters](https://www.npmjs.com/package/next-impl-getters))

Implementation of server getters and server contexts in React Server Components without switching to SSR
Implementation of server getters in React Server Components without switching to SSR in next.js

Before using the library, read the [Possible Issues](https://nimpl.tech/getters/possible-issues)

Expand All @@ -23,21 +23,16 @@ yarn add @nimpl/getters
## Current Getters

* [get-pathname](https://nimpl.tech/getters/current-getters/get-pathname)
* [server-contexts](https://nimpl.tech/getters/current-getters/server-contexts)
* [get-page-config](https://nimpl.tech/getters/current-getters/get-page-config)
* [get-params](https://nimpl.tech/getters/current-getters/get-params)
* [get-search-params](https://nimpl.tech/getters/current-getters/get-search-params)
* [get-search-params](https://nimpl.tech/getters/current-getters/get-search-params) (*deprecated*)

## Stability

All getters are covered with tests. Tests are run on every release and every 6 hours on the latest **Canary** version of `Next.js`.

In this way, you can be sure not only of the stability of the code, but also that if there is a breaking change in `Next.js`, this will immediately become known. *Even before the release of a stable version of `Next.js`.*

## Examples

You can see examples in the [directory](https://github.com/vordgi/nimpl-getters/tree/main/examples) of the repository.

## Additional

Please consider giving a star if you like it, it will help promote the implementation in the eyes of the next.js team.
Expand Down
12 changes: 0 additions & 12 deletions examples/isomorphic-context/app/[locale]/page.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions examples/isomorphic-context/app/page.tsx

This file was deleted.

16 changes: 0 additions & 16 deletions examples/isomorphic-context/components/ClientBlock/index.tsx

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions examples/isomorphic-context/components/ServerNav/index.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions examples/isomorphic-context/package.json

This file was deleted.

15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "nimpl-getters",
"version": "1.0.0",
"description": "Implementation of server getters and server contexts in React Server Components without switching to SSR",
"description": "Implementation of server getters in React Server Components without switching to SSR",
"scripts": {
"nimpl:getters": "pnpm --filter @nimpl/getters",
"tests:nextjs-app": "pnpm --filter tests/nextjs-app",
"tests:server-contexts": "pnpm --filter tests/server-contexts",
"tests:base": "pnpm --filter tests-base",
"lint": "eslint \"package/\"",
"eslint": "eslint",
"prepare": "husky"
Expand All @@ -21,11 +20,11 @@
},
"devDependencies": {
"eslint": "8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"husky": "^9.0.11",
"prettier": "^3.2.5",
"typescript-eslint": "^7.6.0"
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"husky": "9.0.11",
"prettier": "3.2.5",
"typescript-eslint": "7.8.0"
},
"license": "MIC"
}
19 changes: 9 additions & 10 deletions package/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nimpl/getters",
"version": "1.3.4",
"description": "Implementation of server getters and server contexts in React Server Components without switching to SSR",
"version": "1.4.0",
"description": "Implementation of server getters in React Server Components without switching to SSR in next.js",
"files": [
"**/*.js",
"**/*.d.ts"
Expand All @@ -18,8 +18,7 @@
"getters",
"implementation",
"get-params",
"rsc",
"server context"
"rsc"
],
"repository": {
"type": "git",
Expand All @@ -32,12 +31,12 @@
},
"license": "MIT",
"devDependencies": {
"@types/node": "20.0.0",
"@types/react": "18.2.43",
"react": "18.2.0",
"react-dom": "18.2.0",
"next": "14.0.4",
"typescript": "5.3.2"
"@types/node": "20.12.11",
"@types/react": "18.3.2",
"react": "18.3.1",
"react-dom": "18.3.1",
"next": "14.2.3",
"typescript": "5.4.5"
},
"peerDependencies": {
"react": ">= 18.2.0",
Expand Down
35 changes: 0 additions & 35 deletions package/src/create-server-context.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions package/src/get-server-context.tsx

This file was deleted.

8 changes: 0 additions & 8 deletions package/src/types.ts

This file was deleted.

Loading

0 comments on commit 193c98c

Please sign in to comment.