diff --git a/build.sh b/build.sh index 51aa9fb614..99a571d1be 100755 --- a/build.sh +++ b/build.sh @@ -26,7 +26,8 @@ PACKAGES=(core benchpress) NODE_PACKAGES=(compiler-cli - benchpress) + benchpress + tsc-wrapped) BUILD_ALL=true BUNDLE=true @@ -107,76 +108,36 @@ containsElement () { return 1 } -####################################### -# Downlevel ES2015 to ESM/ES5 -# Arguments: -# param1 - Source folder -# param2 - Naming suffix to apply. Must end in ".ts" (defaults to .es5.ts) -# Returns: -# None -####################################### -downlevelES2015() { - # Iterate over the files in this directory, converting to .es5.ts - regex="(.+).js" - for file in ${1}/*.js ; do - if [[ ${file} =~ $regex ]]; then - ts_file="${BASH_REMATCH[1]}${2:-".es5.ts"}" - cp ${file} ${ts_file} - - echo "====== $TSC ${ts_file} --target es5 --module es2015 --noLib --sourceMap --importHelpers" - ($TSC ${ts_file} --target es5 --module es2015 --noLib --sourceMap --importHelpers) > /dev/null 2>&1 || true - mapSources "${BASH_REMATCH[1]}${2:-".es5.js"}" - rm -f ${ts_file} - fi - done - - # Recurse for sub directories - for DIR in ${1}/* ; do - isIgnoredDirectory ${DIR} && continue - downlevelES2015 ${DIR} - done -} - ####################################### # Rollup index files recursively, ignoring blacklisted directories # Arguments: # param1 - Base source folder # param2 - Destination directory -# param3 - Config file # Returns: # None ####################################### rollupIndex() { # Iterate over the files in this directory, rolling up each into ${2} directory local regex=".+/(.+)/index.js" - if [[ "${1}/index.js" =~ $regex ]]; then - in_file="${1}/index.js" - out_file="${2}/${BASH_REMATCH[1]}.js" + in_file="${1}/index.js" + out_file="${2}/index.js" - echo "====== $ROLLUP -i ${in_file} -o ${out_file}" + BANNER_TEXT=`cat ${LICENSE_BANNER}` - if [[ -f "${3}" ]]; then - $ROLLUP -i ${in_file} -o ${out_file} -c ${3} --sourcemap - else - $ROLLUP -i ${in_file} -o ${out_file} --sourcemap - fi - cat ${LICENSE_BANNER} > ${out_file}.tmp - cat ${out_file} >> ${out_file}.tmp - mv ${out_file}.tmp ${out_file} - - mapSources "${out_file}" - - # Recurse for sub directories - for DIR in ${1}/* ; do - isIgnoredDirectory ${DIR} && continue - # NOTE: We need to re-run this regex and use the new match as Bash doesn't have closures - if [[ "${1}/index.js" =~ $regex ]]; then - rollupIndex ${DIR} ${2}/${BASH_REMATCH[1]} "$(dirname $3)/${BASH_REMATCH[1]}/rollup.config.js" - fi - done + if [[ -f ${in_file} ]]; then + echo "=========== $ROLLUP -i ${in_file} -o ${out_file} -c ${ROOT_DIR}/rollup.config.js --sourcemap" + $ROLLUP -i ${in_file} -o ${out_file} --sourcemap -f es --banner "$BANNER_TEXT" >/dev/null 2>&1 fi -} + # Recurse for sub directories + for DIR in ${1}/* ; do + isIgnoredDirectory ${DIR} && continue + # NOTE: We need to re-run this regex and use the new match as Bash doesn't have closures + if [[ "${DIR}/index.js" =~ $regex ]]; then + rollupIndex ${DIR} ${2}/${BASH_REMATCH[1]} + fi + done +} ####################################### # Recursively runs rollup on any entry point that has a "rollup.config.js" file @@ -186,17 +147,11 @@ rollupIndex() { # None ####################################### runRollup() { - local regex="dest: ['\"](.+)['\"],*" if [[ -f "${1}/rollup.config.js" ]]; then cd ${1} echo "====== $ROLLUP -c ${1}/rollup.config.js" - $ROLLUP -c rollup.config.js --sourcemap - - local dest_line=$(cat "${1}/rollup.config.js" | grep 'dest:') - if [[ ${dest_line} =~ $regex ]]; then - mapSources "${BASH_REMATCH[1]}" - fi + $ROLLUP -c rollup.config.js --sourcemap >/dev/null 2>&1 # Recurse for sub directories for DIR in ${1}/* ; do @@ -241,7 +196,6 @@ minify() { if [[ "${base_file}" =~ $regex && "${base_file##*.}" != "map" ]]; then local out_file=$(dirname "${file}")/${BASH_REMATCH[1]}.min.js $UGLIFYJS -c --screw-ie8 --comments -o ${out_file} --source-map ${out_file}.map --source-map-include-sources ${file} - mapSources "${out_file}" fi done } @@ -252,19 +206,18 @@ minify() { # param1 - Source directory # param2 - Out dir # param3 - Package Name -# param4 - Is child (are we recursing?) # Returns: # None ####################################### compilePackage() { echo "====== [${3}]: COMPILING: ${NGC} -p ${1}/tsconfig-build.json" # For NODE_PACKAGES items (not getting rolled up) - if containsElement "${PACKAGE}" "${NODE_PACKAGES[@]}"; then + if containsElement "${3}" "${NODE_PACKAGES[@]}"; then $TSC -p ${1}/tsconfig-build.json else local package_name=$(basename "${2}") $NGC -p ${1}/tsconfig-build.json - echo "====== Create ${1}/../${package_name}.d.ts re-export file for Closure" + echo "====== Create ${1}/../${package_name}.d.ts re-export file for tsickle" echo "$(cat ${LICENSE_BANNER}) ${N} export * from './${package_name}/index'" > ${2}/../${package_name}.d.ts echo "{\"__symbolic\":\"module\",\"version\":3,\"metadata\":{},\"exports\":[{\"from\":\"./${package_name}/index\"}],\"flatModuleIndexRedirect\":true}" > ${2}/../${package_name}.metadata.json fi @@ -274,24 +227,31 @@ compilePackage() { BASE_DIR=$(basename "${DIR}") # Skip over directories that are not nested entry points [[ -e ${DIR}/tsconfig-build.json && "${BASE_DIR}" != "integrationtest" ]] || continue - compilePackage ${DIR} ${2}/${BASE_DIR} ${3} true + compilePackage ${DIR} ${2}/${BASE_DIR} ${3} done } ####################################### -# Moves typings and metadata files appropriately +# Recursively compile package # Arguments: -# param1 - Source of typings & metadata files -# param2 - Root of destination directory -# param3 - Package name (needed to correspond to name of d.ts and metadata.json files) +# param1 - Source directory +# param2 - Out dir +# param3 - Package Name # Returns: # None ####################################### -moveTypings() { - if [[ -f ${1}/index.d.ts && -f ${1}/index.metadata.json ]]; then - mv ${1}/index.d.ts ${1}/${2}.d.ts - mv ${1}/index.metadata.json ${1}/${2}.metadata.json - fi +compilePackageES5() { + echo "====== [${3}]: COMPILING: ${NGC} -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap" + local package_name=$(basename "${2}") + $NGC -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap + + for DIR in ${1}/* ; do + [ -d "${DIR}" ] || continue + BASE_DIR=$(basename "${DIR}") + # Skip over directories that are not nested entry points + [[ -e ${DIR}/tsconfig-build.json && "${BASE_DIR}" != "integrationtest" ]] || continue + compilePackageES5 ${DIR} ${2} ${3} + done } ####################################### @@ -314,19 +274,6 @@ addNgcPackageJson() { done } -####################################### -# This is read by NGC to be able to find the flat module index. -# Arguments: -# param1 - JavaScript file on which to re-map sources -# Returns: -# None -####################################### -mapSources() { - if [[ -f "${1}.map" ]]; then - $MAP_SOURCES -f "${1}" - fi -} - updateVersionReferences() { NPM_DIR="$1" ( @@ -343,8 +290,7 @@ echo "====== BUILDING: Version ${VERSION}" N=" " TSC=`pwd`/node_modules/.bin/tsc -NGC="node --max-old-space-size=3000 dist/packages-dist/tsc-wrapped/src/main" -MAP_SOURCES="node `pwd`/scripts/build/map_sources.js " +NGC="node --max-old-space-size=3000 `pwd`/dist/packages-dist/tsc-wrapped/src/main" UGLIFYJS=`pwd`/node_modules/.bin/uglifyjs TSCONFIG=./tools/tsconfig.json ROLLUP=`pwd`/node_modules/.bin/rollup @@ -446,8 +392,10 @@ do SRC_DIR=${ROOT_DIR}/${PACKAGE} ROOT_OUT_DIR=${PWD}/dist/packages OUT_DIR=${ROOT_OUT_DIR}/${PACKAGE} + OUT_DIR_ESM5=${ROOT_OUT_DIR}/${PACKAGE}/esm5 NPM_DIR=${PWD}/dist/packages-dist/${PACKAGE} - MODULES_DIR=${NPM_DIR}/@angular + ESM15_DIR=${NPM_DIR}/esm15 + ESM5_DIR=${NPM_DIR}/esm5 BUNDLES_DIR=${NPM_DIR}/bundles LICENSE_BANNER=${ROOT_DIR}/license-banner.txt @@ -466,15 +414,15 @@ do echo "====== Copy ${PACKAGE} typings" rsync -a --exclude=*.js --exclude=*.js.map ${OUT_DIR}/ ${NPM_DIR} - moveTypings ${NPM_DIR} ${PACKAGE} ( cd ${SRC_DIR} echo "====== Rollup ${PACKAGE}" - rollupIndex ${OUT_DIR} ${MODULES_DIR} ${ROOT_DIR} + rollupIndex ${OUT_DIR} ${ESM15_DIR} ${ROOT_DIR} - echo "====== Downleveling ES2015 to ESM/ES5" - downlevelES2015 ${MODULES_DIR} + echo "====== Produce ESM5 version" + compilePackageES5 ${SRC_DIR} ${OUT_DIR_ESM5} ${PACKAGE} + rollupIndex ${OUT_DIR_ESM5} ${ESM5_DIR} ${ROOT_DIR} echo "====== Run rollup conversions on ${PACKAGE}" runRollup ${SRC_DIR} diff --git a/integration/hello_world__closure/closure.conf b/integration/hello_world__closure/closure.conf index 8393a38b29..ba4bd6e1f1 100644 --- a/integration/hello_world__closure/closure.conf +++ b/integration/hello_world__closure/closure.conf @@ -13,18 +13,20 @@ node_modules/zone.js/dist/zone_externs.js --js node_modules/rxjs/**.js ---process_common_js_modules + +--js node_modules/@angular/core/package.json +--js node_modules/@angular/core/esm15/index.js +--js node_modules/@angular/core/src/testability/testability.externs.js + +--js node_modules/@angular/common/package.json +--js node_modules/@angular/common/esm15/index.js + +--js node_modules/@angular/platform-browser/package.json +--js node_modules/@angular/platform-browser/esm15/index.js + --module_resolution=node - -node_modules/@angular/core/@angular/core.js ---js_module_root=node_modules/@angular/core -node_modules/@angular/core/src/testability/testability.externs.js - -node_modules/@angular/common/@angular/common.js ---js_module_root=node_modules/@angular/common - -node_modules/@angular/platform-browser/@angular/platform-browser.js ---js_module_root=node_modules/@angular/platform-browser +--package_json_entry_names es2015 +--process_common_js_modules --js built/**.js --entry_point=built/src/main diff --git a/integration/hello_world__closure/package.json b/integration/hello_world__closure/package.json index 14d555606d..c2fa872634 100644 --- a/integration/hello_world__closure/package.json +++ b/integration/hello_world__closure/package.json @@ -11,7 +11,7 @@ "@angular/platform-browser": "file:../../dist/packages-dist/platform-browser", "@angular/platform-server": "file:../../dist/packages-dist/platform-server", "@angular/tsc-wrapped": "file:../../dist/packages-dist/tsc-wrapped", - "google-closure-compiler": "20170409.0.0", + "google-closure-compiler": "git+https://github.com/alexeagle/closure-compiler.git#packagejson.dist", "rxjs": "5.3.1", "typescript": "~2.3.1", "zone.js": "0.8.6" @@ -29,4 +29,4 @@ "preprotractor": "tsc -p e2e", "protractor": "protractor e2e/protractor.config.js" } -} \ No newline at end of file +} diff --git a/integration/i18n/closure.conf b/integration/i18n/closure.conf index 8393a38b29..5d66c749e3 100644 --- a/integration/i18n/closure.conf +++ b/integration/i18n/closure.conf @@ -15,16 +15,17 @@ node_modules/zone.js/dist/zone_externs.js --js node_modules/rxjs/**.js --process_common_js_modules --module_resolution=node +--package_json_entry_names es2015 -node_modules/@angular/core/@angular/core.js ---js_module_root=node_modules/@angular/core -node_modules/@angular/core/src/testability/testability.externs.js +--js node_modules/@angular/core/package.json +--js node_modules/@angular/core/esm15/index.js +--js node_modules/@angular/core/src/testability/testability.externs.js -node_modules/@angular/common/@angular/common.js ---js_module_root=node_modules/@angular/common +--js node_modules/@angular/common/package.json +--js node_modules/@angular/common/esm15/index.js -node_modules/@angular/platform-browser/@angular/platform-browser.js ---js_module_root=node_modules/@angular/platform-browser +--js node_modules/@angular/platform-browser/package.json +--js node_modules/@angular/platform-browser/esm15/index.js --js built/**.js --entry_point=built/src/main diff --git a/integration/i18n/package.json b/integration/i18n/package.json index 14d555606d..812fa878ce 100644 --- a/integration/i18n/package.json +++ b/integration/i18n/package.json @@ -11,7 +11,7 @@ "@angular/platform-browser": "file:../../dist/packages-dist/platform-browser", "@angular/platform-server": "file:../../dist/packages-dist/platform-server", "@angular/tsc-wrapped": "file:../../dist/packages-dist/tsc-wrapped", - "google-closure-compiler": "20170409.0.0", + "google-closure-compiler": "git+https://github.com/alexeagle/closure-compiler.git#packagejson.dist", "rxjs": "5.3.1", "typescript": "~2.3.1", "zone.js": "0.8.6" diff --git a/npm-shrinkwrap.clean.json b/npm-shrinkwrap.clean.json index 7e6140e441..305f5095bf 100644 --- a/npm-shrinkwrap.clean.json +++ b/npm-shrinkwrap.clean.json @@ -1,20 +1,17 @@ { "name": "angular-srcs", - "version": "5.0.0-beta.4", + "version": "5.0.0-beta.5", "dependencies": { "@bazel/typescript": { "version": "0.0.7", "dependencies": { "@types/node": { "version": "7.0.18" - }, - "tsickle": { - "version": "0.23.6" } } }, "@google-cloud/common": { - "version": "0.13.4", + "version": "0.13.5", "dependencies": { "array-uniq": { "version": "1.0.3" @@ -477,6 +474,9 @@ "asynckit": { "version": "0.4.0" }, + "atob": { + "version": "2.0.3" + }, "aws-sign2": { "version": "0.6.0" }, @@ -1871,10 +1871,10 @@ "version": "4.17.4" }, "mime-db": { - "version": "1.27.0" + "version": "1.29.0" }, "mime-types": { - "version": "2.1.15" + "version": "2.1.16" }, "minimist": { "version": "0.0.8" @@ -2491,7 +2491,7 @@ "version": "1.0.0" }, "es5-ext": { - "version": "0.10.29" + "version": "0.10.30" }, "es6-iterator": { "version": "2.0.1" @@ -2531,7 +2531,7 @@ "version": "4.2.0" }, "estree-walker": { - "version": "0.2.1" + "version": "0.3.1" }, "esutils": { "version": "1.1.6" @@ -4885,7 +4885,7 @@ "version": "2.0.0" }, "nan": { - "version": "2.6.2" + "version": "2.7.0" }, "node-pre-gyp": { "version": "0.6.36" @@ -5729,7 +5729,7 @@ } }, "magic-string": { - "version": "0.16.0" + "version": "0.19.1" }, "make-dir": { "version": "1.0.0" @@ -6204,6 +6204,9 @@ "path-key": { "version": "2.0.1" }, + "path-parse": { + "version": "1.0.5" + }, "path-to-regexp": { "version": "0.1.7" }, @@ -6581,6 +6584,9 @@ "resolve": { "version": "1.1.6" }, + "resolve-url": { + "version": "0.2.1" + }, "response-time": { "version": "2.3.1" }, @@ -6677,24 +6683,32 @@ "version": "1.1.0" }, "rollup": { - "version": "0.41.6" + "version": "0.47.4" }, "rollup-plugin-commonjs": { - "version": "5.0.5", + "version": "8.1.0", "dependencies": { "acorn": { - "version": "4.0.3" + "version": "4.0.13" }, "resolve": { - "version": "1.1.7" + "version": "1.4.0" } } }, "rollup-plugin-node-resolve": { "version": "3.0.0" }, + "rollup-plugin-sourcemaps": { + "version": "0.4.2" + }, "rollup-pluginutils": { - "version": "1.5.2" + "version": "2.0.1", + "dependencies": { + "micromatch": { + "version": "2.3.11" + } + } }, "router": { "version": "1.3.1", @@ -6980,6 +6994,9 @@ "source-map": { "version": "0.5.6" }, + "source-map-resolve": { + "version": "0.5.0" + }, "source-map-support": { "version": "0.4.2", "dependencies": { @@ -6993,6 +7010,9 @@ } } }, + "source-map-url": { + "version": "0.4.0" + }, "sourcemap-codec": { "version": "1.3.0" }, @@ -7409,7 +7429,7 @@ } }, "tsickle": { - "version": "0.23.4" + "version": "0.23.6" }, "tslib": { "version": "1.7.1" @@ -7558,6 +7578,9 @@ "upper-case-first": { "version": "1.1.2" }, + "urix": { + "version": "0.1.0" + }, "url": { "version": "0.10.3", "dependencies": { diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 641f10ca15..d1419e69ab 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,28 +1,23 @@ { "name": "angular-srcs", - "version": "5.0.0-beta.4", + "version": "5.0.0-beta.5", "dependencies": { "@bazel/typescript": { "version": "0.0.7", - "from": "@bazel/typescript@latest", + "from": "@bazel/typescript@0.0.7", "resolved": "https://registry.npmjs.org/@bazel/typescript/-/typescript-0.0.7.tgz", "dependencies": { "@types/node": { "version": "7.0.18", "from": "@types/node@7.0.18", "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.18.tgz" - }, - "tsickle": { - "version": "0.23.6", - "from": "tsickle@0.23.6", - "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.23.6.tgz" } } }, "@google-cloud/common": { - "version": "0.13.4", + "version": "0.13.5", "from": "@google-cloud/common@>=0.13.0 <0.14.0", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.13.4.tgz", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.13.5.tgz", "dependencies": { "array-uniq": { "version": "1.0.3", @@ -61,12 +56,12 @@ }, "qs": { "version": "6.4.0", - "from": "qs@~6.4.0", + "from": "qs@>=6.4.0 <6.5.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" }, "readable-stream": { "version": "2.3.3", - "from": "readable-stream@^2.1.5", + "from": "readable-stream@>=2.1.5 <3.0.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", "dependencies": { "safe-buffer": { @@ -78,7 +73,7 @@ }, "request": { "version": "2.81.0", - "from": "request@^2.79.0", + "from": "request@>=2.79.0 <3.0.0", "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz" }, "string_decoder": { @@ -395,7 +390,7 @@ "dependencies": { "async": { "version": "2.5.0", - "from": "async@>=2.0.1 <3.0.0", + "from": "async@^2.0.1", "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz" }, "inherits": { @@ -415,7 +410,7 @@ }, "readable-stream": { "version": "2.3.3", - "from": "readable-stream@^2.1.5", + "from": "readable-stream@>=2.1.5 <3.0.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" }, "safe-buffer": { @@ -775,6 +770,11 @@ "from": "asynckit@>=0.4.0 <0.5.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" }, + "atob": { + "version": "2.0.3", + "from": "atob@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.0.3.tgz" + }, "aws-sign2": { "version": "0.6.0", "from": "aws-sign2@>=0.6.0 <0.7.0", @@ -2909,7 +2909,7 @@ }, "cldr-data-downloader": { "version": "0.3.2", - "from": "cldr-data-downloader@>=0.3.0 <0.4.0", + "from": "cldr-data-downloader@>=0.3.2 <0.4.0", "resolved": "https://registry.npmjs.org/cldr-data-downloader/-/cldr-data-downloader-0.3.2.tgz", "dependencies": { "adm-zip": { @@ -2943,14 +2943,14 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" }, "mime-db": { - "version": "1.27.0", - "from": "mime-db@>=1.27.0 <1.28.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz" + "version": "1.29.0", + "from": "mime-db@>=1.29.0 <1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz" }, "mime-types": { - "version": "2.1.15", + "version": "2.1.16", "from": "mime-types@>=2.1.7 <2.2.0", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz" + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz" }, "minimist": { "version": "0.0.8", @@ -2991,7 +2991,7 @@ }, "cldrjs": { "version": "0.5.0", - "from": "cldrjs@0.5.0", + "from": "cldrjs@>=0.5.0 <0.6.0", "resolved": "https://registry.npmjs.org/cldrjs/-/cldrjs-0.5.0.tgz" }, "cli-boxes": { @@ -3227,7 +3227,7 @@ "dependencies": { "qs": { "version": "6.4.0", - "from": "qs@~6.4.0", + "from": "qs@>=6.4.0 <6.5.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" } } @@ -3504,7 +3504,7 @@ }, "readable-stream": { "version": "2.0.6", - "from": "readable-stream@>=2.0.0 <2.1.0", + "from": "readable-stream@~2.0.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz" }, "through2": { @@ -3767,7 +3767,7 @@ "dependencies": { "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <1.1.0", + "from": "isarray@~1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" }, "readable-stream": { @@ -3943,9 +3943,9 @@ "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz" }, "es5-ext": { - "version": "0.10.29", + "version": "0.10.30", "from": "es5-ext@>=0.10.14 <0.11.0", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.29.tgz" + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.30.tgz" }, "es6-iterator": { "version": "2.0.1", @@ -4007,9 +4007,9 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz" }, "estree-walker": { - "version": "0.2.1", - "from": "estree-walker@>=0.2.1 <0.3.0", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.2.1.tgz" + "version": "0.3.1", + "from": "estree-walker@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.3.1.tgz" }, "esutils": { "version": "1.1.6", @@ -4494,7 +4494,7 @@ }, "readable-stream": { "version": "2.3.3", - "from": "readable-stream@^2.0.5", + "from": "readable-stream@>=2.0.5 <3.0.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" }, "string_decoder": { @@ -4592,7 +4592,7 @@ }, "lodash": { "version": "4.17.4", - "from": "lodash@>=4.6.1 <5.0.0", + "from": "lodash@^4.6.1", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" }, "mime-db": { @@ -4622,7 +4622,7 @@ }, "qs": { "version": "6.4.0", - "from": "qs@~6.4.0", + "from": "qs@>=6.4.0 <6.5.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" }, "readable-stream": { @@ -4672,7 +4672,7 @@ }, "readable-stream": { "version": "2.3.3", - "from": "readable-stream@^2.0.0", + "from": "readable-stream@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" }, "string_decoder": { @@ -5600,12 +5600,12 @@ }, "mime-db": { "version": "1.29.0", - "from": "mime-db@>=1.29.0 <1.30.0", + "from": "mime-db@~1.29.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz" }, "mime-types": { "version": "2.1.16", - "from": "mime-types@>=2.1.7 <2.2.0", + "from": "mime-types@~2.1.7", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz" }, "qs": { @@ -5615,7 +5615,7 @@ }, "readable-stream": { "version": "2.3.3", - "from": "readable-stream@^2.1.5", + "from": "readable-stream@>=2.1.5 <3.0.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", "dependencies": { "safe-buffer": { @@ -5627,7 +5627,7 @@ }, "request": { "version": "2.81.0", - "from": "request@^2.81.0", + "from": "request@>=2.81.0 <3.0.0", "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz" }, "retry-request": { @@ -5654,7 +5654,7 @@ }, "tough-cookie": { "version": "2.3.2", - "from": "tough-cookie@>=2.3.0 <2.4.0", + "from": "tough-cookie@~2.3.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz" }, "tunnel-agent": { @@ -5721,12 +5721,12 @@ }, "qs": { "version": "6.4.0", - "from": "qs@~6.4.0", + "from": "qs@>=6.4.0 <6.5.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" }, "readable-stream": { "version": "2.3.3", - "from": "readable-stream@^2.1.5", + "from": "readable-stream@>=2.1.5 <3.0.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", "dependencies": { "safe-buffer": { @@ -5738,7 +5738,7 @@ }, "request": { "version": "2.81.0", - "from": "request@^2.81.0", + "from": "request@>=2.81.0 <3.0.0", "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz" }, "signal-exit": { @@ -6043,12 +6043,12 @@ }, "qs": { "version": "6.4.0", - "from": "qs@~6.4.0", + "from": "qs@>=6.4.0 <6.5.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" }, "request": { "version": "2.81.0", - "from": "request@^2.74.0", + "from": "request@>=2.74.0 <3.0.0", "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz" }, "tough-cookie": { @@ -6105,12 +6105,12 @@ }, "qs": { "version": "6.4.0", - "from": "qs@~6.4.0", + "from": "qs@>=6.4.0 <6.5.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" }, "request": { "version": "2.81.0", - "from": "request@^2.79.0", + "from": "request@>=2.79.0 <3.0.0", "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz" }, "tough-cookie": { @@ -6963,12 +6963,12 @@ }, "qs": { "version": "6.4.0", - "from": "qs@~6.4.0", + "from": "qs@>=6.4.0 <6.5.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" }, "request": { "version": "2.81.0", - "from": "request@^2.72.0", + "from": "request@>=2.72.0 <3.0.0", "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz" }, "tough-cookie": { @@ -7305,7 +7305,7 @@ }, "readable-stream": { "version": "2.3.3", - "from": "readable-stream@^2.1.5", + "from": "readable-stream@>=2.1.5 <3.0.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" }, "safe-buffer": { @@ -7781,9 +7781,9 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" }, "nan": { - "version": "2.6.2", + "version": "2.7.0", "from": "nan@>=2.6.1 <3.0.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz" + "resolved": "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz" }, "node-pre-gyp": { "version": "0.6.36", @@ -9145,9 +9145,9 @@ } }, "magic-string": { - "version": "0.16.0", - "from": "magic-string@>=0.16.0 <0.17.0", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.16.0.tgz" + "version": "0.19.1", + "from": "magic-string@>=0.19.0 <0.20.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.19.1.tgz" }, "make-dir": { "version": "1.0.0", @@ -9510,7 +9510,7 @@ }, "qs": { "version": "6.4.0", - "from": "qs@~6.4.0", + "from": "qs@>=6.4.0 <6.5.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" }, "rc": { @@ -9520,7 +9520,7 @@ }, "request": { "version": "2.81.0", - "from": "request@^2.81.0", + "from": "request@>=2.81.0 <3.0.0", "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz" }, "rimraf": { @@ -9530,7 +9530,7 @@ }, "semver": { "version": "5.4.1", - "from": "semver@^5.3.0", + "from": "semver@>=5.3.0 <6.0.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz" }, "strip-json-comments": { @@ -9920,6 +9920,11 @@ "from": "path-key@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz" }, + "path-parse": { + "version": "1.0.5", + "from": "path-parse@>=1.0.5 <2.0.0", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz" + }, "path-to-regexp": { "version": "0.1.7", "from": "path-to-regexp@0.1.7", @@ -10531,6 +10536,11 @@ "from": "resolve@>=1.1.4 <2.0.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.6.tgz" }, + "resolve-url": { + "version": "0.2.1", + "from": "resolve-url@>=0.2.1 <0.3.0", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz" + }, "response-time": { "version": "2.3.1", "from": "response-time@>=2.3.1 <2.4.0", @@ -10583,12 +10593,12 @@ }, "qs": { "version": "6.4.0", - "from": "qs@~6.4.0", + "from": "qs@>=6.4.0 <6.5.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" }, "readable-stream": { "version": "2.3.3", - "from": "readable-stream@^2.1.5", + "from": "readable-stream@>=2.1.5 <3.0.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", "dependencies": { "safe-buffer": { @@ -10600,7 +10610,7 @@ }, "request": { "version": "2.81.0", - "from": "request@^2.81.0", + "from": "request@>=2.81.0 <3.0.0", "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz" }, "string_decoder": { @@ -10685,24 +10695,24 @@ "resolved": "https://registry.npmjs.org/roadrunner/-/roadrunner-1.1.0.tgz" }, "rollup": { - "version": "0.41.6", - "from": "rollup@0.41.6", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.41.6.tgz" + "version": "0.47.4", + "from": "rollup@0.47.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.47.4.tgz" }, "rollup-plugin-commonjs": { - "version": "5.0.5", - "from": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-5.0.5.tgz", - "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-5.0.5.tgz", + "version": "8.1.0", + "from": "rollup-plugin-commonjs@8.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.1.0.tgz", "dependencies": { "acorn": { - "version": "4.0.3", + "version": "4.0.13", "from": "acorn@>=4.0.1 <5.0.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.3.tgz" + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz" }, "resolve": { - "version": "1.1.7", + "version": "1.4.0", "from": "resolve@>=1.1.7 <2.0.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz" + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz" } } }, @@ -10711,10 +10721,22 @@ "from": "rollup-plugin-node-resolve@latest", "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.0.0.tgz" }, + "rollup-plugin-sourcemaps": { + "version": "0.4.2", + "from": "rollup-plugin-sourcemaps@0.4.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.4.2.tgz" + }, "rollup-pluginutils": { - "version": "1.5.2", - "from": "rollup-pluginutils@>=1.5.1 <2.0.0", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz" + "version": "2.0.1", + "from": "rollup-pluginutils@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz", + "dependencies": { + "micromatch": { + "version": "2.3.11", + "from": "micromatch@>=2.3.11 <3.0.0", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz" + } + } }, "router": { "version": "1.3.1", @@ -11052,7 +11074,7 @@ }, "readable-stream": { "version": "2.3.3", - "from": "readable-stream@^2.0.2", + "from": "readable-stream@>=2.0.2 <3.0.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" }, "safe-buffer": { @@ -11172,6 +11194,11 @@ "from": "source-map@latest", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" }, + "source-map-resolve": { + "version": "0.5.0", + "from": "source-map-resolve@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.0.tgz" + }, "source-map-support": { "version": "0.4.2", "from": "source-map-support@latest", @@ -11191,6 +11218,11 @@ } } }, + "source-map-url": { + "version": "0.4.0", + "from": "source-map-url@>=0.4.0 <0.5.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz" + }, "sourcemap-codec": { "version": "1.3.0", "from": "sourcemap-codec@>=1.3.0 <2.0.0", @@ -11665,7 +11697,7 @@ }, "readable-stream": { "version": "2.3.3", - "from": "readable-stream@^2.1.4", + "from": "readable-stream@>=2.1.4 <3.0.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", "dependencies": { "inherits": { @@ -11865,9 +11897,9 @@ } }, "tsickle": { - "version": "0.23.4", - "from": "tsickle@0.23.4", - "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.23.4.tgz" + "version": "0.23.6", + "from": "tsickle@0.23.6", + "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.23.6.tgz" }, "tslib": { "version": "1.7.1", @@ -12106,6 +12138,11 @@ "from": "upper-case-first@>=1.1.0 <2.0.0", "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-1.1.2.tgz" }, + "urix": { + "version": "0.1.0", + "from": "urix@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz" + }, "url": { "version": "0.10.3", "from": "url@>=0.10.1 <0.11.0", diff --git a/package.json b/package.json index 76a7ce7453..e20fb47f26 100644 --- a/package.json +++ b/package.json @@ -87,9 +87,10 @@ "react": "^0.14.0", "rewire": "^2.3.3", "rho": "^0.3.0", - "rollup": "^0.41.6", - "rollup-plugin-commonjs": "^5.0.5", + "rollup": "^0.47.4", + "rollup-plugin-commonjs": "^8.1.0", "rollup-plugin-node-resolve": "^3.0.0", + "rollup-plugin-sourcemaps": "^0.4.2", "selenium-webdriver": "^2.53.3", "semver": "^5.1.0", "sorcery": "^0.10.0", @@ -97,7 +98,7 @@ "source-map-support": "^0.4.2", "systemjs": "0.18.10", "ts-api-guardian": "^0.2.2", - "tsickle": "^0.23.4", + "tsickle": "^0.23.6", "tslint": "^4.1.1", "tslint-eslint-rules": "^3.1.0", "typescript": "^2.3.4", diff --git a/packages/animations/browser/index.ts b/packages/animations/browser/index.ts index ffe366afa1..05e6b19532 100644 --- a/packages/animations/browser/index.ts +++ b/packages/animations/browser/index.ts @@ -11,4 +11,4 @@ // replaces this file with production index.ts when it rewrites private symbol // names. -export * from './src/browser'; +export * from './public_api'; diff --git a/packages/animations/browser/package.json b/packages/animations/browser/package.json index b9d1595a1f..85410894f5 100644 --- a/packages/animations/browser/package.json +++ b/packages/animations/browser/package.json @@ -1,7 +1,7 @@ { "name": "@angular/animations/browser", - "typings": "../browser.d.ts", + "typings": "./index.d.ts", "main": "../bundles/animations-browser.umd.js", - "module": "../@angular/animations/browser.es5.js", - "es2015": "../@angular/animations/browser.js" + "module": "../esm5/browser/index.js", + "es2015": "../esm15/browser/index.js" } diff --git a/packages/animations/browser/public_api.ts b/packages/animations/browser/public_api.ts index 9275e0d9de..172ca60bd4 100644 --- a/packages/animations/browser/public_api.ts +++ b/packages/animations/browser/public_api.ts @@ -9,6 +9,6 @@ /** * @module * @description - * Entry point for all public APIs of the animation package. + * Entry point for all public APIs of this package. */ export * from './src/browser'; diff --git a/packages/animations/browser/rollup.config.js b/packages/animations/browser/rollup.config.js index 736888fbff..94d4133ff1 100644 --- a/packages/animations/browser/rollup.config.js +++ b/packages/animations/browser/rollup.config.js @@ -7,6 +7,7 @@ */ import resolve from 'rollup-plugin-node-resolve'; +import sourcemaps from 'rollup-plugin-sourcemaps'; const globals = { '@angular/core': 'ng.core', @@ -15,12 +16,12 @@ const globals = { }; export default { - entry: '../../../dist/packages-dist/animations/@angular/animations/browser.es5.js', + entry: '../../../dist/packages-dist/animations/esm5/browser/index.js', dest: '../../../dist/packages-dist/animations/bundles/animations-browser.umd.js', format: 'umd', exports: 'named', moduleName: 'ng.animations.browser', - plugins: [resolve()], + plugins: [resolve(), sourcemaps()], external: Object.keys(globals), globals: globals }; diff --git a/packages/animations/browser/testing/index.ts b/packages/animations/browser/testing/index.ts index 1bec069535..05e6b19532 100644 --- a/packages/animations/browser/testing/index.ts +++ b/packages/animations/browser/testing/index.ts @@ -6,10 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ -/** - * @module - * @description - * Entry point for all public APIs of the platform-browser/animations/testing package. - */ +// This file is not used to build this module. It is only used during editing +// by the TypeScript language serivce and during build for verifcation. `ngc` +// replaces this file with production index.ts when it rewrites private symbol +// names. -export * from './src/testing'; +export * from './public_api'; diff --git a/packages/animations/browser/testing/package.json b/packages/animations/browser/testing/package.json index 04ca9981ce..173b8c5a57 100644 --- a/packages/animations/browser/testing/package.json +++ b/packages/animations/browser/testing/package.json @@ -1,7 +1,7 @@ { "name": "@angular/animations/browser/testing", - "typings": "../testing.d.ts", + "typings": "./index.d.ts", "main": "../../bundles/platform-browser-animations-testing.umd.js", - "module": "../../@angular/platform-browser/animations/testing.es5.js", - "es2015": "../../@angular/platform-browser/animations/testing.js" + "module": "../../esm5/animations/testing/index.js", + "es2015": "../../esm15/animations/testing/index.js" } diff --git a/packages/animations/browser/testing/public_api.ts b/packages/animations/browser/testing/public_api.ts new file mode 100644 index 0000000000..fcc511dc6e --- /dev/null +++ b/packages/animations/browser/testing/public_api.ts @@ -0,0 +1,14 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +/** + * @module + * @description + * Entry point for all public APIs of this package. + */ +export * from './src/testing'; diff --git a/packages/animations/browser/testing/rollup.config.js b/packages/animations/browser/testing/rollup.config.js index 05795686c9..04864d6044 100644 --- a/packages/animations/browser/testing/rollup.config.js +++ b/packages/animations/browser/testing/rollup.config.js @@ -7,20 +7,22 @@ */ import resolve from 'rollup-plugin-node-resolve'; +import sourcemaps from 'rollup-plugin-sourcemaps'; const globals = { '@angular/core': 'ng.core', + '@angular/animations': 'ng.animations', 'rxjs/Observable': 'Rx', 'rxjs/Subject': 'Rx', }; export default { - entry: '../../../../dist/packages-dist/animations/@angular/animations/browser/testing.es5.js', + entry: '../../../../dist/packages-dist/animations/esm5/browser/testing/index.js', dest: '../../../../dist/packages-dist/animations/bundles/animations-browser-testing.umd.js', format: 'umd', exports: 'named', moduleName: 'ng.animations.browser.testing', - plugins: [resolve()], + plugins: [resolve(), sourcemaps()], external: Object.keys(globals), globals: globals }; diff --git a/packages/animations/browser/testing/tsconfig-build.json b/packages/animations/browser/testing/tsconfig-build.json index fea449e67c..9d4e4b6f26 100644 --- a/packages/animations/browser/testing/tsconfig-build.json +++ b/packages/animations/browser/testing/tsconfig-build.json @@ -1,17 +1,26 @@ { - "extends": "../../tsconfig-build", + "extends": "../tsconfig-build.json", + "compilerOptions": { + "baseUrl": ".", + "rootDir": "../../", "paths": { - "@angular/animations": ["../../dist/packages/animations"] - } + "@angular/animations": ["../../../../dist/packages/animations"] + }, + "outDir": "../../../../dist/packages/animations" }, + "files": [ - "index.ts", + "public_api.ts", "../../../../node_modules/@types/hammerjs/index.d.ts", "../../../../node_modules/@types/jasmine/index.d.ts", "../../../../node_modules/zone.js/dist/zone.js.d.ts" ], + "angularCompilerOptions": { - "strictMetadataEmit": true + "annotateForClosureCompiler": true, + "strictMetadataEmit": true, + "flatModuleOutFile": "index.js", + "flatModuleId": "@angular/animations/browser/testing" } } diff --git a/packages/animations/browser/tsconfig-build.json b/packages/animations/browser/tsconfig-build.json index 769bd13ed6..5765900012 100644 --- a/packages/animations/browser/tsconfig-build.json +++ b/packages/animations/browser/tsconfig-build.json @@ -1,16 +1,21 @@ { - "extends": "../tsconfig-build", + "extends": "../tsconfig-build.json", "compilerOptions": { + "baseUrl": ".", + "rootDir": "../", "paths": { - "@angular/animations": ["../../dist/packages/animations"] - } + "@angular/animations": ["../../../dist/packages/animations"] + }, + "outDir": "../../../dist/packages/animations" }, + "files": [ "public_api.ts", "../../../node_modules/zone.js/dist/zone.js.d.ts", "../../system.d.ts" ], + "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, diff --git a/packages/animations/package.json b/packages/animations/package.json index 3e45a0ab25..0de5289fc1 100644 --- a/packages/animations/package.json +++ b/packages/animations/package.json @@ -3,9 +3,9 @@ "version": "0.0.0-PLACEHOLDER", "description": "Angular - animations integration with web-animationss", "main": "./bundles/animations.umd.js", - "module": "./@angular/animations.es5.js", - "es2015": "./@angular/animations.js", - "typings": "./animations.d.ts", + "module": "./esm5/index.js", + "es2015": "./esm15/index.js", + "typings": "./index.d.ts", "author": "angular", "license": "MIT", "dependencies": { diff --git a/packages/animations/public_api.ts b/packages/animations/public_api.ts index 698d901fbd..3ebc27ff03 100644 --- a/packages/animations/public_api.ts +++ b/packages/animations/public_api.ts @@ -9,6 +9,6 @@ /** * @module * @description - * Entry point for all public APIs of the animation package. + * Entry point for all public APIs of this package. */ export * from './src/animations'; diff --git a/packages/animations/rollup.config.js b/packages/animations/rollup.config.js index 3aa92bc6e4..4807c7f73c 100644 --- a/packages/animations/rollup.config.js +++ b/packages/animations/rollup.config.js @@ -7,20 +7,22 @@ */ import resolve from 'rollup-plugin-node-resolve'; +import sourcemaps from 'rollup-plugin-sourcemaps'; const globals = { '@angular/core': 'ng.core', + '@angular/animations': 'ng.animations', 'rxjs/Observable': 'Rx', 'rxjs/Subject': 'Rx', }; export default { - entry: '../../dist/packages-dist/animations/@angular/animations.es5.js', + entry: '../../dist/packages-dist/animations/esm5/index.js', dest: '../../dist/packages-dist/animations/bundles/animations.umd.js', format: 'umd', exports: 'named', moduleName: 'ng.animations', - plugins: [resolve()], + plugins: [resolve(), sourcemaps()], external: Object.keys(globals), globals: globals }; diff --git a/packages/animations/tsconfig-build.json b/packages/animations/tsconfig-build.json index d7a6f6f347..4811cc8194 100644 --- a/packages/animations/tsconfig-build.json +++ b/packages/animations/tsconfig-build.json @@ -1,29 +1,19 @@ { + "extends": "../tsconfig-build.json", + "compilerOptions": { "baseUrl": ".", - "declaration": true, - "stripInternal": true, - "experimentalDecorators": true, - "module": "es2015", - "moduleResolution": "node", - "outDir": "../../dist/packages/animations", - "paths": { - }, "rootDir": ".", - "sourceMap": true, - "inlineSources": true, - "target": "es2015", - "lib": ["es2015", "dom"], - "skipLibCheck": true, - "strictNullChecks": true, - // don't auto-discover @types/node, it results in a /// /\.d\.ts$/.test(fileName), diff --git a/packages/tsc-wrapped/test/main_spec.ts b/packages/tsc-wrapped/test/main_spec.ts index 8cfa7c2ab3..204651f7fc 100644 --- a/packages/tsc-wrapped/test/main_spec.ts +++ b/packages/tsc-wrapped/test/main_spec.ts @@ -75,7 +75,7 @@ describe('tsc-wrapped', () => { // No helpers since decorators were lowered expect(out).not.toContain('__decorate'); // Expand `export *` and fix index import - expect(out).toContain(`export { A, B } from './dep/index'`); + expect(out).toContain(`export { A, B } from './dep'`); // Annotated for Closure compiler expect(out).toContain('* @param {?} x'); // Comments should stay multi-line @@ -112,7 +112,7 @@ describe('tsc-wrapped', () => { .then(() => { const out = readOut('js'); // Expand `export *` and fix index import - expect(out).toContain(`export { A, B } from './dep/index'`); + expect(out).toContain(`export { A, B } from './dep'`); // Annotated for Closure compiler expect(out).toContain('* @param {?} x'); done(); @@ -387,13 +387,13 @@ describe('tsc-wrapped', () => { main(basePath, {basePath}) .then(() => { const fileOutput = readOut('js'); - expect(fileOutput).toContain(`export { A, B } from './dep/index'`); + expect(fileOutput).toContain(`export { A, B } from './dep'`); done(); }) .catch(e => done.fail(e)); }); - it('should expand shorthand imports for ES5 CommonJS modules', (done) => { + it('should not expand shorthand imports for ES5 CommonJS modules', (done) => { write('tsconfig.json', `{ "compilerOptions": { "experimentalDecorators": true, @@ -413,7 +413,7 @@ describe('tsc-wrapped', () => { main(basePath, {basePath}) .then(() => { const fileOutput = readOut('js'); - expect(fileOutput).toContain(`var index_1 = require("./dep/index");`); + expect(fileOutput).toContain(`var dep_1 = require("./dep");`); done(); }) .catch(e => done.fail(e)); diff --git a/packages/tsconfig-build.json b/packages/tsconfig-build.json new file mode 100644 index 0000000000..edd797f5d0 --- /dev/null +++ b/packages/tsconfig-build.json @@ -0,0 +1,24 @@ +/** + * Root tsconfig file for use building all Angular packages. Note there is no rootDir + * and therefore any tsconfig in the package directory will need to define its own + * rootDir. + */ +{ + "compilerOptions": { + "declaration": true, + "stripInternal": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noFallthroughCasesInSwitch": true, + "moduleResolution": "node", + "module": "es2015", + "target": "es2015", + "lib": ["es2015", "dom"], + "skipLibCheck": true, + // don't auto-discover @types/node, it results in a ///3.10.8 unless https://github.com/npm/npm/issues/14042 is resolved setEnvVar YARN_VERSION 0.24.6 setEnvVar SAUCE_CONNECT_VERSION 4.3.11 -setEnvVar ANGULAR_CLI_VERSION 1.3.2 +setEnvVar ANGULAR_CLI_VERSION 1.4.0-rc.2 setEnvVar PROJECT_ROOT $(cd ${thisDir}/../..; pwd) if [[ ${TRAVIS:-} ]]; then diff --git a/tools/gulp-tasks/format.js b/tools/gulp-tasks/format.js index 51ec44c1e6..afd22a8a6e 100644 --- a/tools/gulp-tasks/format.js +++ b/tools/gulp-tasks/format.js @@ -17,6 +17,9 @@ const srcsToFmt = [ 'tools/**/*.{js,ts}', '!tools/public_api_guard/**/*.d.ts', './*.{js,ts}', + '!**/node_modules/**', + '!**/dist/**', + '!**/built/**', '!shims_for_IE.js', `!${I18N_DATA_FOLDER}/**/*.{js,ts}`, `!${I18N_FOLDER}/available_locales.ts`, diff --git a/tools/gulp-tasks/public-api.js b/tools/gulp-tasks/public-api.js index 6d14f929f2..e4f2fa41ff 100644 --- a/tools/gulp-tasks/public-api.js +++ b/tools/gulp-tasks/public-api.js @@ -1,22 +1,22 @@ const entrypoints = [ - 'dist/packages-dist/core/core.d.ts', 'dist/packages-dist/core/testing.d.ts', - 'dist/packages-dist/common/common.d.ts', 'dist/packages-dist/common/testing.d.ts', + 'dist/packages-dist/core/index.d.ts', 'dist/packages-dist/core/testing.d.ts', + 'dist/packages-dist/common/index.d.ts', 'dist/packages-dist/common/testing.d.ts', 'dist/packages-dist/common/http.d.ts', 'dist/packages-dist/common/http/testing.d.ts', // The API surface of the compiler is currently unstable - all of the important APIs are exposed // via @angular/core, @angular/platform-browser or @angular/platform-browser-dynamic instead. //'dist/packages-dist/compiler/index.d.ts', //'dist/packages-dist/compiler/testing.d.ts', - 'dist/packages-dist/upgrade/upgrade.d.ts', 'dist/packages-dist/upgrade/static.d.ts', - 'dist/packages-dist/platform-browser/platform-browser.d.ts', + 'dist/packages-dist/upgrade/index.d.ts', 'dist/packages-dist/upgrade/static.d.ts', + 'dist/packages-dist/platform-browser/index.d.ts', 'dist/packages-dist/platform-browser/testing.d.ts', - 'dist/packages-dist/platform-browser-dynamic/platform-browser-dynamic.d.ts', + 'dist/packages-dist/platform-browser-dynamic/index.d.ts', 'dist/packages-dist/platform-browser-dynamic/testing.d.ts', - 'dist/packages-dist/platform-webworker/platform-webworker.d.ts', - 'dist/packages-dist/platform-webworker-dynamic/platform-webworker-dynamic.d.ts', - 'dist/packages-dist/platform-server/platform-server.d.ts', - 'dist/packages-dist/platform-server/testing.d.ts', 'dist/packages-dist/http/http.d.ts', - 'dist/packages-dist/http/testing.d.ts', 'dist/packages-dist/forms/forms.d.ts', - 'dist/packages-dist/router/router.d.ts', 'dist/packages-dist/animations/animations.d.ts', + 'dist/packages-dist/platform-webworker/index.d.ts', + 'dist/packages-dist/platform-webworker-dynamic/index.d.ts', + 'dist/packages-dist/platform-server/index.d.ts', + 'dist/packages-dist/platform-server/testing.d.ts', 'dist/packages-dist/http/index.d.ts', + 'dist/packages-dist/http/testing.d.ts', 'dist/packages-dist/forms/index.d.ts', + 'dist/packages-dist/router/index.d.ts', 'dist/packages-dist/animations/index.d.ts', 'dist/packages-dist/animations/browser.d.ts', 'dist/packages-dist/animations/browser/testing.d.ts', 'dist/packages-dist/platform-browser/animations.d.ts' diff --git a/tools/public_api_guard/animations/animations.d.ts b/tools/public_api_guard/animations/index.d.ts similarity index 100% rename from tools/public_api_guard/animations/animations.d.ts rename to tools/public_api_guard/animations/index.d.ts diff --git a/tools/public_api_guard/common/common.d.ts b/tools/public_api_guard/common/index.d.ts similarity index 100% rename from tools/public_api_guard/common/common.d.ts rename to tools/public_api_guard/common/index.d.ts diff --git a/tools/public_api_guard/compiler/compiler.d.ts b/tools/public_api_guard/compiler/index.d.ts similarity index 100% rename from tools/public_api_guard/compiler/compiler.d.ts rename to tools/public_api_guard/compiler/index.d.ts diff --git a/tools/public_api_guard/core/core.d.ts b/tools/public_api_guard/core/index.d.ts similarity index 100% rename from tools/public_api_guard/core/core.d.ts rename to tools/public_api_guard/core/index.d.ts diff --git a/tools/public_api_guard/forms/forms.d.ts b/tools/public_api_guard/forms/index.d.ts similarity index 100% rename from tools/public_api_guard/forms/forms.d.ts rename to tools/public_api_guard/forms/index.d.ts diff --git a/tools/public_api_guard/http/http.d.ts b/tools/public_api_guard/http/index.d.ts similarity index 100% rename from tools/public_api_guard/http/http.d.ts rename to tools/public_api_guard/http/index.d.ts diff --git a/tools/public_api_guard/platform-browser-dynamic/platform-browser-dynamic.d.ts b/tools/public_api_guard/platform-browser-dynamic/index.d.ts similarity index 100% rename from tools/public_api_guard/platform-browser-dynamic/platform-browser-dynamic.d.ts rename to tools/public_api_guard/platform-browser-dynamic/index.d.ts diff --git a/tools/public_api_guard/platform-browser/platform-browser.d.ts b/tools/public_api_guard/platform-browser/index.d.ts similarity index 100% rename from tools/public_api_guard/platform-browser/platform-browser.d.ts rename to tools/public_api_guard/platform-browser/index.d.ts diff --git a/tools/public_api_guard/platform-server/platform-server.d.ts b/tools/public_api_guard/platform-server/index.d.ts similarity index 100% rename from tools/public_api_guard/platform-server/platform-server.d.ts rename to tools/public_api_guard/platform-server/index.d.ts diff --git a/tools/public_api_guard/platform-webworker-dynamic/platform-webworker-dynamic.d.ts b/tools/public_api_guard/platform-webworker-dynamic/index.d.ts similarity index 100% rename from tools/public_api_guard/platform-webworker-dynamic/platform-webworker-dynamic.d.ts rename to tools/public_api_guard/platform-webworker-dynamic/index.d.ts diff --git a/tools/public_api_guard/platform-webworker/platform-webworker.d.ts b/tools/public_api_guard/platform-webworker/index.d.ts similarity index 100% rename from tools/public_api_guard/platform-webworker/platform-webworker.d.ts rename to tools/public_api_guard/platform-webworker/index.d.ts diff --git a/tools/public_api_guard/router/router.d.ts b/tools/public_api_guard/router/index.d.ts similarity index 100% rename from tools/public_api_guard/router/router.d.ts rename to tools/public_api_guard/router/index.d.ts diff --git a/tools/public_api_guard/upgrade/upgrade.d.ts b/tools/public_api_guard/upgrade/index.d.ts similarity index 100% rename from tools/public_api_guard/upgrade/upgrade.d.ts rename to tools/public_api_guard/upgrade/index.d.ts