Skip to content

Commit

Permalink
feat(ruleset-bundler): expose commonjs plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
P0lip committed Feb 25, 2022
1 parent 4bc304f commit 91a4b80
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 8 deletions.
Empty file added __karma__/perf_hooks.js
Empty file.
2 changes: 1 addition & 1 deletion __karma__/process.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default undefined;
export const on = Function();
3 changes: 2 additions & 1 deletion karma.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = (config: Config): void => {
files: ['./__karma__/jest.ts', 'packages/*/src/**/*.ts'],

// list of files / patterns to exclude
exclude: ['packages/cli/**', '**/*.jest.test.ts'],
exclude: ['packages/cli/**', 'packages/ruleset-bundler/src/plugins/commonjs.ts', '**/*.jest.test.ts'],

// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
Expand All @@ -41,6 +41,7 @@ module.exports = (config: Config): void => {
'node-fetch': require.resolve('./__karma__/fetch'),
fs: require.resolve('./__karma__/fs'),
process: require.resolve('./__karma__/process'),
perf_hooks: require.resolve('./__karma__/perf_hooks'),
fsevents: require.resolve('./__karma__/fsevents'),
},
},
Expand Down
3 changes: 2 additions & 1 deletion packages/ruleset-bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"release": "semantic-release -e semantic-release-monorepo"
},
"dependencies": {
"@rollup/plugin-commonjs": "^21.0.1",
"@stoplight/path": "1.3.2",
"@stoplight/spectral-core": ">=1",
"@stoplight/spectral-formats": ">=1",
Expand All @@ -50,7 +51,7 @@
"@stoplight/types": "^12.3.0",
"@types/node": "*",
"pony-cause": "1.1.1",
"rollup": "~2.60.2",
"rollup": "~2.67.0",
"tslib": "^2.3.1",
"validate-npm-package-name": "3.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions packages/ruleset-bundler/src/plugins/commonjs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as commonjs } from '@rollup/plugin-commonjs';
28 changes: 23 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2077,6 +2077,23 @@ __metadata:
languageName: node
linkType: hard

"@rollup/plugin-commonjs@npm:^21.0.1":
version: 21.0.1
resolution: "@rollup/plugin-commonjs@npm:21.0.1"
dependencies:
"@rollup/pluginutils": ^3.1.0
commondir: ^1.0.1
estree-walker: ^2.0.1
glob: ^7.1.6
is-reference: ^1.2.1
magic-string: ^0.25.7
resolve: ^1.17.0
peerDependencies:
rollup: ^2.38.3
checksum: 3e56be58c72d655face6f361f85923ddcc3cc07760b5a3a91cfc728115dfed358fc595781148c512d53a03be8c703133379f228e78fd2aed8655fae9d83800b6
languageName: node
linkType: hard

"@rollup/pluginutils@npm:^3.1.0":
version: 3.1.0
resolution: "@rollup/pluginutils@npm:3.1.0"
Expand Down Expand Up @@ -2449,6 +2466,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@stoplight/spectral-ruleset-bundler@workspace:packages/ruleset-bundler"
dependencies:
"@rollup/plugin-commonjs": ^21.0.1
"@stoplight/path": 1.3.2
"@stoplight/spectral-core": ">=1"
"@stoplight/spectral-formats": ">=1"
Expand All @@ -2465,7 +2483,7 @@ __metadata:
memfs: ^3.3.0
pony-cause: 1.1.1
prettier: ^2.4.1
rollup: ~2.60.2
rollup: ~2.67.0
tslib: ^2.3.1
validate-npm-package-name: 3.0.0
languageName: unknown
Expand Down Expand Up @@ -11067,17 +11085,17 @@ __metadata:
languageName: node
linkType: hard

"rollup@npm:~2.60.2":
version: 2.60.2
resolution: "rollup@npm:2.60.2"
"rollup@npm:~2.67.0":
version: 2.67.2
resolution: "rollup@npm:2.67.2"
dependencies:
fsevents: ~2.3.2
dependenciesMeta:
fsevents:
optional: true
bin:
rollup: dist/bin/rollup
checksum: bcd41dfe8afb7e0d97ce2237752165bdda689bcce6321d96821d565de3e0c865a49b544923f315985be2bfde086f72b54aae4ae7c87f798b3cb9558a5bec4e65
checksum: 9aca5251ba4b441064183cde2394b91567259002d68086bdd3906db66d55dd148ab27e57c51eb53830d7b9b813c2d4e834b7735d65e2a869780bc639d4a20c38
languageName: node
linkType: hard

Expand Down

0 comments on commit 91a4b80

Please sign in to comment.