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

fix for ts bug #204

Merged
merged 4 commits into from
Feb 2, 2025
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
5 changes: 5 additions & 0 deletions .changeset/chilly-lizards-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@dmno/configraph": patch
---

fix type bug in configraph
10 changes: 6 additions & 4 deletions .github/workflows/release-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ jobs:
# but we need more history to be able to compare to main
# TODO: ideally we would just fetch the history between origin/main and the current commit
fetch-depth: 0
- name: Enable Corepack
run: corepack enable
- name: Use Node.js 20.x
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: "20.x"
node-version: "22.x"
cache: 'pnpm'
- name: Install node deps
run: pnpm i
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable
- name: Use Node.js 20.x
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: "20.x"
node-version: "22.x"
cache: 'pnpm'
- name: Install node deps
run: pnpm i
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
node-version: [22.x]
package-manager: ['npm', 'pnpm', 'yarn']

steps:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.11.1
22.13.1
2 changes: 1 addition & 1 deletion example-repo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"author": "",
"license": "MIT",
"packageManager": "pnpm@9.14.2",
"packageManager": "pnpm@9.15.4",
"scripts": {
"dmno:dev": "dmno dev"
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"typescript": "catalog:"
},
"engines": {
"node": "^20.3.0 || >=21.0.0",
"node": ">=22.0",
"pnpm": ">=9"
},
"packageManager": "pnpm@9.14.2"
"packageManager": "pnpm@9.15.4"
}
6 changes: 3 additions & 3 deletions packages/configraph/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function cleanGitUrl(repoUrl: string, directoryPath?: string) {

export abstract class ConfigraphPlugin<
NodeMetadata = unknown,
EntityClass extends ConfigraphEntity = ConfigraphEntity,
EC extends ConfigraphEntity = ConfigraphEntity,
> {
/** name of the plugin itself - which is the name of the class */
pluginType = this.constructor.name;
Expand All @@ -45,7 +45,7 @@ EntityClass extends ConfigraphEntity = ConfigraphEntity,

readonly inputSchema: PluginInputSchema<NodeMetadata>;

internalEntity?: EntityClass;
internalEntity?: EC;
constructor(
readonly instanceId: string,
readonly opts: {
Expand All @@ -69,7 +69,7 @@ EntityClass extends ConfigraphEntity = ConfigraphEntity,
static packageMetadata?: PluginPackageMetadata;

// @ts-ignore
EntityClass: (new (...args: Array<any>) => N) = ConfigraphEntity;
EntityClass: (new (...args: Array<any>) => EC) = ConfigraphEntity;

initInternalEntity(graphRoot: Configraph<any, any>, parentEntityId: string) {
this.internalEntity = new this.EntityClass(graphRoot, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import TabbedCode from '@/components/TabbedCode.astro';
## Current requirements

DMNO Config requires either of the following:
- `node` (>20.x) + either `pnpm`, `npm`, or `yarn`
- `node` (>22.x) + either `pnpm`, `npm`, or `yarn`
- `bun`

:::tip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ We aim to make your config the bedrock of your stack, which will vastly improve

DMNO Config requires the following:

- Node.js LTS (currently v20.x)
- Node.js LTS (currently v22.x)
- One of the following package managers:
- `pnpm`
- `npm`
Expand Down