Skip to content
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
60 changes: 60 additions & 0 deletions .github/workflows/npm-experimental.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish experimental package

on:
pull_request:
types: [opened, synchronize]

jobs:
publish-experimental:
runs-on: ubuntu-latest

if: |
github.event.pull_request.head.repo.full_name == github.repository &&
${{ github.head_ref != 'main' && !startsWith(github.head_ref, 'canary') }}

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "24"

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Install dependencies and build
run: |
pnpm install
pnpm run build
cp ../README.md .
cp ../LICENSE .
working-directory: ./package

- name: Test package general with webpack
run: |
pnpm up --latest
pnpm playwright install
pnpm build --webpack
pnpm test
working-directory: ./tests/base

- name: Test package general with turbopack
run: |
pnpm build --turbopack
pnpm test
working-directory: ./tests/base

- name: Compute experimental version
id: version
run: |
HASH=$(git rev-parse --short HEAD)
echo "version=0.0.0-experimental-${HASH}" >> $GITHUB_OUTPUT

- name: Publish experimental package
run: |
npm set //registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}
npm version --no-git-tag-version ${{steps.version.outputs.version}}
npm publish --tag experimental --access public
working-directory: ./package
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pnpm run lint
npx lint-staged
5 changes: 3 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import tseslint from "typescript-eslint";

const ignores = ["**/node_modules/**", "**/dist/**", "**/*.js", "**/*.d.ts"];
const ignores = ["**/node_modules/**", "**/dist/**", "**/.next/**"];

export default [
{
Expand All @@ -19,4 +19,5 @@ export default [
},
...tseslint.configs.recommended,
eslintPluginPrettierRecommended,
].map((r) => Object.assign(r, { ignores }));
{ ignores },
];
11 changes: 6 additions & 5 deletions examples/isomorphic-context/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{
"name": "isomorphic-context",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"@nimpl/context": "latest",
"next": "latest",
"react": "19.2.1",
"react-dom": "19.2.1"
"@nimpl/context": "workspace:*",
"next": "^16.1.1",
"react": "19.2.3",
"react-dom": "19.2.3"
},
"devDependencies": {
"@types/node": "24.10.1",
"@types/node": "25.0.3",
"@types/react": "19.2.7",
"typescript": "5.9.3"
}
Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
"scripts": {
"nimpl:context": "pnpm --filter @nimpl/context",
"tests:base": "pnpm --filter tests/base",
"lint": "eslint \"package/\"",
"lint": "eslint \".",
"eslint": "eslint",
"prepare": "husky"
},
"lint-staged": {
"*.{ts,tsx,js,jsx}": ["eslint"]
},
"repository": {
"type": "git",
"url": "git://github.com/alexdln/nimpl-context.git"
Expand All @@ -19,12 +22,15 @@
"url": "https://github.com/alexdln/"
},
"devDependencies": {
"eslint": "9.39.1",
"eslint": "9.39.2",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-prettier": "5.5.4",
"husky": "9.1.7",
"prettier": "3.7.4",
"typescript-eslint": "8.48.1"
"typescript-eslint": "8.51.0"
},
"resolutions": {
"isomorphic-context>@nimpl/context": "workspace:*"
},
"license": "MIT",
"packageManager": "pnpm@10.8.0+sha512.0e82714d1b5b43c74610193cb20734897c1d00de89d0e18420aebc5977fa13d780a9cb05734624e81ebd81cc876cd464794850641c48b9544326b5622ca29971"
Expand Down
12 changes: 6 additions & 6 deletions package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@
},
"license": "MIT",
"devDependencies": {
"@types/node": "24.10.1",
"@types/node": "25.0.3",
"@types/react": "19.2.7",
"react": "19.2.1",
"react-dom": "19.2.1",
"next": "16.0.7",
"next": "16.1.1",
"react": "19.2.3",
"react-dom": "19.2.3",
"typescript": "5.9.3"
},
"peerDependencies": {
"next": ">= 14.0.0",
"react": ">= 18.2.0",
"react-dom": ">= 18.2.0",
"next": ">= 14.0.0"
"react-dom": ">= 18.2.0"
}
}
Loading