From b5cceb8f4ea9f56ba78cb3080ca3711ff3b0b07f Mon Sep 17 00:00:00 2001 From: Lumi Pakkanen Date: Tue, 14 May 2024 19:05:41 +0300 Subject: [PATCH] Update moment-of-symmetry dependency Fixes swapped MOS steps in large scales. --- package-lock.json | 8 ++++---- package.json | 2 +- src/parser/__tests__/stdlib.spec.ts | 20 ++++++++++++++++++++ 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index e9698193..606cb29b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "license": "MIT", "dependencies": { - "moment-of-symmetry": "^0.5.2", + "moment-of-symmetry": "^0.5.3", "xen-dev-utils": "^0.7.0" }, "bin": { @@ -2888,9 +2888,9 @@ } }, "node_modules/moment-of-symmetry": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/moment-of-symmetry/-/moment-of-symmetry-0.5.2.tgz", - "integrity": "sha512-omlRHnafyz5ZUfGIy64ISkX2XZsoRq//lFvZ+96zVFVveHrCPrVSKVva4pLBHZeesQrIYxTe7A1Ij6fRQwtffg==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/moment-of-symmetry/-/moment-of-symmetry-0.5.3.tgz", + "integrity": "sha512-+CTxeGrJioy71uyYzNn7Kk5F73fqbSVIAXE69O+6/0sdNWxwgcVw7eCnjX5AHW4tJelhvHVeJyaAgP2CCLnzrg==", "dependencies": { "xen-dev-utils": "^0.7.0" }, diff --git a/package.json b/package.json index b5b6a27c..20bff5a2 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "vitest": "^1.4.0" }, "dependencies": { - "moment-of-symmetry": "^0.5.2", + "moment-of-symmetry": "^0.5.3", "xen-dev-utils": "^0.7.0" }, "engines": { diff --git a/src/parser/__tests__/stdlib.spec.ts b/src/parser/__tests__/stdlib.spec.ts index 50e6fddd..b9bf85ff 100644 --- a/src/parser/__tests__/stdlib.spec.ts +++ b/src/parser/__tests__/stdlib.spec.ts @@ -1492,4 +1492,24 @@ describe('SonicWeave standard library', () => { const range = expand('range(3, 0, -1)'); expect(range).toEqual(['3', '2', '1']); }); + + it('produces the correct 5L 8s scale', () => { + const scale = expand('mos(5, 8);stepString()'); + expect(scale).toEqual([ + '"LsLssLsLssLss"', + '2\\18', + '3\\18', + '5\\18', + '6\\18', + '7\\18', + '9\\18', + '10\\18', + '12\\18', + '13\\18', + '14\\18', + '16\\18', + '17\\18', + '18\\18', + ]); + }); });