Skip to content

Commit

Permalink
build: use placeholder version for stamping
Browse files Browse the repository at this point in the history
  • Loading branch information
kormide authored and filipesilva committed Jan 16, 2022
1 parent 2f2069d commit 9539d15
Show file tree
Hide file tree
Showing 17 changed files with 48 additions and 50 deletions.
3 changes: 2 additions & 1 deletion packages/angular/cli/models/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export class Version {
}
}

// TODO: Convert this to use build-time version stamping once implemented in the build system
// TODO: Convert this to use build-time version stamping after flipping the build script to use bazel
// export const VERSION = new Version('0.0.0-PLACEHOLDER');
export const VERSION = new Version(
(
JSON.parse(readFileSync(resolve(__dirname, '../package.json'), 'utf-8')) as { version: string }
Expand Down
22 changes: 11 additions & 11 deletions packages/angular/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular/cli",
"version": "0.0.0",
"version": "0.0.0-PLACEHOLDER",
"description": "CLI tool for Angular",
"main": "lib/cli/index.js",
"bin": {
Expand All @@ -25,10 +25,10 @@
},
"homepage": "https://github.com/angular/angular-cli",
"dependencies": {
"@angular-devkit/architect": "0.0.0",
"@angular-devkit/core": "0.0.0",
"@angular-devkit/schematics": "0.0.0",
"@schematics/angular": "0.0.0",
"@angular-devkit/architect": "0.0.0-PLACEHOLDER",
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
"@angular-devkit/schematics": "0.0.0-PLACEHOLDER",
"@schematics/angular": "0.0.0-PLACEHOLDER",
"@yarnpkg/lockfile": "1.1.0",
"ansi-colors": "4.1.1",
"debug": "4.3.3",
Expand All @@ -51,12 +51,12 @@
"ng-update": {
"migrations": "@schematics/angular/migrations/migration-collection.json",
"packageGroup": {
"@angular/cli": "0.0.0",
"@angular-devkit/architect": "0.0.0",
"@angular-devkit/build-angular": "0.0.0",
"@angular-devkit/build-webpack": "0.0.0",
"@angular-devkit/core": "0.0.0",
"@angular-devkit/schematics": "0.0.0"
"@angular/cli": "0.0.0-PLACEHOLDER",
"@angular-devkit/architect": "0.0.0-PLACEHOLDER",
"@angular-devkit/build-angular": "0.0.0-PLACEHOLDER",
"@angular-devkit/build-webpack": "0.0.0-PLACEHOLDER",
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
"@angular-devkit/schematics": "0.0.0-PLACEHOLDER"
}
}
}
6 changes: 3 additions & 3 deletions packages/angular/pwa/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular/pwa",
"version": "0.0.0",
"version": "0.0.0-PLACEHOLDER",
"description": "PWA schematics for Angular",
"keywords": [
"blueprints",
Expand All @@ -12,8 +12,8 @@
"save": false
},
"dependencies": {
"@angular-devkit/schematics": "0.0.0",
"@schematics/angular": "0.0.0",
"@angular-devkit/schematics": "0.0.0-PLACEHOLDER",
"@schematics/angular": "0.0.0-PLACEHOLDER",
"parse5-html-rewriting-stream": "6.0.1"
}
}
4 changes: 2 additions & 2 deletions packages/angular_devkit/architect/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@angular-devkit/architect",
"version": "0.0.0",
"version": "0.0.0-PLACEHOLDER",
"description": "Angular Build Facade",
"experimental": true,
"main": "src/index.js",
"typings": "src/index.d.ts",
"dependencies": {
"@angular-devkit/core": "0.0.0",
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
"rxjs": "6.6.7"
},
"builders": "./builders/builders.json"
Expand Down
6 changes: 3 additions & 3 deletions packages/angular_devkit/architect_cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular-devkit/architect-cli",
"version": "0.0.0",
"version": "0.0.0-PLACEHOLDER",
"description": "Angular Architect CLI",
"homepage": "https://github.com/angular/angular-cli",
"experimental": true,
Expand All @@ -14,8 +14,8 @@
"tooling"
],
"dependencies": {
"@angular-devkit/architect": "0.0.0",
"@angular-devkit/core": "0.0.0",
"@angular-devkit/architect": "0.0.0-PLACEHOLDER",
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
"ansi-colors": "4.1.1",
"minimist": "1.2.5",
"progress": "2.0.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/angular_devkit/benchmark/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular-devkit/benchmark",
"version": "0.0.0",
"version": "0.0.0-PLACEHOLDER",
"private": true,
"description": "Angular Benchmark",
"bin": {
Expand All @@ -10,7 +10,7 @@
"benchmark"
],
"dependencies": {
"@angular-devkit/core": "0.0.0",
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
"ansi-colors": "4.1.1",
"minimist": "1.2.5",
"pidusage": "3.0.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/angular_devkit/build_angular/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@angular-devkit/build-angular",
"version": "0.0.0",
"version": "0.0.0-PLACEHOLDER",
"description": "Angular Webpack Build Facade",
"main": "src/index.js",
"typings": "src/index.d.ts",
"builders": "builders.json",
"dependencies": {
"@ampproject/remapping": "1.0.2",
"@angular-devkit/architect": "0.0.0",
"@angular-devkit/build-webpack": "0.0.0",
"@angular-devkit/core": "0.0.0",
"@angular-devkit/architect": "0.0.0-PLACEHOLDER",
"@angular-devkit/build-webpack": "0.0.0-PLACEHOLDER",
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
"@babel/core": "7.16.0",
"@babel/generator": "7.16.0",
"@babel/helper-annotate-as-pure": "7.16.0",
Expand All @@ -20,7 +20,7 @@
"@babel/runtime": "7.16.3",
"@babel/template": "7.16.0",
"@discoveryjs/json-ext": "0.5.6",
"@ngtools/webpack": "0.0.0",
"@ngtools/webpack": "0.0.0-PLACEHOLDER",
"ansi-colors": "4.1.1",
"babel-loader": "8.2.3",
"babel-plugin-istanbul": "6.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/angular_devkit/build_optimizer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular-devkit/build-optimizer",
"version": "0.0.0",
"version": "0.0.0-PLACEHOLDER",
"description": "Angular Build Optimizer",
"experimental": true,
"main": "src/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/angular_devkit/build_webpack/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@angular-devkit/build-webpack",
"version": "0.0.0",
"version": "0.0.0-PLACEHOLDER",
"description": "Webpack Builder for Architect",
"experimental": true,
"main": "src/index.js",
"typings": "src/index.d.ts",
"builders": "builders.json",
"dependencies": {
"@angular-devkit/architect": "0.0.0",
"@angular-devkit/architect": "0.0.0-PLACEHOLDER",
"rxjs": "6.6.7"
},
"devDependencies": {
"@angular-devkit/core": "0.0.0",
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
"node-fetch": "2.6.1",
"webpack": "5.65.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/angular_devkit/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular-devkit/core",
"version": "0.0.0",
"version": "0.0.0-PLACEHOLDER",
"description": "Angular DevKit - Core Utility Library",
"main": "src/index.js",
"typings": "src/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/angular_devkit/schematics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular-devkit/schematics",
"version": "0.0.0",
"version": "0.0.0-PLACEHOLDER",
"description": "Angular Schematics - Library",
"main": "src/index.js",
"typings": "src/index.d.ts",
Expand All @@ -13,7 +13,7 @@
"schematics"
],
"dependencies": {
"@angular-devkit/core": "0.0.0",
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/angular_devkit/schematics_cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular-devkit/schematics-cli",
"version": "0.0.0",
"version": "0.0.0-PLACEHOLDER",
"description": "Angular Schematics - CLI",
"homepage": "https://github.com/angular/angular-cli",
"bin": {
Expand All @@ -16,8 +16,8 @@
],
"schematics": "./collection.json",
"dependencies": {
"@angular-devkit/core": "0.0.0",
"@angular-devkit/schematics": "0.0.0",
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
"@angular-devkit/schematics": "0.0.0-PLACEHOLDER",
"ansi-colors": "4.1.1",
"inquirer": "8.2.0",
"minimist": "1.2.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/ngtools/webpack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngtools/webpack",
"version": "0.0.0",
"version": "0.0.0-PLACEHOLDER",
"description": "Webpack plugin that AoT compiles your Angular components and modules.",
"main": "./src/index.js",
"typings": "src/index.d.ts",
Expand All @@ -27,7 +27,7 @@
"webpack": "^5.30.0"
},
"devDependencies": {
"@angular-devkit/core": "0.0.0",
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
"@angular/compiler": "13.1.0",
"@angular/compiler-cli": "13.1.0",
"typescript": "4.5.3",
Expand Down
6 changes: 3 additions & 3 deletions packages/schematics/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@schematics/angular",
"version": "0.0.0",
"version": "0.0.0-PLACEHOLDER",
"description": "Schematics specific to Angular",
"homepage": "https://github.com/angular/angular-cli",
"keywords": [
Expand All @@ -10,8 +10,8 @@
],
"schematics": "./collection.json",
"dependencies": {
"@angular-devkit/core": "0.0.0",
"@angular-devkit/schematics": "0.0.0",
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
"@angular-devkit/schematics": "0.0.0-PLACEHOLDER",
"jsonc-parser": "3.0.0"
}
}
4 changes: 2 additions & 2 deletions scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ export default async function (
} else {
obj[depName] = `github:${pkg.snapshotRepo}#${pkg.snapshotHash}`;
}
} else if ((obj[depName] as string).match(/\b0\.0\.0\b/)) {
obj[depName] = (obj[depName] as string).replace(/\b0\.0\.0\b/, v);
} else if ((obj[depName] as string).match(/\b0\.0\.0-PLACEHOLDER\b/)) {
obj[depName] = (obj[depName] as string).replace(/\b0\.0\.0-PLACEHOLDER\b/, v);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/validate-licenses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const ignoredPackages = [

// Ignore own packages (all MIT)
for (const packageName of Object.keys(packages)) {
ignoredPackages.push(`${packageName}@0.0.0`);
ignoredPackages.push(`${packageName}@0.0.0-PLACEHOLDER`);
}

// Find all folders directly under a `node_modules` that have a package.json.
Expand Down
7 changes: 2 additions & 5 deletions tools/defaults.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,10 @@ def pkg_npm(name, pkg_deps = [], use_prodmode_output = False, **kwargs):

common_substitutions = dict(kwargs.pop("substitutions", {}))
substitutions = dict(common_substitutions, **{
# TODO: Current build script relies on 0.0.0 in package.json; uncomment after replacing build script.
#"0.0.0-PLACEHOLDER": "0.0.0",
"0.0.0-PLACEHOLDER": "0.0.0",
})
stamped_substitutions = dict(common_substitutions, **{
# TODO: Current build script relies on 0.0.0 in package.json; uncomment after replacing build script.
#"0.0.0-PLACEHOLDER": "{BUILD_SCM_VERSION}",
"0.0.0": "{BUILD_SCM_VERSION}",
"0.0.0-PLACEHOLDER": "{BUILD_SCM_VERSION}",
})

deps = kwargs.pop("deps", [])
Expand Down

0 comments on commit 9539d15

Please sign in to comment.