Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate dc-node into this repository #3283

Merged
merged 4 commits into from
May 13, 2022
Merged

Conversation

missytake
Copy link
Contributor

@missytake missytake commented May 2, 2022

Hopefully this makes some things easier.

After this is merged, we still need to:

  • create a tag before the old repository is archived

#skip-changelog

@missytake missytake force-pushed the integrate-node-into-repo branch 2 times, most recently from 8287bf5 to eedc3e7 Compare May 3, 2022 11:59
@hpk42
Copy link
Contributor

hpk42 commented May 3, 2022

for now let's see this as experimental and "trying out" things. It's not certain it makes sense in the end but it's good to know if it's relatively easy or rather involved to make it work.

@missytake
Copy link
Contributor Author

I would say it's relatively easy, as in "pretty much done". It works so far and all the CI is successfully migrated. The npm release flow is still a bit unclear to me, but apart from that I mostly consider it done. Just need to throw away some garbage (like the license :P and some git files) and then we could just pull, merge it, and archive the old repository.

@Simon-Laux
Copy link
Member

what about the node release on tag? do you want to auto upload it to npm (npm publish, probably needs somekind of login ENV or token)

@missytake
Copy link
Contributor Author

actually, let's keep the license. The python subdirectory also has its own license, I think it's necessary for the published build.

@missytake
Copy link
Contributor Author

what about the node release on tag? do you want to auto upload it to npm (npm publish, probably needs somekind of login ENV or token)

yeah, let's do this. There is this github action we can use: https://github.com/marketplace/actions/npm-publish

I don't have an npm account, can you just add an access token to the github secrets? (do we want to give release rights to the CI / everyone in the deltachat github organization??)

@missytake missytake force-pushed the integrate-node-into-repo branch from 4ed2115 to fc7d427 Compare May 4, 2022 12:40
@missytake
Copy link
Contributor Author

https://github.com/deltachat/deltachat-core-rust/runs/6305997093?check_suite_focus=true confirms that the npm run test failure on windows is only about CLRF vs LF.

I excluded the lint checks from the Windows CI for now. The lint checks are run only on ubuntu & macOS now, that should still suffice. The normal tests are of course run on Windows, too. (developers who work with Windows can still do npm run lint-fix if the code doesn't look pretty on their machines.)

.github/workflows/node-package.yml Outdated Show resolved Hide resolved
node/README.md Outdated Show resolved Hide resolved
@missytake missytake force-pushed the integrate-node-into-repo branch from 67be6c3 to 490b638 Compare May 8, 2022 20:26
@missytake
Copy link
Contributor Author

Hm, the github actions work now, but a npm i https://download.delta.chat/node/preview/deltachat-node-3283.tar.gz still throws an error - any ideas which path is wrong?

npm WARN deprecated @types/error-stack-parser@2.0.0: This is a stub types definition for error-stack-parser (https://github.com/stacktracejs/error-stack-parser). error-stack-parser provides its own type definitions, so you don't need @types/error-stack-parser installed!
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated uuid@3.3.3: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /home/user/git/deltachat-desktop/node_modules/deltachat-node
npm ERR! command failed
npm ERR! command sh -c node node/scripts/install.js
npm ERR! node:internal/modules/cjs/loader:936
npm ERR!   throw err;
npm ERR!   ^
npm ERR! 
npm ERR! Error: Cannot find module '/home/user/git/deltachat-desktop/node_modules/deltachat-node/node/scripts/install.js'
npm ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:778:27)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
npm ERR!     at node:internal/main/run_main_module:17:47 {
npm ERR!   code: 'MODULE_NOT_FOUND',
npm ERR!   requireStack: []
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2022-05-09T10_06_58_391Z-debug.log

@missytake
Copy link
Contributor Author

It seems like node/scripts is not packaged into the tar.gz o.0 but it isn't in .npmignore...

@missytake
Copy link
Contributor Author

missytake commented May 9, 2022

@missytake missytake changed the title WIP: Integrate dc-node into this repository Integrate dc-node into this repository May 9, 2022
@missytake missytake requested a review from Simon-Laux May 9, 2022 11:08
missytake added 3 commits May 10, 2022 19:15
adjust scripts to new location of deltachat-core-rust
adjust dc-node readme to repo change
mention old repository
migrate github actions, try out if they work
fix path to node docs in SSH github action
passing mailadm token to node tests
hopefully fixing the download paths for the artifacts
fixing download paths, this time for real
post upload link to details
fix scp command
forgot to remove platform_status dict
fixing paths in the github action
add github action to delete node preview builds when PR is closed
move environment variable to yaml
remove git trash
github action to release to npm
use different action which also works with branches for testing
we don't want to publish to NPM through the CI
see what lint issues windows has
don't ignore core sourcefiles,
prevented npm installation on architectures with no prebuild
don't run lint checks on windows
github actions don't like double quotes apparently
minimize node.js CI
update ubuntu runner to 22.04
README: update link to node bindings source
simplify link in readme
node: fix crash with invalid account id
(throw error when getContext failed)
fix typo in readme
remove node specific changelog
change prebuild machine back to ubuntu 18.04
move package.json to root level to include rust source in npm package
change path in m1 patch
github action to upload to download.delta.chat/node/ on tag
try build with ubuntu 20.04
Update node/README.md
try building it with newer ubuntu because it wants glibc 2.33
fix path for prebuildify script
throw error when instanciating a wrapper class on `null`
(Context, Message, Chat, ChatList and so on)
try fix selecting the right cache
to fix the strange glibc bug
also revert back ubuntu version to 18.04
also bump package.json version with release script
fix paths since we moved around package.json
github action: fix path
document npm release - it's so much easier now!
there are no PR checks to post to if this action is executed on a tag
github action: fix artifact names
fix paths? wtf do I know, it's 3AM and I'm drunk
fix syntax error
don't upload preview if action is run on tag
is the tag ID an empty string or null?
node-package github action is done so far
also include scripts in package
only publish docs on push to master branch
actually bump package.json version in set_core_version script
prettify package.json
fix test - we don't really need to assert that
remove unnecessary ls statement from github action
@missytake missytake force-pushed the integrate-node-into-repo branch from 6568979 to 1872112 Compare May 10, 2022 17:23
@Simon-Laux Simon-Laux merged commit c9beaa2 into master May 13, 2022
@Simon-Laux Simon-Laux deleted the integrate-node-into-repo branch May 13, 2022 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants