Skip to content

Commit

Permalink
feat: downlevel .d.ts for older TS versions (#320)
Browse files Browse the repository at this point in the history
allows to use spectator 5.x with Angular 8 with TS 3.5

Signed-off-by: Andrey Chalkin <L2jLiga@gmail.com>
  • Loading branch information
L2jLiga committed Jun 23, 2020
1 parent 5e7800f commit acb0eca
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 3 deletions.
44 changes: 44 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"postinstall": "ngcc",
"ng": "ng",
"build": "ng build --prod && npm run build:schematics && npm run copy:schematics && npm run copy:docs && npm run copy:bin",
"build": "ng build --prod && npm run build:schematics && npm run copy:schematics && npm run copy:docs && npm run copy:bin && npm run downlevel-dts",
"build:schematics": "tsc -p projects/spectator/schematics/tsconfig.json",
"test": "ng test",
"test:jest": "ng run spectator:test-jest",
Expand All @@ -20,6 +20,7 @@
"copy:bin": "cp migrate.js dist/spectator",
"copy:docs": "cp *.md dist/spectator",
"copy:schematics": "cp -r projects/spectator/schematics/src/ dist/spectator/schematics",
"downlevel-dts": "downlevel-dts ./dist/spectator ./dist/spectator/ts3.4",
"postbump": "npm run build",
"release": "cd projects/spectator && standard-version --infile ../../CHANGELOG.md"
},
Expand All @@ -30,7 +31,6 @@
"tslib": "^1.10.0"
},
"devDependencies": {
"git-cz": "^3.2.1",
"@angular-builders/jest": "^8.0.4",
"@angular-devkit/build-angular": "~0.900.1",
"@angular-devkit/build-ng-packagr": "~0.900.1",
Expand All @@ -57,6 +57,8 @@
"core-js": "^2.5.4",
"cross-env": "^5.1.4",
"cz-conventional-changelog": "^2.1.0",
"downlevel-dts": "^0.5.0",
"git-cz": "^3.2.1",
"helpful-decorators": "^1.7.2",
"husky": "^0.14.3",
"jasmine-core": "~3.5.0",
Expand Down
5 changes: 4 additions & 1 deletion projects/spectator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@
"bin": {
"spectator-migrate": "./migrate.js"
},
"schematics": "./schematics/collection.json"
"schematics": "./schematics/collection.json",
"typesVersions": {
"<3.7": { "*": ["ts3.4/*"] }
}
}

0 comments on commit acb0eca

Please sign in to comment.