Skip to content

Commit 65ebb11

Browse files
committed
pnpm lockfile, publish adjustments, linting fixes
1 parent a843654 commit 65ebb11

File tree

13 files changed

+5247
-3310
lines changed

13 files changed

+5247
-3310
lines changed

packages/babel/test/as-input-plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { createFilter } from '@rollup/pluginutils';
1010

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

13-
import babelPlugin, { getBabelOutputPlugin, createBabelInputPluginFactory } from '..';
13+
import babelPlugin, { getBabelOutputPlugin, createBabelInputPluginFactory } from '../dist/index';
1414

1515
process.chdir(__dirname);
1616

packages/babel/test/as-output-plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { SourceMapConsumer } from 'source-map';
66

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

9-
import { getBabelOutputPlugin, createBabelOutputPluginFactory } from '..';
9+
import { getBabelOutputPlugin, createBabelOutputPluginFactory } from '../dist/index';
1010

1111
process.chdir(__dirname);
1212

packages/commonjs/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

packages/commonjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"ci:test": "pnpm run test -- --verbose && pnpm run test:ts",
2727
"prebuild": "del-cli dist",
2828
"prepare": "pnpm run build",
29-
"prepublishOnly": "pnpm run lint && pnpm run test:ts",
29+
"prepublishOnly": "pnpm -w run lint && pnpm run test:ts",
3030
"pretest": "pnpm run build",
3131
"test": "ava",
3232
"test:ts": "tsc types/index.d.ts test/types.ts --noEmit"

packages/graphql/src/toESModules.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@ function replaceRequires(source) {
2929
let index = 0;
3030

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

35-
if (!imports[path]) {
35+
if (!imports[replacePath]) {
3636
index += 1;
37-
imports[path] = `frgmt${index}`;
37+
imports[replacePath] = `frgmt${index}`;
3838
}
3939

40-
return imports[path];
40+
return imports[replacePath];
4141
});
4242

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

48-
return importsOutput + EOL + source;
48+
return importsOutput + EOL + replaceSource;
4949
}

packages/html/test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const css = require('rollup-plugin-postcss');
66

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

9-
const html = require('..');
9+
const html = require('../dist/index.js');
1010

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

packages/pluginutils/src/normalizePath.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { win32, posix } from 'path';
22

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

5-
const normalizePath: NormalizePath = function (filename: string) {
5+
const normalizePath: NormalizePath = function normalizePath(filename: string) {
66
return filename.split(win32.sep).join(posix.sep);
77
};
88

packages/replace/test/misc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ test('can be configured with output plugins', async (t) => {
7070
process.chdir(join(__dirname, 'fixtures', 'form', 'assignment'));
7171

7272
test.serial('no explicit setting of preventAssignment', async (t) => {
73+
// eslint-disable-next-line no-undefined
7374
const possibleValues = [undefined, true, false];
7475
for await (const value of possibleValues) {
7576
const warnings = [];

packages/run/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export default function run(opts: RollupRunOptions = {}): Plugin {
6767
if (line === 'rs' || line === 'restart' || data.toString().charCodeAt(0) === 11) {
6868
forkBundle(dir, entryFileName);
6969
} else if (line === 'cls' || line === 'clear' || data.toString().charCodeAt(0) === 12) {
70+
// eslint-disable-next-line no-console
7071
console.clear();
7172
}
7273
});

packages/run/test/test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ test('takes input from the latest options', async (t) => {
4545
run(),
4646
{
4747
options(options) {
48+
// eslint-disable-next-line no-param-reassign
4849
options.input = input;
4950
return options;
5051
}

0 commit comments

Comments
 (0)