@stordata/vsphere-soapify 0.0.29 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.gitlab-ci.yml CHANGED
@@ -1,7 +1,8 @@
1
- image: docker.stordata.fr/stordata/docker-node:18
1
+ image: docker.stordata.fr/stordata/docker-node:20
2
2
 
3
3
  stages:
4
4
  - test
5
+ - release
5
6
 
6
7
  include:
7
8
  - template: Jobs/SAST.gitlab-ci.yml
@@ -16,4 +17,16 @@ test:
16
17
  - docker
17
18
  script:
18
19
  - npm ci
19
- - grunt
20
+ - npm run lint
21
+ - npm test
22
+
23
+ release:
24
+ stage: release
25
+ tags:
26
+ - docker
27
+ script:
28
+ - npm -registry=https://registry.npmjs.org whoami
29
+ - npm -registry=https://registry.npmjs.org publish
30
+ - git checkout .
31
+ rules:
32
+ - if: $CI_COMMIT_TAG
package/.mocharc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "timeout": 5000,
3
+ "recursive": true,
4
+ "require": [
5
+ "lib/env.test.js"
6
+ ]
7
+ }
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 18.12.1
1
+ 20.9.0
package/README.md CHANGED
@@ -58,12 +58,30 @@ client
58
58
 
59
59
  ## Releasing
60
60
 
61
- This library is released on NPM. To release a new version run `grunt release`
62
- Beware that you need to be logged in on NPM and have write access to the Stordata organization.
61
+ This library is released on NPM. To release a new version:
63
62
 
64
- Login npm cmd line
63
+ * Be on `master` branch and fully rebased
64
+ * Tag the version to release
65
65
 
66
- Run `npm --registry=https://registry.npmjs.org login` then enter your credentials.
66
+ ```bash
67
+ git tag v$(jq -r .version package.json)
68
+ ```
69
+
70
+ * Increment version number in [package.json](package.json)
71
+ * Persist changes in lockfile
72
+
73
+ ```bash
74
+ npm i
75
+ ```
67
76
 
68
- Finally to ensure your connection `npm --registry=https://registry.npmjs.org whoami` and you should see your username.
77
+ * Commit your changes
69
78
 
79
+ ```bash
80
+ git commit -am"[ci skip] Bumped version to $(jq -r .version package.json)"
81
+ ```
82
+
83
+ * Push everything
84
+
85
+ ```bash
86
+ git push $(git config branch.master.remote) master --tags
87
+ ```
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ process.env.NODE_ENV = 'tests';
4
+ process.env.TZ = 'UTC';
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@stordata/vsphere-soapify",
3
- "version": "0.0.29",
3
+ "version": "0.0.35",
4
4
  "description": "A NodeJS abstraction layer for the vSphere SOAP API",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
7
+ "test": "npx mocha lib/all.spec.js 'lib/**/*.spec.js'",
8
+ "lint": "npx eslint index.js lib/**/*.js"
8
9
  },
9
10
  "repository": {
10
11
  "type": "git",
@@ -19,7 +20,7 @@
19
20
  "author": "Stordata <teamdenbas@stordata.fr>",
20
21
  "license": "UNLICENCED",
21
22
  "engines": {
22
- "node": ">= 18"
23
+ "node": ">= 20"
23
24
  },
24
25
  "publishConfig": {
25
26
  "access": "public",
@@ -33,22 +34,18 @@
33
34
  "tough-cookie": "4.1.3"
34
35
  },
35
36
  "devDependencies": {
36
- "@stordata/eslint-config": "1.0.20230825210735",
37
- "chai": "4.3.8",
37
+ "@stordata/eslint-config": "1.0.20231104011033",
38
+ "chai": "4.3.10",
38
39
  "chai-datetime": "1.8.0",
39
- "eslint": "8.48.0",
40
- "eslint-plugin-import": "2.28.1",
40
+ "eslint": "8.53.0",
41
+ "eslint-plugin-import": "2.29.0",
41
42
  "eslint-plugin-json": "3.1.0",
42
43
  "eslint-plugin-no-only-tests": "3.1.0",
43
44
  "eslint-plugin-node": "11.1.0",
44
- "grunt": "1.6.1",
45
- "grunt-env": "1.0.1",
46
- "grunt-eslint": "24.3.0",
47
- "grunt-release": "0.14.0",
48
- "grunt-simple-mocha": "0.4.1",
45
+ "mocha": "10.2.0",
49
46
  "mockdate": "3.0.5",
50
- "nock": "13.3.3",
51
- "sinon": "15.2.0",
47
+ "nock": "13.3.8",
48
+ "sinon": "17.0.1",
52
49
  "sinon-chai": "3.7.0"
53
50
  }
54
51
  }
package/Gruntfile.js DELETED
@@ -1,42 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = (grunt) => {
4
- grunt.initConfig({
5
- eslint: {
6
- target: [
7
- 'index.js',
8
- 'Gruntfile.js',
9
- 'lib/**/*.js'
10
- ]
11
- },
12
- simplemocha: {
13
- options: {
14
- timeout: 5000
15
- },
16
- all: {
17
- src: ['lib/all.spec.js', 'lib/**/*.spec.js']
18
- }
19
- },
20
- env: {
21
- tests: {
22
- NODE_ENV: 'tests',
23
- TZ: 'UTC'
24
- }
25
- },
26
- release: {
27
- options: {
28
- tagName: 'v<%= version %>',
29
- beforeRelease: ['build']
30
- }
31
- }
32
- });
33
-
34
- grunt.loadNpmTasks('grunt-eslint');
35
- grunt.loadNpmTasks('grunt-simple-mocha');
36
- grunt.loadNpmTasks('grunt-env');
37
- grunt.loadNpmTasks('grunt-release');
38
-
39
- grunt.registerTask('default', ['build']);
40
-
41
- grunt.registerTask('build', ['env:tests', 'eslint', 'simplemocha']);
42
- };