diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6ae1ecf..a0fbc03 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -61,11 +61,6 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - - name: Install pkl - uses: pkl-community/setup-pkl@v0 - with: - pkl-version: ${{ matrix.pklVersion }} - - run: npm install - run: npm run test:e2e timeout-minutes: 3 diff --git a/README.md b/README.md index 05e6fab..4e345c7 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,10 @@ Until then, minor and patch releases may contain breaking changes. ## Appendix +### Pkl Binary Version + +This package has a peer dependency on `@pkl-community/pkl`, to ensure a Pkl binary is installed. You can use an alternative Pkl binary (for either the evaluator or codegen) by setting the environment variable `PKL_EXEC` with the path to a Pkl binary. + ### Type Mappings When code-generating TypeScript type definitions from Pkl schemas, each Pkl type is converted to an associated TypeScript type, as per the table below. While in pre-release, these mappings are subject to change! diff --git a/package-lock.json b/package-lock.json index 6e5b98c..c06bc1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "msgpackr": "^1.10.1" }, "bin": { - "pkl-gen-typescript": "bin/pkl-gen-typescript.ts" + "pkl-gen-typescript": "dist/bin/pkl-gen-typescript.js" }, "devDependencies": { "@jest/globals": "^29.7.0", @@ -27,6 +27,9 @@ "ts-jest": "^29.1.2", "tsx": "^4.7.1", "typescript": "^4.9.4" + }, + "peerDependencies": { + "@pkl-community/pkl": "*" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -1713,6 +1716,73 @@ "node": ">= 8" } }, + "node_modules/@pkl-community/pkl": { + "version": "0.25.1-2", + "resolved": "https://registry.npmjs.org/@pkl-community/pkl/-/pkl-0.25.1-2.tgz", + "integrity": "sha512-WVxoTTp8vZuCdEoYeDY8Yiuj2etKBxDioMPFqF04g7SvKq7bPR5bT0GUGJGUvQpiGGG4+FfgHESsRYflo3AX+g==", + "peer": true, + "bin": { + "pkl": "lib/main.js" + }, + "optionalDependencies": { + "@pkl-community/pkl-darwin-arm64": "0.25.1-2", + "@pkl-community/pkl-darwin-x64": "0.25.1-2", + "@pkl-community/pkl-linux-arm64": "0.25.1-2", + "@pkl-community/pkl-linux-x64": "0.25.1-2" + } + }, + "node_modules/@pkl-community/pkl-darwin-arm64": { + "version": "0.25.1-2", + "resolved": "https://registry.npmjs.org/@pkl-community/pkl-darwin-arm64/-/pkl-darwin-arm64-0.25.1-2.tgz", + "integrity": "sha512-7yABD7X2WkWUqakv5aH58EUDz9CMHcukO2/Mq7y/QNwr5zRLMmBy+l/cL0sOgr3aS6YipoaDKsxC5AmjjgowTg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "peer": true + }, + "node_modules/@pkl-community/pkl-darwin-x64": { + "version": "0.25.1-2", + "resolved": "https://registry.npmjs.org/@pkl-community/pkl-darwin-x64/-/pkl-darwin-x64-0.25.1-2.tgz", + "integrity": "sha512-iFBYLiiPjcelfPPlaer36IPTQbdQhsmrOLY9judwVhmoxipprL82ZoJMDkM4PUQ9PjMPjYuYzb2F/cmzHnx2Yg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "peer": true + }, + "node_modules/@pkl-community/pkl-linux-arm64": { + "version": "0.25.1-2", + "resolved": "https://registry.npmjs.org/@pkl-community/pkl-linux-arm64/-/pkl-linux-arm64-0.25.1-2.tgz", + "integrity": "sha512-qwCHglXM3SJz4IWt+NpeqXtAVY7d5QxXMOpv97ia0+HFKdno7e2M4AksBj/5L0hbhlSP5KfGtQD1vMV2RdmOKA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@pkl-community/pkl-linux-x64": { + "version": "0.25.1-2", + "resolved": "https://registry.npmjs.org/@pkl-community/pkl-linux-x64/-/pkl-linux-x64-0.25.1-2.tgz", + "integrity": "sha512-5JRzgrQxuSY0RRHIeHZGCfKySnNzyQciLLjLzFxUseAZpVusuRTnbQAEnij1pUd5PYlfr05s0OWiIZLJJbnLBg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", diff --git a/package.json b/package.json index bb58146..f55ef8c 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,9 @@ "consola": "^3.2.3", "msgpackr": "^1.10.1" }, + "peerDependencies": { + "@pkl-community/pkl": "*" + }, "bin": { "pkl-gen-typescript": "./dist/bin/pkl-gen-typescript.js" }