From adcd3db0edeac452724236d99c09d53ce170c39a Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Thu, 27 Jun 2024 15:11:43 +0100 Subject: [PATCH] refactor: Move parsely into top-level packages directory Parsely was missed by fa7bec38547bb7fff29cd60e320f98d146754c13 because it got merged afterwards. --- package-lock.json | 8 ++++++++ packages/{phoenix/packages => }/parsely/exports.js | 0 packages/parsely/package.json | 8 ++++++++ packages/{phoenix/packages => }/parsely/parser.js | 0 .../{phoenix/packages => }/parsely/parsers/combinators.js | 0 .../{phoenix/packages => }/parsely/parsers/terminals.js | 0 packages/{phoenix/packages => }/parsely/streams.js | 0 .../phoenix/src/puter-shell/coreutils/concept-parser.js | 6 +++--- packages/phoenix/src/puter-shell/coreutils/sed/parser.js | 6 +++--- 9 files changed, 22 insertions(+), 6 deletions(-) rename packages/{phoenix/packages => }/parsely/exports.js (100%) create mode 100644 packages/parsely/package.json rename packages/{phoenix/packages => }/parsely/parser.js (100%) rename packages/{phoenix/packages => }/parsely/parsers/combinators.js (100%) rename packages/{phoenix/packages => }/parsely/parsers/terminals.js (100%) rename packages/{phoenix/packages => }/parsely/streams.js (100%) diff --git a/package-lock.json b/package-lock.json index 3a854864e..b73199274 100644 --- a/package-lock.json +++ b/package-lock.json @@ -707,6 +707,10 @@ "form-data": "^4.0.0" } }, + "node_modules/@heyputer/parsely": { + "resolved": "packages/parsely", + "link": true + }, "node_modules/@heyputer/phoenix": { "resolved": "packages/phoenix", "link": true @@ -12205,6 +12209,10 @@ } ] }, + "packages/parsely": { + "version": "1.0.0", + "license": "AGPL-3.0-only" + }, "packages/phoenix": { "name": "@heyputer/phoenix", "version": "0.0.0", diff --git a/packages/phoenix/packages/parsely/exports.js b/packages/parsely/exports.js similarity index 100% rename from packages/phoenix/packages/parsely/exports.js rename to packages/parsely/exports.js diff --git a/packages/parsely/package.json b/packages/parsely/package.json new file mode 100644 index 000000000..7ae60da35 --- /dev/null +++ b/packages/parsely/package.json @@ -0,0 +1,8 @@ +{ + "name": "@heyputer/parsely", + "version": "1.0.0", + "author": "Puter Technologies Inc.", + "license": "AGPL-3.0-only", + "main": "exports.js", + "type": "module" +} diff --git a/packages/phoenix/packages/parsely/parser.js b/packages/parsely/parser.js similarity index 100% rename from packages/phoenix/packages/parsely/parser.js rename to packages/parsely/parser.js diff --git a/packages/phoenix/packages/parsely/parsers/combinators.js b/packages/parsely/parsers/combinators.js similarity index 100% rename from packages/phoenix/packages/parsely/parsers/combinators.js rename to packages/parsely/parsers/combinators.js diff --git a/packages/phoenix/packages/parsely/parsers/terminals.js b/packages/parsely/parsers/terminals.js similarity index 100% rename from packages/phoenix/packages/parsely/parsers/terminals.js rename to packages/parsely/parsers/terminals.js diff --git a/packages/phoenix/packages/parsely/streams.js b/packages/parsely/streams.js similarity index 100% rename from packages/phoenix/packages/parsely/streams.js rename to packages/parsely/streams.js diff --git a/packages/phoenix/src/puter-shell/coreutils/concept-parser.js b/packages/phoenix/src/puter-shell/coreutils/concept-parser.js index 968c3928e..b17ab65fc 100644 --- a/packages/phoenix/src/puter-shell/coreutils/concept-parser.js +++ b/packages/phoenix/src/puter-shell/coreutils/concept-parser.js @@ -1,6 +1,6 @@ -import { GrammarContext, standard_parsers } from '../../../packages/parsely/exports.js'; -import { Parser, UNRECOGNIZED, VALUE } from '../../../packages/parsely/parser.js'; -import { StringStream } from '../../../packages/parsely/streams.js'; +import { GrammarContext, standard_parsers } from '@heyputer/parsely/exports.js'; +import { Parser, UNRECOGNIZED, VALUE } from '@heyputer/parsely/parser.js'; +import { StringStream } from '@heyputer/parsely/streams.js'; class NumberParser extends Parser { static data = { diff --git a/packages/phoenix/src/puter-shell/coreutils/sed/parser.js b/packages/phoenix/src/puter-shell/coreutils/sed/parser.js index b1baf5d79..3d7428223 100644 --- a/packages/phoenix/src/puter-shell/coreutils/sed/parser.js +++ b/packages/phoenix/src/puter-shell/coreutils/sed/parser.js @@ -39,9 +39,9 @@ import { ZapCommand, } from './command.js'; import { Script } from './script.js'; -import { GrammarContext, standard_parsers } from '../../../../packages/parsely/exports.js'; -import { StringStream } from '../../../../packages/parsely/streams.js'; -import { INVALID, Parser, UNRECOGNIZED, VALUE } from '../../../../packages/parsely/parser.js'; +import { GrammarContext, standard_parsers } from '@heyputer/parsely/exports.js'; +import { StringStream } from '@heyputer/parsely/streams.js'; +import { Parser, UNRECOGNIZED, VALUE } from '@heyputer/parsely/parser.js'; /** * A slight hack: Parsely doesn't yet have an equivalent of backreferences.