Skip to content
Draft
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
File renamed without changes.
35 changes: 35 additions & 0 deletions .licenses/npm/data-uri-to-buffer.dep.yml

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

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

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

32 changes: 32 additions & 0 deletions .licenses/npm/node-domexception.dep.yml

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

29 changes: 9 additions & 20 deletions .licenses/npm/node-fetch.dep.yml

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

33 changes: 33 additions & 0 deletions .licenses/npm/web-streams-polyfill.dep.yml

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

23 changes: 0 additions & 23 deletions .licenses/npm/webidl-conversions.dep.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
module.exports = {
export default {
printWidth: 80,
tabWidth: 2,
useTabs: false,
Expand Down
15 changes: 10 additions & 5 deletions __tests__/authutil.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@ import fs from 'fs';
import * as path from 'path';
import * as core from '@actions/core';
import * as io from '@actions/io';
import * as auth from '../src/authutil';
import * as cacheUtils from '../src/cache-utils';
import * as auth from '../src/authutil.js';
import * as cacheUtils from '../src/cache-utils.js';
import {fileURLToPath} from 'url';
import {jest, describe, beforeEach, afterEach, it, expect} from '@jest/globals';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

let rcFile: string;

describe('authutil tests', () => {
const _runnerDir = path.join(__dirname, 'runner');

let cnSpy: jest.SpyInstance;
let logSpy: jest.SpyInstance;
let dbgSpy: jest.SpyInstance;
let cnSpy: ReturnType<typeof jest.spyOn>;
let logSpy: ReturnType<typeof jest.spyOn>;
let dbgSpy: ReturnType<typeof jest.spyOn>;

beforeAll(async () => {
const randPath = path.join(Math.random().toString(36).substring(7));
Expand Down
8 changes: 6 additions & 2 deletions __tests__/cache-restore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ import * as cache from '@actions/cache';
import * as path from 'path';
import * as glob from '@actions/glob';
import osm from 'os';
import {fileURLToPath} from 'url';

import * as utils from '../src/cache-utils';
import {restoreCache} from '../src/cache-restore';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

import * as utils from '../src/cache-utils.js';
import {restoreCache} from '../src/cache-restore.js';

describe('cache-restore', () => {
process.env['GITHUB_WORKSPACE'] = path.join(__dirname, 'data');
Expand Down
10 changes: 7 additions & 3 deletions __tests__/cache-save.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ import * as cache from '@actions/cache';
import * as glob from '@actions/glob';
import fs from 'fs';
import path from 'path';
import {fileURLToPath} from 'url';

import * as utils from '../src/cache-utils';
import {run} from '../src/cache-save';
import {State} from '../src/constants';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

import * as utils from '../src/cache-utils.js';
import {run} from '../src/cache-save.js';
import {State} from '../src/constants.js';

describe('run', () => {
const yarnFileHash =
Expand Down
12 changes: 8 additions & 4 deletions __tests__/cache-utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
import * as core from '@actions/core';
import * as cache from '@actions/cache';
import path from 'path';
import * as utils from '../src/cache-utils';
import * as utils from '../src/cache-utils.js';
import {
PackageManagerInfo,
isCacheFeatureAvailable,
supportedPackageManagers,
isGhes,
resetProjectDirectoriesMemoized
} from '../src/cache-utils';
} from '../src/cache-utils.js';
import fs from 'fs';
import * as cacheUtils from '../src/cache-utils';
import * as cacheUtils from '../src/cache-utils.js';
import * as glob from '@actions/glob';
import {Globber} from '@actions/glob';
import {MockGlobber} from './mock/glob-mock';
import {MockGlobber} from './mock/glob-mock.js';
import {fileURLToPath} from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

describe('cache-utils', () => {
const versionYarn1 = '1.2.3';
Expand Down
6 changes: 3 additions & 3 deletions __tests__/canary-installer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import fs from 'fs';
import cp from 'child_process';
import osm from 'os';
import path from 'path';
import * as main from '../src/main';
import * as auth from '../src/authutil';
import {INodeVersion} from '../src/distributions/base-models';
import * as main from '../src/main.js';
import * as auth from '../src/authutil.js';
import {INodeVersion} from '../src/distributions/base-models.js';

import nodeTestManifest from './data/versions-manifest.json';
import nodeTestDist from './data/node-dist-index.json';
Expand Down
Loading
Loading