Skip to content

Commit

Permalink
fix: Parse manifest with TOML.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Nov 5, 2023
1 parent 93c89b6 commit 7280b0a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import path from 'node:path';
import * as core from '@actions/core';
import * as exec from '@actions/exec';
import * as tc from '@actions/tool-cache';
import TOML from '@ltd/j-toml';

interface BuildInfo {
packageName: string;
Expand Down Expand Up @@ -90,7 +91,7 @@ async function findBuildablePackages() {

core.debug(`Found ${pkg.name}, loading manifest ${pkg.manifest_path}, checking targets`);

const manifest = JSON.parse(
const manifest = TOML.parse(
await fs.promises.readFile(pkg.manifest_path, 'utf8'),
) as Manifest;

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moonrepo/build-proto-plugin",
"version": "0.0.2",
"version": "0.0.3",
"description": "A GitHub action to build, optimize, and prepare a proto WASM plugin for release.",
"main": "dist/index.js",
"scripts": {
Expand All @@ -21,7 +21,8 @@
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1",
"@actions/tool-cache": "^2.0.1"
"@actions/tool-cache": "^2.0.1",
"@ltd/j-toml": "^1.38.0"
},
"devDependencies": {
"@types/node": "^20.7.1",
Expand Down
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7280b0a

Please sign in to comment.