Skip to content

Commit

Permalink
- updating dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ezolenko committed Mar 27, 2020
1 parent fd824de commit 034abe0
Show file tree
Hide file tree
Showing 8 changed files with 218 additions and 169 deletions.
2 changes: 1 addition & 1 deletion dist/index.d.ts.map

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

101 changes: 62 additions & 39 deletions dist/rollup-plugin-typescript2.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -23704,7 +23704,7 @@ function typeHasher(options, writeTo, context){
} else {
throw new Error('Unknown object type "' + objType + '"');
}
}else{
}else {
var keys = Object.keys(object);
if (options.unorderedObjects) {
keys = keys.sort();
Expand Down Expand Up @@ -28710,11 +28710,6 @@ var semver_42 = semver$2.coerce;
const {promisify: promisify$2} = util;


const defaults = {
mode: 0o777 & (~process.umask()),
fs: fs__default
};

const useNativeRecursiveOption = semver$2.satisfies(process.version, '>=10.12.0');

// https://github.com/nodejs/node/issues/8987
Expand All @@ -28731,6 +28726,19 @@ const checkPath = pth => {
}
};

const processOptions = options => {
// https://github.com/sindresorhus/make-dir/issues/18
const defaults = {
mode: 0o777 & (~process.umask()),
fs: fs__default
};

return {
...defaults,
...options
};
};

const permissionError = pth => {
// This replicates the exception of `fs.mkdir` with native the
// `recusive` option when run on an invalid drive under Windows.
Expand All @@ -28744,10 +28752,7 @@ const permissionError = pth => {

const makeDir = async (input, options) => {
checkPath(input);
options = {
...defaults,
...options
};
options = processOptions(options);

const mkdir = promisify$2(options.fs.mkdir);
const stat = promisify$2(options.fs.stat);
Expand Down Expand Up @@ -28787,8 +28792,12 @@ const makeDir = async (input, options) => {
return make(pth);
}

const stats = await stat(pth);
if (!stats.isDirectory()) {
try {
const stats = await stat(pth);
if (!stats.isDirectory()) {
throw new Error('The path is not a directory');
}
} catch (_) {
throw error;
}

Expand All @@ -28803,10 +28812,7 @@ var makeDir_1 = makeDir;

var sync$3 = (input, options) => {
checkPath(input);
options = {
...defaults,
...options
};
options = processOptions(options);

if (useNativeRecursiveOption && options.fs.mkdirSync === fs__default.mkdirSync) {
const pth = path__default.resolve(input);
Expand Down Expand Up @@ -28856,6 +28862,8 @@ var sync$3 = (input, options) => {
};
makeDir_1.sync = sync$3;

const {env: env$1, cwd} = process;

const isWritable = path => {
try {
fs__default.accessSync(path, fs__default.constants.W_OK);
Expand All @@ -28865,39 +28873,54 @@ const isWritable = path => {
}
};

function useDirectory(directory, options) {
if (options.create) {
makeDir_1.sync(directory);
}

if (options.thunk) {
return (...arguments_) => path__default.join(directory, ...arguments_);
}

return directory;
}

function getNodeModuleDirectory(directory) {
const nodeModules = path__default.join(directory, 'node_modules');

if (
!isWritable(nodeModules) &&
(fs__default.existsSync(nodeModules) || !isWritable(path__default.join(directory)))
) {
return;
}

return nodeModules;
}

var findCacheDir = (options = {}) => {
const {name} = options;
let directory = options.cwd;
if (env$1.CACHE_DIR && !['true', 'false', '1', '0'].includes(env$1.CACHE_DIR)) {
return useDirectory(path__default.join(env$1.CACHE_DIR, 'find-cache-dir'), options);
}

let {cwd: directory = cwd()} = options;

if (options.files) {
directory = commondir(directory, options.files);
} else {
directory = directory || process.cwd();
}

directory = pkgDir_1.sync(directory);

if (directory) {
const nodeModules = path__default.join(directory, 'node_modules');
if (
!isWritable(nodeModules) &&
(fs__default.existsSync(nodeModules) || !isWritable(path__default.join(directory)))
) {
return undefined;
}

directory = path__default.join(directory, 'node_modules', '.cache', name);

if (directory && options.create) {
makeDir_1.sync(directory);
}
if (!directory) {
return;
}

if (options.thunk) {
return (...arguments_) => path__default.join(directory, ...arguments_);
}
const nodeModules = getNodeModuleDirectory(directory);
if (!nodeModules) {
return undefined;
}

return directory;
return useDirectory(path__default.join(directory, 'node_modules', '.cache', options.name), options);
};

const typescript = (options) => {
Expand Down Expand Up @@ -28956,7 +28979,7 @@ const typescript = (options) => {
context.info(`rollup version: ${this.meta.rollupVersion}`);
if (!semver_33(tsModule.version, ">=2.4.0", { includePrerelease: true }))
throw new Error(`Installed typescript version '${tsModule.version}' is outside of supported range '>=2.4.0'`);
context.info(`rollup-plugin-typescript2 version: 0.26.1`);
context.info(`rollup-plugin-typescript2 version: 0.27.0`);
context.debug(() => `plugin options:\n${JSON.stringify(pluginOptions, (key, value) => key === "typescript" ? `version ${value.version}` : value, 4)}`);
context.debug(() => `rollup config:\n${JSON.stringify(rollupOptions, undefined, 4)}`);
context.debug(() => `tsconfig path: ${tsConfigPath}`);
Expand Down
2 changes: 1 addition & 1 deletion dist/rollup-plugin-typescript2.cjs.js.map

Large diffs are not rendered by default.

101 changes: 62 additions & 39 deletions dist/rollup-plugin-typescript2.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -23698,7 +23698,7 @@ function typeHasher(options, writeTo, context){
} else {
throw new Error('Unknown object type "' + objType + '"');
}
}else{
}else {
var keys = Object.keys(object);
if (options.unorderedObjects) {
keys = keys.sort();
Expand Down Expand Up @@ -28704,11 +28704,6 @@ var semver_42 = semver$2.coerce;
const {promisify: promisify$2} = util;


const defaults = {
mode: 0o777 & (~process.umask()),
fs
};

const useNativeRecursiveOption = semver$2.satisfies(process.version, '>=10.12.0');

// https://github.com/nodejs/node/issues/8987
Expand All @@ -28725,6 +28720,19 @@ const checkPath = pth => {
}
};

const processOptions = options => {
// https://github.com/sindresorhus/make-dir/issues/18
const defaults = {
mode: 0o777 & (~process.umask()),
fs
};

return {
...defaults,
...options
};
};

const permissionError = pth => {
// This replicates the exception of `fs.mkdir` with native the
// `recusive` option when run on an invalid drive under Windows.
Expand All @@ -28738,10 +28746,7 @@ const permissionError = pth => {

const makeDir = async (input, options) => {
checkPath(input);
options = {
...defaults,
...options
};
options = processOptions(options);

const mkdir = promisify$2(options.fs.mkdir);
const stat = promisify$2(options.fs.stat);
Expand Down Expand Up @@ -28781,8 +28786,12 @@ const makeDir = async (input, options) => {
return make(pth);
}

const stats = await stat(pth);
if (!stats.isDirectory()) {
try {
const stats = await stat(pth);
if (!stats.isDirectory()) {
throw new Error('The path is not a directory');
}
} catch (_) {
throw error;
}

Expand All @@ -28797,10 +28806,7 @@ var makeDir_1 = makeDir;

var sync$3 = (input, options) => {
checkPath(input);
options = {
...defaults,
...options
};
options = processOptions(options);

if (useNativeRecursiveOption && options.fs.mkdirSync === fs.mkdirSync) {
const pth = path__default.resolve(input);
Expand Down Expand Up @@ -28850,6 +28856,8 @@ var sync$3 = (input, options) => {
};
makeDir_1.sync = sync$3;

const {env: env$1, cwd} = process;

const isWritable = path => {
try {
fs.accessSync(path, fs.constants.W_OK);
Expand All @@ -28859,39 +28867,54 @@ const isWritable = path => {
}
};

function useDirectory(directory, options) {
if (options.create) {
makeDir_1.sync(directory);
}

if (options.thunk) {
return (...arguments_) => path__default.join(directory, ...arguments_);
}

return directory;
}

function getNodeModuleDirectory(directory) {
const nodeModules = path__default.join(directory, 'node_modules');

if (
!isWritable(nodeModules) &&
(fs.existsSync(nodeModules) || !isWritable(path__default.join(directory)))
) {
return;
}

return nodeModules;
}

var findCacheDir = (options = {}) => {
const {name} = options;
let directory = options.cwd;
if (env$1.CACHE_DIR && !['true', 'false', '1', '0'].includes(env$1.CACHE_DIR)) {
return useDirectory(path__default.join(env$1.CACHE_DIR, 'find-cache-dir'), options);
}

let {cwd: directory = cwd()} = options;

if (options.files) {
directory = commondir(directory, options.files);
} else {
directory = directory || process.cwd();
}

directory = pkgDir_1.sync(directory);

if (directory) {
const nodeModules = path__default.join(directory, 'node_modules');
if (
!isWritable(nodeModules) &&
(fs.existsSync(nodeModules) || !isWritable(path__default.join(directory)))
) {
return undefined;
}

directory = path__default.join(directory, 'node_modules', '.cache', name);

if (directory && options.create) {
makeDir_1.sync(directory);
}
if (!directory) {
return;
}

if (options.thunk) {
return (...arguments_) => path__default.join(directory, ...arguments_);
}
const nodeModules = getNodeModuleDirectory(directory);
if (!nodeModules) {
return undefined;
}

return directory;
return useDirectory(path__default.join(directory, 'node_modules', '.cache', options.name), options);
};

const typescript = (options) => {
Expand Down Expand Up @@ -28950,7 +28973,7 @@ const typescript = (options) => {
context.info(`rollup version: ${this.meta.rollupVersion}`);
if (!semver_33(tsModule.version, ">=2.4.0", { includePrerelease: true }))
throw new Error(`Installed typescript version '${tsModule.version}' is outside of supported range '>=2.4.0'`);
context.info(`rollup-plugin-typescript2 version: 0.26.1`);
context.info(`rollup-plugin-typescript2 version: 0.27.0`);
context.debug(() => `plugin options:\n${JSON.stringify(pluginOptions, (key, value) => key === "typescript" ? `version ${value.version}` : value, 4)}`);
context.debug(() => `rollup config:\n${JSON.stringify(rollupOptions, undefined, 4)}`);
context.debug(() => `tsconfig path: ${tsConfigPath}`);
Expand Down
2 changes: 1 addition & 1 deletion dist/rollup-plugin-typescript2.es.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 034abe0

Please sign in to comment.