@linaria/shaker
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -425,3 +425,16 @@ import { join } from 'path'; | ||
}); | ||
it('should not remove referenced export', () => { | ||
const { | ||
code, | ||
metadata | ||
} = keep(['__linariaPreval'])` | ||
export default class Media { | ||
} | ||
const _c = Media; | ||
export const __linariaPreval = {}; | ||
`; | ||
expect(code).toMatchSnapshot(); | ||
expect(metadata.imports.size).toBe(0); | ||
}); | ||
}); | ||
//# sourceMappingURL=shaker-plugin.test.js.map |
@@ -21,2 +21,5 @@ import { createCustomDebug } from '@linaria/logger'; | ||
} | ||
if (exportPath.isFunctionDeclaration() || exportPath.isClassDeclaration()) { | ||
return exportPath.scope.getBinding(exportPath.node.id.name); | ||
} | ||
return undefined; | ||
@@ -23,0 +26,0 @@ } |
@@ -428,3 +428,16 @@ "use strict"; | ||
}); | ||
it('should not remove referenced export', () => { | ||
const { | ||
code, | ||
metadata | ||
} = keep(['__linariaPreval'])` | ||
export default class Media { | ||
} | ||
const _c = Media; | ||
export const __linariaPreval = {}; | ||
`; | ||
expect(code).toMatchSnapshot(); | ||
expect(metadata.imports.size).toBe(0); | ||
}); | ||
}); | ||
//# sourceMappingURL=shaker-plugin.test.js.map |
@@ -28,2 +28,5 @@ "use strict"; | ||
} | ||
if (exportPath.isFunctionDeclaration() || exportPath.isClassDeclaration()) { | ||
return exportPath.scope.getBinding(exportPath.node.id.name); | ||
} | ||
return undefined; | ||
@@ -30,0 +33,0 @@ } |
{ | ||
"name": "@linaria/shaker", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "Blazing fast zero-runtime CSS in JS library", | ||
@@ -36,3 +36,3 @@ "keywords": [ | ||
"@linaria/logger": "^5.0.0", | ||
"@linaria/utils": "^5.0.0" | ||
"@linaria/utils": "^5.0.1" | ||
}, | ||
@@ -39,0 +39,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
163759
1525
Updated@linaria/utils@^5.0.1