Re: [Pkg-javascript-devel] [RFS] node-prosemirror-commands

2020-12-21 Thread Abraham Raji
Hey Everyone,

Jonas thanks for the feedback. What you're saying makes total sense and
I'll continue to try and fix the tests.

Nilesh I'm short on resources too at the moment. Ever since my main machine
was damaged I'm working on a 10 year old machine with 2 GB ram but I'll
make it work somehow. I should get my main machine back in a usable
condition tomorrow or day after tomorrow. I really appreciate your help.
I'll look more into this and report back here.

Again thanks everyone.

Regards,
Abraham Raji

2020 ഓഗ 23, ഞായർ 6:27 PM-ന് Abraham Raji  എഴുതി:

> Hi,
>
> I have packaged node-prosemirror-commands. The updated package built
> successfully. Request for review and sponsorship.
>
> 
> https://salsa.debian.org/avron/node-prosemirror-commands.
>
> Regards,
> Abraham Raji
>
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] [RFS] node-prosemirror-commands

2020-12-20 Thread Nilesh Patra
On Sun, 20 Dec 2020 at 21:32, Abraham Raji  wrote:

> Hey Everyone,
>
> I've made all the changes suggested by the team in the previous mails
> except enabling tests. I ran the tests with the dependencies from npm
> registry and they ran just fine. So it should be a dependency issue. Is it
> possible to upload the package without the tests for now?
>
> https://salsa.debian.org/avron/node-prosemirror-commands/
>

I tried enabling tests but it seems to need HUGE amounts of heap memory
somehow, and due to insufficient RAM at my end, it crashes :/
If you have some resources, maybe you could give it a try? (Patch below) I
wonder if there is a memory leak somewhere, since the tests seemingly do
not looks so intensive.

diff --git a/debian/control b/debian/control
index af2ee7b..8b8b322 100644
--- a/debian/control
+++ b/debian/control
@@ -12,6 +12,8 @@ Build-Depends:
  , node-rollup-plugin-buble
  , node-prosemirror-transform (>= 1.0.0)
  , node-prosemirror-state (>= 1.0.0)
+ , node-mocha
+ , node-prosemirror-test-builder
 Standards-Version: 4.5.1
 Homepage: https://github.com/prosemirror/prosemirror-commands#readme
 Vcs-Git: https://salsa.debian.org/js-team/node-prosemirror-commands.git
diff --git a/debian/patches/0002-do-not-use-ist.patch
b/debian/patches/0002-do-not-use-ist.patch
new file mode 100644
index 000..024c7ec
--- /dev/null
+++ b/debian/patches/0002-do-not-use-ist.patch
@@ -0,0 +1,39 @@
+--- a/test/test-commands.js
 b/test/test-commands.js
+@@ -1,7 +1,7 @@
+ const {Schema} = require("prosemirror-model")
+ const {EditorState, Selection, TextSelection, NodeSelection} =
require("prosemirror-state")
+ const {schema, eq, doc, blockquote, pre, h1, p, li, ol, ul, em, strong,
hr, img} = require("prosemirror-test-builder")
+-const ist = require("ist")
++const assert = require('assert')
+
+ const {joinBackward, selectNodeBackward, joinForward, selectNodeForward,
deleteSelection, joinUp, joinDown, lift,
+wrapIn, splitBlock, splitBlockKeepMarks, liftEmptyBlock,
createParagraphNear, setBlockType,
+@@ -24,8 +24,8 @@
+ function apply(doc, command, result) {
+   let state = mkState(doc)
+   command(state, tr => state = state.apply(tr))
+-  ist(state.doc, result || doc, eq)
+-  if (result && result.tag.a != null) ist(state.selection,
 selFor(result), eq)
++  assert.equal(state.doc, result || doc)
++  if (result && result.tag.a != null) assert.equal(state.selection,
 selFor(result))
+ }
+
+ describe("joinBackward", () => {
+@@ -339,14 +339,14 @@
+   it("keeps marks when used after marked text", () => {
+ let state = mkState(doc(p(strong("foo"), "bar")))
+ splitBlockKeepMarks(state, tr => state = state.apply(tr))
+-ist(state.storedMarks.length, 1)
++assert.equal(state.storedMarks.length, 1)
+   })
+
+   it("preserves the stored marks", () => {
+ let state = mkState(doc(p(em("foo"
+ toggleMark(schema.marks.strong)(state, tr => state = state.apply(tr))
+ splitBlockKeepMarks(state, tr => state = state.apply(tr))
+-ist(state.storedMarks.length, 2)
++assert.equal(state.storedMarks.length, 2)
+   })
+ })
+
diff --git a/debian/patches/series b/debian/patches/series
index 7f0ff15..7f1e189 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 001_rollup-plugin-buble.patch
+0002-do-not-use-ist.patch
diff --git a/debian/tests/pkg-js/test b/debian/tests/pkg-js/test
new file mode 100644
index 000..dd9f788
--- /dev/null
+++ b/debian/tests/pkg-js/test
@@ -0,0 +1,2 @@
+export NODE_OPTIONS=--max_old_space_size=6000
+mocha -R spec test/test-*.js
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] [RFS] node-prosemirror-commands

2020-12-20 Thread Jonas Smedegaard
Hi Abraham,

Quoting Xavier (2020-08-24 10:36:09)
> did you try to enable upstream test (`mocha test/test-*.js`) ?

Quoting Abraham Raji (2020-12-20 16:36:11)
> I've made all the changes suggested by the team in the previous mails
> except enabling tests. I ran the tests with the dependencies from npm
> registry and they ran just fine. So it should be a dependency issue.

When you write "it should be a dependency issue" is seems the tests do 
fail with the package.  How does it fail?  What is the error message?


> Is it possible to upload the package without the tests for now?

Possible, yes, but not wise.

If the package fails its testsuite when packaged in Debian, then we 
cannot be sure that the package works when packaged in Debian.

And even if it works today, then we will easily miss if it stops working 
due to changes in some of its dependencies.

As a rule¹ of thumb, packages that fail their testsuite (or has no 
testsuite) should be targeted experimental.


 - Jonas


¹ I break that rule myself sometimes, and am then responsible for being 
extra attentive and fix any problems it might cause later on.  
Especially when you are new to packaging, I strongly recommend that you 
do *not* break the rule, because you rely on others to help you and 
therefore *cannot* fix it on your own if things go wrong later.

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] [RFS] node-prosemirror-commands

2020-12-20 Thread Abraham Raji
Hey Everyone,

I've made all the changes suggested by the team in the previous mails
except enabling tests. I ran the tests with the dependencies from npm
registry and they ran just fine. So it should be a dependency issue. Is it
possible to upload the package without the tests for now?

https://salsa.debian.org/avron/node-prosemirror-commands/

Regards,
Abraham Raji


2020 ഓഗ 23, ഞായർ 6:27 PM-ന് Abraham Raji  എഴുതി:

> Hi,
>
> I have packaged node-prosemirror-commands. The updated package built
> successfully. Request for review and sponsorship.
>
> 
> https://salsa.debian.org/avron/node-prosemirror-commands.
>
> Regards,
> Abraham Raji
>
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] [RFS] node-prosemirror-commands

2020-08-26 Thread Abraham Raji
Thanks Nilesh!

Will try this.

Regards,
Abraham Raji

2020 ഓഗ 23, ഞായർ 6:27 PM-ന് Abraham Raji  എഴുതി:

> Hi,
>
> I have packaged node-prosemirror-commands. The updated package built
> successfully. Request for review and sponsorship.
>
> 
> https://salsa.debian.org/avron/node-prosemirror-commands.
>
> Regards,
> Abraham Raji
>
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] [RFS] node-prosemirror-commands

2020-08-26 Thread Nilesh Patra
Hi,

On Wed, 26 Aug 2020 at 19:50, Abraham Raji  wrote:

> Hey,
>
> Could you give me an example of this implemented in a Debian package (link
> to a repository/commit)? That would really help me. Thanks
>

For test part: this[1] is how it is to be done and this[2] is the command
you probably should use for testing.
For d/install part: If you want to change the stuff that pkg-js-tools
installs, write those entries in debian/nodejs/files, like this[3].
Do note that [1]  and [3] are merely examples for you and would change
according to your package.

You might as well like to give a quick read to pkg-js-tools docs[4].

[1]:
https://salsa.debian.org/js-team/node-strip-ansi/-/blob/master/debian/tests/pkg-js/test
[2]:
https://salsa.debian.org/avron/node-prosemirror-commands/-/blob/master/package.json#L32
[3]:
https://salsa.debian.org/js-team/node-mime/-/blob/master/debian/nodejs/files
[4]:
https://salsa.debian.org/js-team/pkg-js-tools/-/blob/master/doc/tools/README.md#readme

Kind regards
Nilesh
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] [RFS] node-prosemirror-commands

2020-08-26 Thread Abraham Raji
Hey,

Could you give me an example of this implemented in a Debian package (link
to a repository/commit)? That would really help me. Thanks.

Regards,
Abraham Raji

2020 ഓഗ 23, ഞായർ 6:27 PM-ന് Abraham Raji  എഴുതി:

> Hi,
>
> I have packaged node-prosemirror-commands. The updated package built
> successfully. Request for review and sponsorship.
>
> 
> https://salsa.debian.org/avron/node-prosemirror-commands.
>
> Regards,
> Abraham Raji
>
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] [RFS] node-prosemirror-commands

2020-08-24 Thread Xavier
Le 24/08/2020 à 10:36, Xavier a écrit :
> Le 23/08/2020 à 14:57, Abraham Raji a écrit :
>> Hi,
>>
>> I have packaged node-prosemirror-commands. The updated package built
>> successfully. Request for review and sponsorship.
>>
>> 
>> https://salsa.debian.org/avron/node-prosemirror-commands.
>>
>> Regards,
>> Abraham Raji
> 
> Hi,
> 
> did you try to enable upstream test (`mocha test/test-*.js`) ?

Also remove debian/install file (use debian/nodejs/files if you need to
change installed files)

-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] [RFS] node-prosemirror-commands

2020-08-24 Thread Xavier
Le 23/08/2020 à 14:57, Abraham Raji a écrit :
> Hi,
> 
> I have packaged node-prosemirror-commands. The updated package built
> successfully. Request for review and sponsorship.
> 
> 
> https://salsa.debian.org/avron/node-prosemirror-commands.
> 
> Regards,
> Abraham Raji

Hi,

did you try to enable upstream test (`mocha test/test-*.js`) ?

Cheers,
Xavier

-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

[Pkg-javascript-devel] [RFS] node-prosemirror-commands

2020-08-23 Thread Abraham Raji
Hi,

I have packaged node-prosemirror-commands. The updated package built
successfully. Request for review and sponsorship.


https://salsa.debian.org/avron/node-prosemirror-commands.

Regards,
Abraham Raji
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel