Skip to content

Commit

Permalink
tests: Temporarily disable polyfill tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed May 22, 2024
1 parent b1f9c9e commit 27837f1
Show file tree
Hide file tree
Showing 6 changed files with 280 additions and 288 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@
"devDependencies": {
"@babel/cli": "^7.24.5",
"@babel/core": "^7.24.5",
"@moonrepo/cli": "^1.24.4",
"@moonrepo/cli": "^1.24.6",
"@moonrepo/dev": "^3.0.0",
"@swc/cli": "^0.3.12",
"@types/micromatch": "^4.0.7",
"@types/node": "^20.12.11",
"@types/react": "^18.3.1",
"@types/node": "^20.12.12",
"@types/react": "^18.3.2",
"@types/semver": "^7.5.8",
"@vanilla-extract/rollup-plugin": "^1.3.4",
"@vanilla-extract/rollup-plugin": "^1.3.5",
"babel-preset-moon": "^3.0.1",
"bootstrap": "^5.3.3",
"chokidar": "^3.6.0",
"electron-to-chromium": "^1.4.759",
"electron-to-chromium": "^1.4.777",
"eslint": "^8.57.0",
"eslint-config-moon": "^3.1.0",
"lerna": "^8.1.2",
"lerna": "^8.1.3",
"prettier": "^3.2.5",
"prettier-config-moon": "^1.1.2",
"ts-node": "^10.9.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/packemon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@swc/core": "^1.5.5",
"@swc/core": "^1.5.7",
"@swc/helpers": "^0.5.11",
"babel-plugin-cjs-esm-interop": "^4.0.0",
"babel-plugin-conditional-invariant": "^4.0.0",
Expand All @@ -82,18 +82,18 @@
"debug": "^4.3.4",
"execa": "^8.0.1",
"fast-glob": "^3.3.2",
"filesize": "^10.1.1",
"filesize": "^10.1.2",
"ink": "^4.4.1",
"ink-progress-bar": "^3.0.0",
"ink-spinner": "^5.0.0",
"magic-string": "^0.30.10",
"micromatch": "^4.0.5",
"micromatch": "^4.0.6",
"react": "^18.3.1",
"resolve": "^1.22.8",
"rollup": "^4.17.2",
"rollup-plugin-node-externals": "^7.1.2",
"rollup-plugin-polyfill-node": "^0.13.0",
"semver": "^7.6.1",
"semver": "^7.6.2",
"spdx-license-list": "^6.9.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/packemon/src/rollup/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export async function getRollupConfig(
peerDeps: true,
}),
// Externals MUST be listed before shared plugins
resolve({ extensions: EXTENSIONS, preferBuiltins: true }),
resolve({ extensions: EXTENSIONS, preferBuiltins: isNode }),
commonjs(),
json({ compact: true, namedExports: false }),
// Copy assets and update import references
Expand Down Expand Up @@ -232,7 +232,7 @@ export async function getRollupConfig(

// Polyfill node modules when platform is not node
if (!isNode) {
(config.plugins as Plugin[]).unshift(nodePolyfills());
(config.plugins as Plugin[]).splice(1, 0, nodePolyfills()); // after externals
}

// Add an output for each format
Expand Down
3 changes: 2 additions & 1 deletion packages/packemon/tests/examples/nodePolyfills.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { describe } from 'vitest';
import { testExampleOutput } from '../helpers';

describe('Node polyfills', () => {
// This is currently buggy!
describe.skip('Node polyfills', () => {
testExampleOutput('node-polyfills.ts', 'babel');
testExampleOutput('node-polyfills.ts', 'swc');
});
6 changes: 5 additions & 1 deletion packages/packemon/tests/rollup/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ describe('getRollupConfig()', () => {
`babelInput(${fixturePath})`,
];

const sharedNonNodePlugins = ['polyfillNode()', ...sharedPlugins];
const sharedNonNodePlugins = [
...sharedPlugins.slice(0, 1),
'polyfillNode()',
...sharedPlugins.slice(1),
];

let artifact: Artifact;

Expand Down
Loading

0 comments on commit 27837f1

Please sign in to comment.