Skip to content
This repository was archived by the owner on Apr 26, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ var chalk = require('chalk');
var exec = require('child_process').exec;
var fsx = require('fs-extra');
var globby = require('globby');
var nanoid = require('nanoid');
var path = require('path');
var shortid = require('shortid');
var _ = require('lodash');

var writeSpec = require('./lib/spec');
Expand Down Expand Up @@ -172,7 +172,7 @@ function rpm(options, cb) {
vendor: 'Vendor',
group: 'Development/Tools',
buildArch: 'noarch',
tempDir: 'tmp-' + shortid.generate(),
tempDir: 'tmp-' + nanoid.nanoid(16),
files: [],
excludeFiles: [],
rpmDest: process.cwd(),
Expand Down
14 changes: 3 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"fs-extra": "^1.0.0",
"globby": "^6.1.0",
"lodash": "^4.17.4",
"shortid": "^2.1.3"
"nanoid": "^3.2.0"
},
"devDependencies": {
"istanbul": "^0.4.5",
Expand Down
14 changes: 7 additions & 7 deletions test/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ var assert = require('assert');
var exec = require('child_process').exec;
var fsx = require('fs-extra');
var globby = require('globby');
var nanoid = require('nanoid');
var path = require('path');
var shortid = require('shortid');
var _ = require('lodash');

var buildRpm = require('../');
Expand Down Expand Up @@ -54,7 +54,7 @@ describe('rpm builder', function() {

it('should keep the temp folder when `keepTemp: true`', function(done) {
var options = {
tempDir: 'rpm-builder-test-tmp-' + shortid.generate(),
tempDir: 'rpm-builder-test-tmp-' + nanoid.nanoid(16),
keepTemp: true
};

Expand All @@ -78,7 +78,7 @@ describe('rpm builder', function() {

it('should remove the temp folder when `keepTemp: false`', function(done) {
var options = {
tempDir: 'rpm-builder-test-tmp-' + shortid.generate(),
tempDir: 'rpm-builder-test-tmp-' + nanoid.nanoid(16),
keepTemp: false
};

Expand All @@ -100,7 +100,7 @@ describe('rpm builder', function() {
it('should create a proper rpm folder structure inside the temp dir', function(done) {
var rpmStructure = ['BUILD', 'BUILDROOT', 'RPMS', 'SOURCES', 'SPECS', 'SRPMS'];
var options = {
tempDir: 'rpm-builder-test-tmp-' + shortid.generate(),
tempDir: 'rpm-builder-test-tmp-' + nanoid.nanoid(16),
keepTemp: true
};

Expand Down Expand Up @@ -131,7 +131,7 @@ describe('rpm builder', function() {

it('rpm file should be copied to the `rpmDest`', function(done) {
var options = {
tempDir: 'rpm-builder-test-tmp-' + shortid.generate(),
tempDir: 'rpm-builder-test-tmp-' + nanoid.nanoid(16),
rpmDest: path.join(process.cwd(), 'test'),
keepTemp: false
};
Expand All @@ -156,7 +156,7 @@ describe('rpm builder', function() {
version: '23.02.87',
release: '28',
buildArch: 'noarch',
tempDir: 'rpm-builder-test-tmp-' + shortid.generate(),
tempDir: 'rpm-builder-test-tmp-' + nanoid.nanoid(16),
keepTemp: false
};

Expand Down Expand Up @@ -191,7 +191,7 @@ describe('rpm builder', function() {
excludeFiles: [
'./test/main.js'
],
tempDir: 'rpm-builder-test-tmp-' + shortid.generate(),
tempDir: 'rpm-builder-test-tmp-' + nanoid.nanoid(16),
keepTemp: true
};

Expand Down
4 changes: 2 additions & 2 deletions test/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

var assert = require('assert');
var fsx = require('fs-extra');
var nanoid = require('nanoid');
var path = require('path');
var shortid = require('shortid');
var _ = require('lodash');
var dateFormat = require('dateformat');

Expand Down Expand Up @@ -57,7 +57,7 @@ describe('spec', function() {
vendor: 'Vendor',
group: 'Development/Tools',
buildArch: 'noarch',
tempDir: 'tmp-' + shortid.generate(),
tempDir: 'tmp-' + nanoid.nanoid(16),
files: [],
keepTemp: false
};
Expand Down