Skip to content

Commit

Permalink
fix: resolve issue with broken coverage & update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Lodin committed Sep 4, 2021
1 parent 3b9c392 commit dde9152
Show file tree
Hide file tree
Showing 7 changed files with 3,716 additions and 5,593 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
- 'plugins/**'
- 'src/**'
- 'test/**'
- '.babelrc'
- '.browserslistrc'
- '.prettierrc'
- 'karma.conf.js'
Expand All @@ -24,7 +23,6 @@ on:
- 'plugins/**'
- 'src/**'
- 'test/**'
- '.babelrc'
- '.browserslistrc'
- '.prettierrc'
- 'karma.conf.js'
Expand Down
17 changes: 9 additions & 8 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
// Generated on Sun Jan 20 2019 23:06:22 GMT-0600 (CST)
const rollupCommonjs = require('@rollup/plugin-commonjs');
const rollupNodeResolve = require('@rollup/plugin-node-resolve').default;
const rollupPluginBabel = require('@rollup/plugin-babel').default;
const rollupPluginTypescript = require('@rollup/plugin-typescript');
const rollupPluginBabel = require('@rollup/plugin-babel').default;
const rollupPluginInstrumentTsCode = require('./plugins/rollup-plugin-instrument-ts-code');
const rollupPluginInjectCode = require('./plugins/rollup-plugin-inject-code');

const isCI = !!process.env.CI;
const watch = !!process.argv.find((arg) => arg.includes('watch')) && !isCI;
Expand Down Expand Up @@ -82,6 +84,7 @@ module.exports = (config) => {
coverageIstanbulReporter: {
reports: isCI ? ['lcovonly'] : ['html'],
dir: '.coverage',
includeAllSources: true,
combineBrowserReports: true,
skipFilesWithNoCoverage: true,
},
Expand Down Expand Up @@ -157,16 +160,13 @@ module.exports = (config) => {
extensions,
}),
rollupPluginTypescript({
inlineSourceMap: true,
inlineSources: true,
isolatedModules: true,
tsconfig: require.resolve('./tsconfig.build.json'),
}),
rollupPluginBabel({
babelHelpers: 'bundled',
babelrc: false,
extensions,
plugins: [coverage && 'babel-plugin-istanbul'].filter(Boolean),
}),
require('./plugins/rollup-plugin-inject-code')({
rollupPluginInstrumentTsCode(),
rollupPluginInjectCode({
'index.js': {
line: 3,
code: " if ('adoptedStyleSheets' in document) { return; }\n",
Expand All @@ -176,6 +176,7 @@ module.exports = (config) => {
output: {
format: 'iife',
name: 'source',
sourcemap: 'inline',
},
treeshake: false,
},
Expand Down

0 comments on commit dde9152

Please sign in to comment.