Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit 76cd13b

Browse files
authored
Merge pull request #385 from codeoverflow-org/feat/nodecg-io-0.3
feat: add support for nodecg-io 0.3
2 parents c210610 + c6de796 commit 76cd13b

File tree

4 files changed

+31
-7
lines changed

4 files changed

+31
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
fail-fast: false
3131
matrix:
3232
os: [ubuntu-latest, windows-2019]
33-
version: ["0.1", "0.2", "development"]
33+
version: ["0.1", "0.2", "0.3", "development"]
3434
node: [14, 18]
3535

3636
runs-on: ${{ matrix.os }}

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ This CLI follows and is versioned independently of the rest of nodecg-io like `n
5757

5858
The following table show which versions of the CLI are compatible with which nodecg-io versions:
5959

60-
| CLI versions | nodecg-io versions |
61-
| ------------ | ------------------ |
62-
| `0.1` | `0.1` |
63-
| `0.2-0.4` | `0.2`, `0.1` |
60+
| CLI versions | nodecg-io versions |
61+
| ------------ | ------------------- |
62+
| `0.1` | `0.1` |
63+
| `0.2-0.4` | `0.2`, `0.1` |
64+
| `0.5` | `0.3`, `0.2`, `0.1` |
6465

6566
## Developer workflow
6667

src/nodecgIOVersions.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,19 @@ const version02Services = {
6363
youtube: undefined,
6464
};
6565

66-
export const supportedNodeCGIORange = new semver.Range("<=0.2");
66+
const version03Services = {
67+
...version02Services,
68+
curseforge: undefined,
69+
opentts: "OpenTTSClient",
70+
"google-cast": "GoogleCastClient",
71+
};
72+
73+
export const supportedNodeCGIORange = new semver.Range("<=0.3");
6774

6875
export const versionServiceMap: Record<string, Record<string, string | undefined>> = {
6976
"0.1": version01Services,
7077
"0.2": version02Services,
78+
"0.3": version03Services,
7179
};
7280

7381
/**

test/generate/index.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,23 @@ describe("genPackageJson", () => {
131131
expect(deps["nodecg-types"]).toBe("^1.2.3");
132132
});
133133

134-
// TODO: seperate in 0.3 and dev once 0.3 has been released and added
135134
test("should use nodecg-types for 0.3 or higher/dev if NodeCG v1", async () => {
135+
const opts = {
136+
...defaultOpts,
137+
nodeCGVersion: new SemVer("1.9.0"),
138+
};
139+
const deps = (
140+
await genPackageJSON(opts, {
141+
...validProdInstall,
142+
version: "0.3",
143+
})
144+
)["dependencies"];
145+
146+
// These dependencies should always have the latest version which is fetched by the mocked getLatestPackageVersion
147+
expect(deps["nodecg-types"]).toBe("^1.2.3");
148+
});
149+
150+
test("should use nodecg-types for dev if NodeCG v1", async () => {
136151
const opts = {
137152
...defaultOpts,
138153
nodeCGVersion: new SemVer("1.9.0"),

0 commit comments

Comments
 (0)