Skip to content

Commit

Permalink
Merge pull request #2867 from patrick-rodgers/version-4
Browse files Browse the repository at this point in the history
Version 4
  • Loading branch information
patrick-rodgers authored Dec 20, 2023
2 parents 37a9fd2 + 40f15ec commit 6bd8375
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 33 deletions.
21 changes: 19 additions & 2 deletions buildsystem-config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
import { resolve } from "path";
import { BuildSchema } from "@pnp/buildsystem";
import {
BuildSchema,
BuildTimeline,
Build,
ReplaceVersion,
} from "@pnp/buildsystem";
// import { ConfigCollection, BuildSchema, Tasks, PackageSchema, PublishSchema } from "@pnp/buildsystem";

export function PnPBuild(): (b: BuildTimeline) => BuildTimeline {

return (instance: BuildTimeline) => {

Build()(instance);
ReplaceVersion(["sp/behaviors/telemetry.js", "graph/behaviors/telemetry.js"])(instance);

return instance;
}
}


export default [<BuildSchema>{
name: "build",
distFolder: "./dist/packages",
targets: [
resolve("./packages/tsconfig.json"),
]
],
behaviors: [PnPBuild()]
}];

// export default <ConfigCollection>[
Expand Down
31 changes: 4 additions & 27 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion tools/buildsystem/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pnp/buildsystem",
"version": "4.0.0-beta2",
"version": "4.0.0-beta3",
"bin": {
"pnpbuild": "bin/buildsystem.js"
},
Expand Down
2 changes: 2 additions & 0 deletions tools/buildsystem/src/behaviors/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ export function Build(flags?: string[]): TimelinePipe {
});
});
});

return instance;
}
}
4 changes: 2 additions & 2 deletions tools/buildsystem/src/behaviors/copy-asset-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function CopyAssetFiles(path: string, pattern: string[]): TimelinePipe {

this.log(`Completed CopyAssetFiles.`);
});
}


return instance;
}
}
2 changes: 2 additions & 0 deletions tools/buildsystem/src/behaviors/copy-package-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,7 @@ export function CopyPackageFiles(source: "src" | "built", pattern: string[]): Ti

this.log(`Completing CopyPackageFiles with pattern ${stringPattern} on target '${this.context.target.tsconfigPath}'`);
});

return instance;
}
}
4 changes: 3 additions & 1 deletion tools/buildsystem/src/behaviors/publish-nightly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BuildTimeline } from "src/build-timeline";
import { Publish } from "./publish.js";
import { resolve } from "path";
import importJSON from "../lib/import-json.js";
import buildWriteFile from "src/lib/write-file.js";
import buildWriteFile from "../lib/write-file.js";

/**
* Does a nightly publish after setting the nightly version and updating deps
Expand Down Expand Up @@ -49,5 +49,7 @@ export function PublishNightly(flags: string[], nightlyName: "v3nightly" | "v4ni

// we want to publish
Publish(flags)(instance);

return instance;
}
}
2 changes: 2 additions & 0 deletions tools/buildsystem/src/behaviors/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,7 @@ export function Publish(flags?: string[]): TimelinePipe {

await Promise.all(promises);
});

return instance;
}
}
2 changes: 2 additions & 0 deletions tools/buildsystem/src/behaviors/replace-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@ export function ReplaceVersion(paths: string[], versionMask = /\$\$Version\$\$/i

return (<any>replace)(options);
});

return instance;
}
}
2 changes: 2 additions & 0 deletions tools/buildsystem/src/behaviors/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ export function Webpack(config: wp.Configuration): TimelinePipe {
});
});
});

return instance;
}
}
2 changes: 2 additions & 0 deletions tools/buildsystem/src/behaviors/write-packagejson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,7 @@ export function WritePackageJSON(transform?: (p: any) => typeof p): TimelinePipe

await Promise.all(promises);
});

return instance;
}
}

0 comments on commit 6bd8375

Please sign in to comment.