File tree Expand file tree Collapse file tree 4 files changed +206
-224
lines changed Expand file tree Collapse file tree 4 files changed +206
-224
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @shelf/aws-lambda-libreoffice" ,
3- "version" : " 7.0 .0" ,
3+ "version" : " 7.1 .0" ,
44 "description" : " Utility to work with Docker version of LibreOffice in Lambda" ,
55 "keywords" : [
66 " aws lambda" ,
5757 "is-video" : " 1.0.1"
5858 },
5959 "devDependencies" : {
60- "@babel/cli" : " 7.24.7 " ,
61- "@babel/core" : " 7.24.7 " ,
60+ "@babel/cli" : " 7.26.4 " ,
61+ "@babel/core" : " 7.26.0 " ,
6262 "@shelf/babel-config" : " 2.0.1" ,
6363 "@shelf/eslint-config" : " 2.29.3" ,
6464 "@shelf/prettier-config" : " 1.0.0" ,
65- "@types/jest" : " 29.5.12 " ,
65+ "@types/jest" : " 29.5.14 " ,
6666 "@types/node" : " 16" ,
6767 "babel-jest" : " 29.7.0" ,
68- "eslint" : " 8.55.0 " ,
68+ "eslint" : " 8.57.1 " ,
6969 "husky" : " 8.0.3" ,
7070 "jest" : " 29.7.0" ,
7171 "lint-staged" : " 13.3.0" ,
7272 "prettier" : " 2.8.8" ,
73- "typescript" : " 5.5 .2"
73+ "typescript" : " 5.7 .2"
7474 },
7575 "engines" : {
7676 "node" : " >=16"
Original file line number Diff line number Diff line change 11import { canBeConvertedToPDF } from './validations' ;
22
3- describe ( 'canBeConvertedToPDF' , ( ) => {
4- it . each `
5- filename | expected
6- ${ 'image.jpg' } | ${ false }
7- ${ 'image.mp4' } | ${ false }
8- ${ 'image.mp3' } | ${ false }
9- ${ 'image.wav' } | ${ false }
10- ${ 'image.chm' } | ${ false }
11- ${ 'image.gdoc' } | ${ false }
12- ${ 'image.dwg' } | ${ false }
13- ${ 'image.docx' } | ${ true }
14- ${ 'image.pdf' } | ${ true }
15- ` ( 'should return $expected for filename $filename' , ( { filename, expected} ) => {
16- expect ( canBeConvertedToPDF ( filename ) ) . toEqual ( expected ) ;
17- } ) ;
3+ it . each `
4+ filename
5+ ${ 'document.docx' }
6+ ${ 'document.pdf' }
7+ ` ( 'should return true for supported filename $filename' , ( { filename} ) => {
8+ expect ( canBeConvertedToPDF ( filename ) ) . toEqual ( true ) ;
9+ } ) ;
10+
11+ it . each `
12+ filename
13+ ${ 'project.mpp' }
14+ ${ 'email.msg' }
15+ ${ 'image.jpg' }
16+ ${ 'video.mp4' }
17+ ${ 'audio.mp3' }
18+ ${ 'sound.wav' }
19+ ${ 'help.chm' }
20+ ${ 'google-doc.gdoc' }
21+ ${ 'drawing.dwg' }
22+ ` ( 'should return false for unsupported filename $filename' , ( { filename} ) => {
23+ expect ( canBeConvertedToPDF ( filename ) ) . toEqual ( false ) ;
1824} ) ;
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ const UNSUPPORTED_FILE_EXTENSIONS = [
1010 '.gslides' ,
1111 '.zip' ,
1212 '.dwg' ,
13+ '.msg' ,
14+ '.mpp' ,
1315] ;
1416
1517export function canBeConvertedToPDF ( filename : string ) : boolean {
You can’t perform that action at this time.
0 commit comments