Skip to content

Commit

Permalink
pnpm lockfile, publish adjustments, linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed May 4, 2021
1 parent a843654 commit 65ebb11
Show file tree
Hide file tree
Showing 13 changed files with 5,247 additions and 3,310 deletions.
2 changes: 1 addition & 1 deletion packages/babel/test/as-input-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { createFilter } from '@rollup/pluginutils';

import { getCode } from '../../../util/test';

import babelPlugin, { getBabelOutputPlugin, createBabelInputPluginFactory } from '..';
import babelPlugin, { getBabelOutputPlugin, createBabelInputPluginFactory } from '../dist/index';

process.chdir(__dirname);

Expand Down
2 changes: 1 addition & 1 deletion packages/babel/test/as-output-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { SourceMapConsumer } from 'source-map';

import { getCode } from '../../../util/test';

import { getBabelOutputPlugin, createBabelOutputPluginFactory } from '..';
import { getBabelOutputPlugin, createBabelOutputPluginFactory } from '../dist/index';

process.chdir(__dirname);

Expand Down
21 changes: 21 additions & 0 deletions packages/commonjs/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2 changes: 1 addition & 1 deletion packages/commonjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"ci:test": "pnpm run test -- --verbose && pnpm run test:ts",
"prebuild": "del-cli dist",
"prepare": "pnpm run build",
"prepublishOnly": "pnpm run lint && pnpm run test:ts",
"prepublishOnly": "pnpm -w run lint && pnpm run test:ts",
"pretest": "pnpm run build",
"test": "ava",
"test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
Expand Down
12 changes: 6 additions & 6 deletions packages/graphql/src/toESModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ function replaceRequires(source) {
let index = 0;

// replace a require statement with a variable
source = source.replace(/require\(([^)]+)\)/gi, (match, path) => {
path = path.replace(/["']+/g, '');
const replaceSource = source.replace(/require\(([^)]+)\)/gi, (match, path) => {
const replacePath = path.replace(/["']+/g, '');

if (!imports[path]) {
if (!imports[replacePath]) {
index += 1;
imports[path] = `frgmt${index}`;
imports[replacePath] = `frgmt${index}`;
}

return imports[path];
return imports[replacePath];
});

// prepare import statements
const importsOutput = Object.keys(imports)
.map((path) => `import ${imports[path]} from "${path}";`)
.join(EOL);

return importsOutput + EOL + source;
return importsOutput + EOL + replaceSource;
}
2 changes: 1 addition & 1 deletion packages/html/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const css = require('rollup-plugin-postcss');

const { getCode } = require('../../../util/test');

const html = require('..');
const html = require('../dist/index.js');

// const read = (file = 'index.html') => readFileSync(join('output/', file), 'utf-8');

Expand Down
2 changes: 1 addition & 1 deletion packages/pluginutils/src/normalizePath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { win32, posix } from 'path';

import { NormalizePath } from '../types';

const normalizePath: NormalizePath = function (filename: string) {
const normalizePath: NormalizePath = function normalizePath(filename: string) {
return filename.split(win32.sep).join(posix.sep);
};

Expand Down
1 change: 1 addition & 0 deletions packages/replace/test/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ test('can be configured with output plugins', async (t) => {
process.chdir(join(__dirname, 'fixtures', 'form', 'assignment'));

test.serial('no explicit setting of preventAssignment', async (t) => {
// eslint-disable-next-line no-undefined
const possibleValues = [undefined, true, false];
for await (const value of possibleValues) {
const warnings = [];
Expand Down
1 change: 1 addition & 0 deletions packages/run/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export default function run(opts: RollupRunOptions = {}): Plugin {
if (line === 'rs' || line === 'restart' || data.toString().charCodeAt(0) === 11) {
forkBundle(dir, entryFileName);
} else if (line === 'cls' || line === 'clear' || data.toString().charCodeAt(0) === 12) {
// eslint-disable-next-line no-console
console.clear();
}
});
Expand Down
1 change: 1 addition & 0 deletions packages/run/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ test('takes input from the latest options', async (t) => {
run(),
{
options(options) {
// eslint-disable-next-line no-param-reassign
options.input = input;
return options;
}
Expand Down
1 change: 1 addition & 0 deletions packages/typescript/src/watchProgram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { mergeTransformers } from './customTransformers';
type BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram;

// @see https://github.com/microsoft/TypeScript/blob/master/src/compiler/diagnosticMessages.json
// eslint-disable-next-line no-shadow
enum DiagnosticCode {
FILE_CHANGE_DETECTED = 6032,
FOUND_1_ERROR_WATCHING_FOR_FILE_CHANGES = 6193,
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/test/fixtures/src-dir/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ReadOnlyFormData {
}
}

export default function () {
export default function createReadOnlyFormData() {
const map: FormDataMap = new Map();

return {
Expand Down
Loading

0 comments on commit 65ebb11

Please sign in to comment.