]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add version to generate types packages
authorChocobozzz <me@florianbigard.com>
Tue, 28 Dec 2021 09:25:30 +0000 (10:25 +0100)
committerChocobozzz <me@florianbigard.com>
Tue, 28 Dec 2021 09:27:06 +0000 (10:27 +0100)
packages/types/generate-package.ts
scripts/ci.sh
server/tests/api/notifications/user-notifications.ts
support/doc/development/lib.md

index 0c14514e7fb3b76dabf303be21030657231f663c..853989d684f9783affdf851e7b7018aa4b763437 100644 (file)
@@ -4,6 +4,14 @@ import { copyFile, readJson, remove, writeFile, writeJSON } from 'fs-extra'
 import { resolve } from 'path'
 import { cwd } from 'process'
 
+if (!process.argv[2]) {
+  console.error('Need version as argument')
+  process.exit(-1)
+}
+
+const version = process.argv[2]
+console.log('Will generate package version %s.', version)
+
 run()
   .then(() => process.exit(0))
   .catch(err => {
@@ -52,7 +60,7 @@ async function run () {
       return dependencies
     }, {})
 
-  const { description, version, licence, engines, author, repository } = mainPackageJson
+  const { description, licence, engines, author, repository } = mainPackageJson
   const typesPackageJson = {
     name: '@peertube/peertube-types',
     description,
index 5b757d94b370a4142c09671480166cb149afc4a0..b0b76ca99e1b978f963ce3009b474b92d5271bfb 100755 (executable)
@@ -41,7 +41,7 @@ findTestFiles () {
 }
 
 if [ "$1" = "types-package" ]; then
-    npm run generate-types-package
+    npm run generate-types-package 0.0.0
     npm run tsc -- --noEmit --esModuleInterop packages/types/tests/test.ts
 elif [ "$1" = "client" ]; then
     npm run build
index bb3024617fa27e1e2fd037fe8fbcdd42d5b44a4c..0bd474c09df098ea90b5c5cac69ccf7796b61b5c 100644 (file)
@@ -125,7 +125,7 @@ describe('Test user notifications', function () {
     })
 
     it('Should not send a notification before the video is published', async function () {
-      this.timeout(50000)
+      this.timeout(150000)
 
       const updateAt = new Date(new Date().getTime() + 1000000)
 
index 0c77cff563126d474f22537aeaa3ce365842ba9a..c43edbacc717c07842373a89e1bffa6f2bbd537b 100644 (file)
@@ -17,8 +17,8 @@ Typescript definition files generation is controlled by the various `tsconfig.ty
 The complete types package is generated via:
 
 ```
-$ npm run generate-types-package
-$ cd types/dist
+$ npm run generate-types-package 4.x.x
+$ cd packages/types/dist
 $ npm publish --access=public
 ```