Skip to content

Commit

Permalink
Merge pull request #2865 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 3a1d36f + 4a6d545 commit 98c3bce
Show file tree
Hide file tree
Showing 82 changed files with 5,421 additions and 4,628 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ settings.js

# don't save the locally produced .js of the buildsystem config
buildsystem-config.js
buildsystem-config2.js
8 changes: 5 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@
"program": "${workspaceRoot}/tools/buildsystem/bin/buildsystem.ts",
"args": [
"-n",
"package"
"build"
],
"cwd": "${workspaceRoot}",
"preLaunchTask": "build-buildsystem",
"runtimeExecutable": null,
"runtimeArgs": [
"--nolazy"
"--nolazy",
"--experimental-loader",
"file://${workspaceRoot}/build/debugging/tools/local-module-resolver/esm-packages.js"
],
"env": {
"NODE_ENV": "development"
Expand All @@ -69,7 +71,7 @@
"internalConsoleOptions": "openOnSessionStart",
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/tools/buildsystem/**/*.js"
"${workspaceRoot}/build/build-system/**/*.js"
],
"skipFiles": [
"<node_internals>/**"
Expand Down
10 changes: 8 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,14 @@
{
"label": "build-buildsystem",
"type": "shell",
"command": "tsc -p ./tools/buildsystem",
"args": [],
"command": "npx",
"args": [
"tsc",
"-p",
"./tools/buildsystem",
"--outDir",
"./build/build-system"
],
"isBackground": false,
"problemMatcher": [
"$tsc",
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Changed

- queryable
- moved add-props.ts and request-builders.ts to index.ts

- graph
- IGraphQueryableCollection now supports async iterator pattern
- IGraphQueryableCollection count method now returns -1 if the collection does not support counting
Expand Down
115 changes: 115 additions & 0 deletions buildsystem-config2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
import { resolve } from "path";
// import { ConfigCollection, BuildSchema, Tasks, PackageSchema, PublishSchema } from "@pnp/buildsystem";
export default [{
name: "build",
distFolder: "./dist/packages",
targets: [
resolve("./packages/tsconfig.json"),
]
}];
// export default <ConfigCollection>[
// <BuildSchema>{
// name: "build",
// role: "build",
// packageRoot: resolve("./packages/"),
// preBuildTasks: [],
// // these tsconfig files will all be transpiled per the settings in the file
// buildTargets: [
// resolve("./packages/tsconfig.json"),
// ],
// postBuildTasks: [
// // this task replaces the $$Version$$ with the version from the root package.json at build time
// Tasks.Build.createReplaceVersion([
// "sp/behaviors/telemetry.js",
// "graph/behaviors/telemetry.js",
// ]),
// ],
// },
// <PackageSchema>{
// name: "package",
// role: "package",
// prePackageTasks: [],
// packageTargets: [
// {
// outDir: resolve("./dist/packages"),
// target: resolve("./packages/tsconfig.json"),
// tasks: [
// Tasks.Package.createCopyTargetFiles(),
// Tasks.Package.copyStaticAssets,
// Tasks.Package.createCopyPackageScripts(),
// Tasks.Package.createWritePackageFiles((p) => {
// return Object.assign({}, p, {
// funding: {
// type: "individual",
// url: "https://github.com/sponsors/patrick-rodgers/",
// },
// type: "module",
// engines: {
// node: ">=14.15.1"
// },
// author: {
// name: "Microsoft and other contributors"
// },
// license: "MIT",
// bugs: {
// url: "https://github.com/pnp/pnpjs/issues"
// },
// homepage: "https://github.com/pnp/pnpjs",
// repository: {
// type: "git",
// url: "git:github.com/pnp/pnpjs"
// }
// });
// }),
// ],
// },
// ],
// postPackageTasks: [],
// },
// <PublishSchema>{
// name: "publish",
// role: "publish",
// packageRoots: [
// resolve("./dist/packages"),
// ],
// prePublishTasks: [],
// publishTasks: [Tasks.Publish.publishPackage],
// postPublishTasks: [],
// },
// <BuildSchema>{
// name: "build-debug",
// role: "build",
// packageRoot: resolve("./debug/"),
// exclude: [],
// preBuildTasks: [],
// buildTargets: [
// resolve("./debug/launch/tsconfig.json"),
// ],
// postBuildTasks: [
// Tasks.Build.createReplaceVersion([
// "packages/sp/behaviors/telemetry.js",
// "packages/graph/behaviors/telemetry.js",
// ]),
// ],
// },
// <PublishSchema>{
// name: "publish-beta",
// role: "publish",
// packageRoots: [
// resolve("./dist/packages"),
// ],
// prePublishTasks: [],
// publishTasks: [Tasks.Publish.publishBetaPackage],
// postPublishTasks: [],
// },
// <PublishSchema>{
// name: "publish-v3nightly",
// role: "publish",
// packageRoots: [
// resolve("./dist/packages"),
// ],
// prePublishTasks: [Tasks.Publish.updateV3NightlyVersion],
// publishTasks: [Tasks.Publish.publishV3Nightly],
// postPublishTasks: [],
// },
// ];
154 changes: 154 additions & 0 deletions buildsystem-config2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
import { resolve } from "path";
// import { ConfigCollection, BuildSchema, Tasks, PackageSchema, PublishSchema } from "@pnp/buildsystem";

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

// export default <ConfigCollection>[
// <BuildSchema>{

// name: "build",

// role: "build",

// packageRoot: resolve("./packages/"),

// preBuildTasks: [],

// // these tsconfig files will all be transpiled per the settings in the file
// buildTargets: [
// resolve("./packages/tsconfig.json"),
// ],

// postBuildTasks: [
// // this task replaces the $$Version$$ with the version from the root package.json at build time
// Tasks.Build.createReplaceVersion([
// "sp/behaviors/telemetry.js",
// "graph/behaviors/telemetry.js",
// ]),
// ],
// },
// <PackageSchema>{

// name: "package",

// role: "package",

// prePackageTasks: [],

// packageTargets: [
// {
// outDir: resolve("./dist/packages"),
// target: resolve("./packages/tsconfig.json"),
// tasks: [
// Tasks.Package.createCopyTargetFiles(),
// Tasks.Package.copyStaticAssets,
// Tasks.Package.createCopyPackageScripts(),
// Tasks.Package.createWritePackageFiles((p) => {
// return Object.assign({}, p, {
// funding: {
// type: "individual",
// url: "https://github.com/sponsors/patrick-rodgers/",
// },
// type: "module",
// engines: {
// node: ">=14.15.1"
// },
// author: {
// name: "Microsoft and other contributors"
// },
// license: "MIT",
// bugs: {
// url: "https://github.com/pnp/pnpjs/issues"
// },
// homepage: "https://github.com/pnp/pnpjs",
// repository: {
// type: "git",
// url: "git:github.com/pnp/pnpjs"
// }
// });
// }),
// ],
// },
// ],

// postPackageTasks: [],
// },
// <PublishSchema>{

// name: "publish",

// role: "publish",

// packageRoots: [
// resolve("./dist/packages"),
// ],

// prePublishTasks: [],

// publishTasks: [Tasks.Publish.publishPackage],

// postPublishTasks: [],
// },
// <BuildSchema>{

// name: "build-debug",

// role: "build",

// packageRoot: resolve("./debug/"),

// exclude: [],

// preBuildTasks: [],

// buildTargets: [
// resolve("./debug/launch/tsconfig.json"),
// ],

// postBuildTasks: [

// Tasks.Build.createReplaceVersion([
// "packages/sp/behaviors/telemetry.js",
// "packages/graph/behaviors/telemetry.js",
// ]),
// ],
// },
// <PublishSchema>{

// name: "publish-beta",

// role: "publish",

// packageRoots: [
// resolve("./dist/packages"),
// ],

// prePublishTasks: [],

// publishTasks: [Tasks.Publish.publishBetaPackage],

// postPublishTasks: [],
// },
// <PublishSchema>{

// name: "publish-v3nightly",

// role: "publish",

// packageRoots: [
// resolve("./dist/packages"),
// ],

// prePublishTasks: [Tasks.Publish.updateV3NightlyVersion],

// publishTasks: [Tasks.Publish.publishV3Nightly],

// postPublishTasks: [],
// },
// ];
4 changes: 2 additions & 2 deletions debug/launch/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ import { Example } from "./sp.js";
// create a settings file using settings.example.js as a template
import(findup("settings.js")).then((settings: { settings: ITestingSettings }) => {

Logger.activeLogLevel = LogLevel.Info;
Logger.activeLogLevel = LogLevel.Info;

// // setup console logger
Logger.subscribe(ConsoleListener("Debug", {
color: "skyblue",
error: "red",
verbose: "lightslategray",
warning: "yellow",
}));
}));

Example(settings.settings);

Expand Down
2 changes: 2 additions & 0 deletions debug/launch/sp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { ITestingSettings } from "../../test/load-settings.js";
import { Logger, LogLevel } from "@pnp/logging";
import { spSetup } from "./setup.js";
import "@pnp/sp/webs";
import "@pnp/sp/lists";
import "@pnp/sp/items";

declare var process: { exit(code?: number): void };

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
},
"scripts": {
"build": "npm run pnp-buildsystem-init && pnpbuild -n build",
"build-localresolver": "npx tsc -p tsconfig.localresolver.json",
"buildDebug": "npm run clean && npm run pnp-buildsystem-init && pnpbuild -n build-debug",
"clean": "del-cli \"./?(dist|site|build|buildsystem-config.js)\"",
"lint": "eslint ./packages ./test --ext .ts",
Expand Down
Loading

0 comments on commit 98c3bce

Please sign in to comment.