Skip to content

Commit

Permalink
chore: fix publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge committed Jan 12, 2024
1 parent 772c64f commit 25f2095
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .changeset/twenty-rice-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@t3-oss/env-nextjs": patch
"@t3-oss/env-core": patch
"@t3-oss/env-nuxt": patch
---

fix: add a prepack to remove worksapce protocol
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const config = {
"**/node_modules/**",
".eslintrc.cjs",
"**/config.*",
"replace-workspace-protocol.ts",
],
};

Expand Down
7 changes: 4 additions & 3 deletions packages/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@t3-oss/env-nextjs",
"version": "0.7.2",
"version": "0.7.3-manual.3",
"type": "module",
"keywords": [
"create-t3-app",
Expand Down Expand Up @@ -37,10 +37,11 @@
"build": "rm -rf dist && bunchee",
"dev": "bunchee -w",
"lint": "eslint . --ext .ts",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --noEmit",
"prepack": "bun ../../replace-workspace-protocol.js"
},
"dependencies": {
"@t3-oss/env-core": "workspace:*"
"@t3-oss/env-core": "0.7.2"
},
"peerDependencies": {
"typescript": ">=4.7.2",
Expand Down
18 changes: 18 additions & 0 deletions replace-workspace-protocol.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/// <reference types="bun-types" />

declare module "bun" {
interface BunFile {
json(): Promise<any>;
}
}

/**
* Hack to replace the workspace protocol with the actual version
*/

const corePkg = await Bun.file("../core/package.json").json();
const version = corePkg.version;

const workspacePkg = await Bun.file("package.json").json();
workspacePkg.dependencies["@t3-oss/env-core"] = version;
await Bun.write("package.json", JSON.stringify(workspacePkg, null, 2));
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"useDefineForClassFields": true
}
},
"include": ["*.ts"]
}

2 comments on commit 25f2095

@vercel
Copy link

@vercel vercel bot commented on 25f2095 Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

t3-env – ./docs

t3-env-t3-oss.vercel.app
t3-env-git-main-t3-oss.vercel.app
env.t3.gg
env.t3.wtf
t3-env.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 25f2095 Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

t3-env-nextjs – ./examples/nextjs

t3-env-nextjs-git-main-t3-oss.vercel.app
t3-env-nextjs-t3-oss.vercel.app
t3-env-nextjs.vercel.app

Please sign in to comment.