add term
This commit is contained in:
29
static/term/pkg/axios/bin/check-build-version.js
Normal file
29
static/term/pkg/axios/bin/check-build-version.js
Normal file
@ -0,0 +1,29 @@
|
||||
import fs from 'fs';
|
||||
import assert from 'assert';
|
||||
import axios from '../index.js';
|
||||
import axiosBuild from '../dist/node/axios.cjs';
|
||||
|
||||
const {version} = JSON.parse(fs.readFileSync('./package.json'));
|
||||
|
||||
console.log('Checking versions...\n----------------------------')
|
||||
|
||||
console.log(`Package version: v${version}`);
|
||||
console.log(`Axios version: v${axios.VERSION}`);
|
||||
console.log(`Axios build version: v${axiosBuild.VERSION}`);
|
||||
console.log(`----------------------------`);
|
||||
|
||||
assert.strictEqual(
|
||||
version,
|
||||
axios.VERSION,
|
||||
`Version mismatch between package and Axios ${version} != ${axios.VERSION}`
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
version,
|
||||
axiosBuild.VERSION,
|
||||
`Version mismatch between package and build ${version} != ${axiosBuild.VERSION}`
|
||||
);
|
||||
|
||||
console.log('✔️ PASSED\n');
|
||||
|
||||
|
Reference in New Issue
Block a user