mirror of
				https://github.com/Xahau/xahau.js.git
				synced 2025-11-04 04:55:48 +00:00 
			
		
		
		
	feat: add node v22 and npm v10 support (#2695)
* add node 22 support * add debug stuff * try upgrading npm * remove node 16 * debug * remove tmux * only allow 22.9 onwards * try 22.8 * try 22.7 * test more 22.x versions * test more versions * switch back to 22.x, clean up * update README
This commit is contained in:
		
							
								
								
									
										31
									
								
								.github/workflows/nodejs.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										31
									
								
								.github/workflows/nodejs.yml
									
									
									
									
										vendored
									
									
								
							@@ -28,9 +28,9 @@ jobs:
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: ${{ matrix.node-version }}
 | 
			
		||||
 | 
			
		||||
      - name: Setup npm version 9
 | 
			
		||||
      - name: Setup npm version 10
 | 
			
		||||
        run: |
 | 
			
		||||
          npm i -g npm@9 --registry=https://registry.npmjs.org
 | 
			
		||||
          npm i -g npm@10 --registry=https://registry.npmjs.org
 | 
			
		||||
 | 
			
		||||
      - name: Cache node modules
 | 
			
		||||
        id: cache-nodemodules
 | 
			
		||||
@@ -45,7 +45,6 @@ jobs:
 | 
			
		||||
          key: ${{ runner.os }}-deps-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
 | 
			
		||||
          restore-keys: |
 | 
			
		||||
            ${{ runner.os }}-deps-${{ matrix.node-version }}-
 | 
			
		||||
            ${{ runner.os }}-deps-
 | 
			
		||||
 | 
			
		||||
      - name: Install Dependencies
 | 
			
		||||
        if: steps.cache-nodemodules.outputs.cache-hit != 'true'
 | 
			
		||||
@@ -60,7 +59,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
    strategy:
 | 
			
		||||
      matrix:
 | 
			
		||||
        node-version: [18.x, 20.x]
 | 
			
		||||
        node-version: [18.x, 20.x, 22.x]
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
@@ -69,9 +68,9 @@ jobs:
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: ${{ matrix.node-version }}
 | 
			
		||||
 | 
			
		||||
      - name: Setup npm version 9
 | 
			
		||||
      - name: Setup npm version 10
 | 
			
		||||
        run: |
 | 
			
		||||
          npm i -g npm@9 --registry=https://registry.npmjs.org
 | 
			
		||||
          npm i -g npm@10 --registry=https://registry.npmjs.org
 | 
			
		||||
 | 
			
		||||
      - name: Cache node modules
 | 
			
		||||
        id: cache-nodemodules
 | 
			
		||||
@@ -86,7 +85,6 @@ jobs:
 | 
			
		||||
          key: ${{ runner.os }}-deps-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
 | 
			
		||||
          restore-keys: |
 | 
			
		||||
            ${{ runner.os }}-deps-${{ matrix.node-version }}-
 | 
			
		||||
            ${{ runner.os }}-deps-
 | 
			
		||||
 | 
			
		||||
      - name: Install Dependencies
 | 
			
		||||
        if: steps.cache-nodemodules.outputs.cache-hit != 'true'
 | 
			
		||||
@@ -101,7 +99,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
    strategy:
 | 
			
		||||
      matrix:
 | 
			
		||||
        node-version: [18.x, 20.x]
 | 
			
		||||
        node-version: [18.x, 20.x, 22.x]
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
@@ -115,9 +113,9 @@ jobs:
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: ${{ matrix.node-version }}
 | 
			
		||||
 | 
			
		||||
      - name: Setup npm version 9
 | 
			
		||||
      - name: Setup npm version 10
 | 
			
		||||
        run: |
 | 
			
		||||
          npm i -g npm@9 --registry=https://registry.npmjs.org
 | 
			
		||||
          npm i -g npm@10 --registry=https://registry.npmjs.org
 | 
			
		||||
 | 
			
		||||
      - name: Cache node modules
 | 
			
		||||
        id: cache-nodemodules
 | 
			
		||||
@@ -132,7 +130,6 @@ jobs:
 | 
			
		||||
          key: ${{ runner.os }}-deps-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
 | 
			
		||||
          restore-keys: |
 | 
			
		||||
            ${{ runner.os }}-deps-${{ matrix.node-version }}-
 | 
			
		||||
            ${{ runner.os }}-deps-
 | 
			
		||||
 | 
			
		||||
      - name: Install Dependencies
 | 
			
		||||
        if: steps.cache-nodemodules.outputs.cache-hit != 'true'
 | 
			
		||||
@@ -167,9 +164,9 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          docker run --detach --rm -p 6006:6006 --volume "${{ github.workspace }}/.ci-config/":"/etc/opt/ripple/" --name rippled-service --health-cmd="rippled server_nfo || exit 1" --health-interval=5s --health-retries=10 --health-timeout=2s --env GITHUB_ACTIONS=true --env CI=true --entrypoint bash ${{ env.RIPPLED_DOCKER_IMAGE }} -c "rippled -a"
 | 
			
		||||
 | 
			
		||||
      - name: Setup npm version 9
 | 
			
		||||
      - name: Setup npm version 10
 | 
			
		||||
        run: |
 | 
			
		||||
          npm i -g npm@9 --registry=https://registry.npmjs.org
 | 
			
		||||
          npm i -g npm@10 --registry=https://registry.npmjs.org
 | 
			
		||||
 | 
			
		||||
      - name: Cache node modules
 | 
			
		||||
        id: cache-nodemodules
 | 
			
		||||
@@ -184,7 +181,6 @@ jobs:
 | 
			
		||||
          key: ${{ runner.os }}-deps-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
 | 
			
		||||
          restore-keys: |
 | 
			
		||||
            ${{ runner.os }}-deps-${{ matrix.node-version }}-
 | 
			
		||||
            ${{ runner.os }}-deps-
 | 
			
		||||
 | 
			
		||||
      - name: Install Dependencies
 | 
			
		||||
        if: steps.cache-nodemodules.outputs.cache-hit != 'true'
 | 
			
		||||
@@ -205,7 +201,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
    strategy:
 | 
			
		||||
      matrix:
 | 
			
		||||
        node-version: [18.x, 20.x]
 | 
			
		||||
        node-version: [18.x, 20.x, 22.x]
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
@@ -214,9 +210,9 @@ jobs:
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: ${{ matrix.node-version }}
 | 
			
		||||
 | 
			
		||||
      - name: Setup npm version 9
 | 
			
		||||
      - name: Setup npm version 10
 | 
			
		||||
        run: |
 | 
			
		||||
          npm i -g npm@9 --registry=https://registry.npmjs.org
 | 
			
		||||
          npm i -g npm@10 --registry=https://registry.npmjs.org
 | 
			
		||||
 | 
			
		||||
      - name: Cache node modules
 | 
			
		||||
        id: cache-nodemodules
 | 
			
		||||
@@ -231,7 +227,6 @@ jobs:
 | 
			
		||||
          key: ${{ runner.os }}-deps-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
 | 
			
		||||
          restore-keys: |
 | 
			
		||||
            ${{ runner.os }}-deps-${{ matrix.node-version }}-
 | 
			
		||||
            ${{ runner.os }}-deps-
 | 
			
		||||
 | 
			
		||||
      - name: Install Dependencies
 | 
			
		||||
        if: steps.cache-nodemodules.outputs.cache-hit != 'true'
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ All of which works in Node.js (tested for v18+) & web browsers (tested for Chrom
 | 
			
		||||
 | 
			
		||||
### Requirements
 | 
			
		||||
 | 
			
		||||
+ **[Node.js v18](https://nodejs.org/)** is recommended. We also support v20. Other versions may work but are not frequently tested.
 | 
			
		||||
+ **[Node.js v18](https://nodejs.org/)** is recommended. We also support v20 and v22. Other versions may work but are not frequently tested.
 | 
			
		||||
 | 
			
		||||
### Installing xrpl.js
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@@ -57,7 +57,7 @@
 | 
			
		||||
      },
 | 
			
		||||
      "engines": {
 | 
			
		||||
        "node": ">=18.0.0",
 | 
			
		||||
        "npm": ">=7.10.0 < 10.0.0"
 | 
			
		||||
        "npm": ">=7.10.0"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@aashutoshrathi/word-wrap": {
 | 
			
		||||
 
 | 
			
		||||
@@ -65,6 +65,6 @@
 | 
			
		||||
  ],
 | 
			
		||||
  "engines": {
 | 
			
		||||
    "node": ">=18.0.0",
 | 
			
		||||
    "npm": ">=7.10.0 < 10.0.0"
 | 
			
		||||
    "npm": ">=7.10.0"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user