Skip to content

Commit

Permalink
Chore: Replace deprecated require-uncached with import-fresh (#92)
Browse files Browse the repository at this point in the history
require-uncached renamed to import-fresh: https://github.com/sindresorhus/import-fresh
  • Loading branch information
bmish committed Jul 8, 2021
1 parent 5ceb1e9 commit 8508232
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 88 deletions.
80 changes: 1 addition & 79 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
Expand Up @@ -38,10 +38,10 @@
"eslint": "^7.0.0",
"eslint-config-eslint": "^7.0.0",
"eslint-release": "^3.0.0",
"import-fresh": "^3.0.0",
"markdownlint-cli": "^0.27.1",
"mocha": "^9.0.0",
"npm-run-all": "^4.1.5",
"require-uncached": "^1.0.2",
"sinon": "^11.0.0",
"yeoman-assert": "^2.1.2",
"yeoman-test": "^1.1.0"
Expand Down
10 changes: 5 additions & 5 deletions tests/plugin/index.js
Expand Up @@ -12,7 +12,7 @@
//------------------------------------------------------------------------------

const path = require("path"),
requireUncached = require("require-uncached"),
importFresh = require("import-fresh"),
helpers = require("yeoman-test"),
assert = require("yeoman-assert");

Expand Down Expand Up @@ -100,7 +100,7 @@ describe("ESLint Plugin Generator", () => {

describe("Resulting package.json", () => {
beforeEach(function() {
this.resultPackageJson = requireUncached(path.join(testDirectory, "package.json"));
this.resultPackageJson = importFresh(path.join(testDirectory, "package.json"));
});

it("should be requireable", function() {
Expand Down Expand Up @@ -128,7 +128,7 @@ describe("ESLint Plugin Generator", () => {

describe("Resulting package.json", () => {
beforeEach(function() {
this.resultPackageJson = requireUncached(path.join(testDirectory, "package.json"));
this.resultPackageJson = importFresh(path.join(testDirectory, "package.json"));
});

it("should be requireable", function() {
Expand Down Expand Up @@ -156,7 +156,7 @@ describe("ESLint Plugin Generator", () => {

describe("Resulting package.json", () => {
beforeEach(function() {
this.resultPackageJson = requireUncached(path.join(testDirectory, "package.json"));
this.resultPackageJson = importFresh(path.join(testDirectory, "package.json"));
});

it("should be requireable", function() {
Expand Down Expand Up @@ -184,7 +184,7 @@ describe("ESLint Plugin Generator", () => {

describe("Resulting package.json", () => {
beforeEach(function() {
this.resultPackageJson = requireUncached(path.join(testDirectory, "package.json"));
this.resultPackageJson = importFresh(path.join(testDirectory, "package.json"));
});

it("should be requireable", function() {
Expand Down
6 changes: 3 additions & 3 deletions tests/rule/index.js
Expand Up @@ -13,7 +13,7 @@

const fs = require("fs"),
path = require("path"),
requireUncached = require("require-uncached"),
importFresh = require("import-fresh"),
helpers = require("yeoman-test"),
assert = require("yeoman-assert");

Expand Down Expand Up @@ -75,7 +75,7 @@ describe("ESLint Rule Generator", () => {

describe("Resulting rule file", () => {
beforeEach(function() {
this.resultRuleModule = requireUncached(path.join(testDirectory, "lib", "rules", "test-rule"));
this.resultRuleModule = importFresh(path.join(testDirectory, "lib", "rules", "test-rule"));
});

it("should be requireable", function() {
Expand Down Expand Up @@ -131,7 +131,7 @@ describe("ESLint Rule Generator", () => {

describe("Resulting rule file", () => {
beforeEach(function() {
this.resultRuleModule = requireUncached(path.join(testDirectory, "lib", "rules", "test-rule"));
this.resultRuleModule = importFresh(path.join(testDirectory, "lib", "rules", "test-rule"));
});

it("should be requireable", function() {
Expand Down

0 comments on commit 8508232

Please sign in to comment.