diff --git a/docs/docs/about/release-notes.mdx b/docs/docs/about/release-notes.mdx index 4dabd746a1..1f01ed57f3 100644 --- a/docs/docs/about/release-notes.mdx +++ b/docs/docs/about/release-notes.mdx @@ -6,23 +6,21 @@ sidebar_position: 3 ## v9.0.0 (beta) -### ⚠️ Breaking changes +### Changes -- updated option names of [app permission add](../cmd/app/permission/permission-add.mdx) to plural [#5719](https://github.com/pnp/cli-microsoft365/issues/5975) -- removed deprecated guest filtering for [entra m365group user list](../cmd/entra/m365group/m365group-user-list.mdx) command [#5558](https://github.com/pnp/cli-microsoft365/issues/5558) -- added `--force` option to [spo site appcatalog remove](../cmd/spo/site/site-appcatalog-remove.mdx) command [#6091](https://github.com/pnp/cli-microsoft365/issues/6091) +- updated option names of 'app permission add' to plural [#5719](https://github.com/pnp/cli-microsoft365/issues/5975) +- removed deprecated Guest value from 'aad m365group user list' command [#5558](https://github.com/pnp/cli-microsoft365/issues/5558) +- added `--force` option to 'spo site appcatalog remove' command [#6091](https://github.com/pnp/cli-microsoft365/issues/6091) - aligned options with naming convention [#5616](https://github.com/pnp/cli-microsoft365/issues/5616) -- removed duplicate property from [spo list list](../cmd/spo/list/list-list.mdx) command [#6042](https://github.com/pnp/cli-microsoft365/issues/6042) -- updated [spo tenant recyclebinitem restore](../cmd/spo/tenant/tenant-recyclebinitem-restore.mdx) command output [#6063](https://github.com/pnp/cli-microsoft365/issues/6063) -- removed deprecated option `wait` from [spo site remove](../cmd/spo/site/site-remove.mdx) command [#5956](https://github.com/pnp/cli-microsoft365/issues/5956) -- reworked command [spo file copy](../cmd/spo/file/file-copy.mdx) to new API endpoint [#6152](https://github.com/pnp/cli-microsoft365/issues/6152) +- removed duplicate property from 'spo list list' command [#6042](https://github.com/pnp/cli-microsoft365/issues/6042) +- updated 'spo tenant recyclebinitem restore' command [#6063](https://github.com/pnp/cli-microsoft365/issues/6063) +- removed deprecated option '--wait' from 'spo site remove' command [#5956](https://github.com/pnp/cli-microsoft365/issues/5956) +- reworked command 'spo file copy' to new API endpoint [#6152](https://github.com/pnp/cli-microsoft365/issues/6152) - removed deprecated CLI environment variables [#5918](https://github.com/pnp/cli-microsoft365/issues/5918) -- updated options of `entra enterpriseapp` commands [#6155](https://github.com/pnp/cli-microsoft365/issues/6155) -- removed `overwrite` option from [spfx project github workflow add](../cmd/spfx/project/project-github-workflow-add.mdx) command [#5765](https://github.com/pnp/cli-microsoft365/issues/5765) -- updated [status](../cmd/status.mdx) command output [#5849](https://github.com/pnp/cli-microsoft365/issues/5849) -- removed [spo folder rename](../cmd/spo/folder/folder-set.mdx) alias [#5911](https://github.com/pnp/cli-microsoft365/issues/5911) -- removed stringified property from [spo applicationcustomizer get](../cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx) command [#6052](https://github.com/pnp/cli-microsoft365/issues/6052) -- removed all `yammer` command aliases [#5764](https://github.com/pnp/cli-microsoft365/issues/5764) +- updated options of 'entra enterpriseapp' commands [#6155](https://github.com/pnp/cli-microsoft365/issues/6155) +- removed 'overwrite' option from 'spfx project github workflow add' command [#5765](https://github.com/pnp/cli-microsoft365/issues/5765) +- updated 'm365 status' command output [#5849](https://github.com/pnp/cli-microsoft365/issues/5849) +- removed 'spo folder rename' alias [#5911](https://github.com/pnp/cli-microsoft365/issues/5911) ## v8.1.0 (beta) diff --git a/docs/docs/v9-upgrade-guidance.mdx b/docs/docs/v9-upgrade-guidance.mdx index ab73582077..8ef145b34b 100644 --- a/docs/docs/v9-upgrade-guidance.mdx +++ b/docs/docs/v9-upgrade-guidance.mdx @@ -149,7 +149,7 @@ In the past versions of CLI for Microsoft 365, the command had no output. When u When using the [spo file copy](./cmd/spo/file/file-copy.mdx) command, please use the new command input. This means that you'll have to remove option `--resetAuthorAndCreated` from your scripts and automation tools. -### Removed `spo folder rename` alias +### Removed 'spo folder rename' alias The `spo folder rename` command was removed and replaced by the [spo folder set](./cmd/spo/folder/folder-set.mdx) command. @@ -168,14 +168,6 @@ For this new major version, we've Removed `aad` options in below spo commands: Please, check the documentation of the [spo group member add](./cmd/spo/group/group-member-add.mdx), [spo group member remove](./cmd/spo/group/group-member-remove.mdx), and [spo user ensure](./cmd/spo/user/user-ensure.mdx) command to see the updated options and adjust your scripts accordingly. -### Updated output of `spo applicationcustomizer get` command - -In the previous version of CLI, the command output had a `Rights` property that was a stringified JSON object. In this release, this has been changed to a JSON object. - -#### What action do I need to take? - -Please, check the documentation of the [spo applicationcustomizer get](./cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx) command to see the updated output and adjust your scripts accordingly. - ## SharePoint Framework ### Removed overwrite option from `spfx project github workflow add` command @@ -184,41 +176,6 @@ Overwriting the SPFx package should be the default behavior of the continuous de #### What action do I need to take? -Please update your scripts not to use the `overwrite` option. - -## Yammer (Viva Engage) - -### Removal of deprecated Yammer aliases - -We have removed all deprecated `Yammer` command aliases. These aliases were introduced in the previous version to prevent the introduction of breaking changes. Since Yammer has been renamed to Viva Engage a while ago, the following aliases were removed: - -Alias | Command ---|-- -`yammer search` | [viva engage search](./cmd/viva/engage/engage-search.mdx) -`yammer group list` | [viva engage group list](./cmd/viva/engage/engage-group-list.mdx) -`yammer group user add` | [viva engage group user add](./cmd/viva/engage/engage-group-user-add.mdx) -`yammer group user remove` | [viva engage group user remove](./cmd/viva/engage/engage-group-user-remove.mdx) -`yammer message add` | [viva engage message add](./cmd/viva/engage/engage-message-add.mdx) -`yammer message get` | [viva engage message get](./cmd/viva/engage/engage-message-get.mdx) -`yammer message list` | [viva engage message list](./cmd/viva/engage/engage-message-list.mdx) -`yammer message remove` | [viva engage message remove](./cmd/viva/engage/engage-message-remove.mdx) -`yammer message like set` | [viva engage message like set](./cmd/viva/engage/engage-message-like-set.mdx) -`yammer network list` | [viva engage network list](./cmd/viva/engage/engage-network-list.mdx) -`yammer report activitycounts` | [viva engage report activitycounts](./cmd/viva/engage/engage-report-activitycounts.mdx) -`yammer report activityusercounts` | [viva engage report activityusercounts](./cmd/viva/engage/engage-report-activityusercounts.mdx) -`yammer report activityuserdetail` | [viva engage report activityuserdetail](./cmd/viva/engage/engage-report-activityuserdetail.mdx) -`yammer report deviceusagedistributionusercounts` | [viva engage report deviceusagedistributionusercounts](./cmd/viva/engage/engage-report-deviceusagedistributionusercounts.mdx) -`yammer report deviceusageusercounts` | [viva engage report deviceusageusercounts](./cmd/viva/engage/engage-report-deviceusageusercounts.mdx) -`yammer report deviceusageuserdetail` | [viva engage report deviceusageuserdetail](./cmd/viva/engage/engage-report-deviceusageuserdetail.mdx) -`yammer report groupsactivitycounts` | [viva engage report groupsactivitycounts](./cmd/viva/engage/engage-report-groupsactivitycounts.mdx) -`yammer report groupsactivitydetail` | [viva engage report groupsactivitydetail](./cmd/viva/engage/engage-report-groupsactivitydetail.mdx) -`yammer report groupsactivitygroupcounts` | [viva engage report groupsactivitygroupcounts](./cmd/viva/engage/engage-report-groupsactivitygroupcounts.mdx) -`yammer user get` | [viva engage user get](./cmd/viva/engage/engage-user-get.mdx) -`yammer user list` | [viva engage user list](./cmd/viva/engage/engage-user-list.mdx) - -#### What action do I need to take? - -Replace any of the aliases mentioned above with the corresponding command name. The functionality of the command hasn't changed. -# v9 Upgrade Guidance +Please update your scripts not to use the `overwrite` option.# v9 Upgrade Guidance The v9 of CLI for Microsoft 365 introduces several breaking changes. To help you upgrade to the latest version of CLI for Microsoft 365, we've listed those changes along with any actions you may need to take. diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 27e2b9e0de..f676d2eed8 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -49,8 +49,8 @@ const config: Config = { 'client-redirects', { createRedirects(routePath) { - if (routePath.includes('/entra')) { - return [routePath.replace('/entra', '/aad')]; + if (routePath.includes('/viva/engage')) { + return [routePath.replace('/viva/engage', '/yammer')]; } return []; diff --git a/src/m365/entra/commands/m365group/m365group-user-add.spec.ts b/src/m365/entra/commands/m365group/m365group-user-add.spec.ts index e3e1e1612d..af45d7cce1 100644 --- a/src/m365/entra/commands/m365group/m365group-user-add.spec.ts +++ b/src/m365/entra/commands/m365group/m365group-user-add.spec.ts @@ -14,8 +14,6 @@ import commands from '../../commands.js'; import command from './m365group-user-add.js'; import { settingsNames } from '../../../../settingsNames.js'; import { entraGroup } from '../../../../utils/entraGroup.js'; -import { entraUser } from '../../../../utils/entraUser.js'; -import aadCommands from '../../aadCommands.js'; describe(commands.M365GROUP_USER_ADD, () => { const groupId = '3f04e370-cbc6-4091-80fe-1d038be2ad06'; diff --git a/src/m365/entra/commands/m365group/m365group-user-add.ts b/src/m365/entra/commands/m365group/m365group-user-add.ts index a973a938dc..2ca2e728a8 100644 --- a/src/m365/entra/commands/m365group/m365group-user-add.ts +++ b/src/m365/entra/commands/m365group/m365group-user-add.ts @@ -5,9 +5,6 @@ import { entraGroup } from '../../../../utils/entraGroup.js'; import { validation } from '../../../../utils/validation.js'; import { formatting } from '../../../../utils/formatting.js'; import GraphCommand from '../../../base/GraphCommand.js'; -import teamsCommands from '../../../teams/commands.js'; -import aadCommands from '../../aadCommands.js'; -import { entraUser } from '../../../../utils/entraUser.js'; import commands from '../../commands.js'; interface CommandArgs { @@ -135,12 +132,6 @@ class EntraM365GroupUserAddCommand extends GraphCommand { } public async commandAction(logger: Logger, args: CommandArgs): Promise { - await this.showDeprecationWarning(logger, aadCommands.M365GROUP_USER_ADD, commands.M365GROUP_USER_ADD); - - if (args.options.userName) { - await this.warn(logger, `Option 'userName' is deprecated. Please use 'ids' or 'userNames' instead.`); - } - try { const userNames = args.options.userNames || args.options.userName; const providedGroupId: string = await this.getGroupId(logger, args); diff --git a/src/m365/entra/commands/m365group/m365group-user-set.spec.ts b/src/m365/entra/commands/m365group/m365group-user-set.spec.ts index 6c0b85d2c7..0fe66c80f1 100644 --- a/src/m365/entra/commands/m365group/m365group-user-set.spec.ts +++ b/src/m365/entra/commands/m365group/m365group-user-set.spec.ts @@ -13,8 +13,6 @@ import { sinonUtil } from '../../../../utils/sinonUtil.js'; import commands from '../../commands.js'; import command from './m365group-user-set.js'; import { entraGroup } from '../../../../utils/entraGroup.js'; -import { entraUser } from '../../../../utils/entraUser.js'; -import aadCommands from '../../aadCommands.js'; describe(commands.M365GROUP_USER_SET, () => { const groupId = '630dfae3-6904-4154-acc2-812e11205351'; @@ -72,18 +70,14 @@ describe(commands.M365GROUP_USER_SET, () => { assert.notStrictEqual(command.description, null); }); - it('defines alias', () => { - const alias = command.alias(); - assert.notStrictEqual(typeof alias, 'undefined'); - }); - - it('defines correct alias', () => { - const alias = command.alias(); - assert.deepStrictEqual(alias, [teamsCommands.USER_SET, aadCommands.M365GROUP_USER_SET]); - }); - - it('fails validation if groupId is not a valid GUID', async () => { - const actual = await command.validate({ options: { groupId: 'foo', ids: userIds[0], role: 'Member' } }, commandInfo); + it('fails validation if the groupId is not a valid guid.', async () => { + const actual = await command.validate({ + options: { + role: 'Member', + groupId: 'not-c49b-4fd4-8223-28f0ac3a6402', + userName: 'anne.matthews@contoso.onmicrosoft.com' + } + }, commandInfo); assert.notStrictEqual(actual, true); }); diff --git a/src/m365/entra/commands/m365group/m365group-user-set.ts b/src/m365/entra/commands/m365group/m365group-user-set.ts index 69d0d5fc41..008bfda894 100644 --- a/src/m365/entra/commands/m365group/m365group-user-set.ts +++ b/src/m365/entra/commands/m365group/m365group-user-set.ts @@ -6,8 +6,6 @@ import { formatting } from '../../../../utils/formatting.js'; import GraphCommand from '../../../base/GraphCommand.js'; import commands from '../../commands.js'; import { entraGroup } from '../../../../utils/entraGroup.js'; -import { entraUser } from '../../../../utils/entraUser.js'; -import aadCommands from '../../aadCommands.js'; interface CommandArgs { options: Options; @@ -132,12 +130,6 @@ class EntraM365GroupUserSetCommand extends GraphCommand { } public async commandAction(logger: Logger, args: CommandArgs): Promise { - await this.showDeprecationWarning(logger, aadCommands.M365GROUP_USER_SET, commands.M365GROUP_USER_SET); - - if (args.options.userName) { - await this.warn(logger, `Option 'userName' is deprecated. Please use 'ids' or 'userNames' instead.`); - } - try { const userNames = args.options.userNames || args.options.userName; const groupId: string = await this.getGroupId(logger, args); diff --git a/src/utils/spo.spec.ts b/src/utils/spo.spec.ts index a73991c468..0555fe0552 100644 --- a/src/utils/spo.spec.ts +++ b/src/utils/spo.spec.ts @@ -2555,42 +2555,6 @@ describe('utils/spo', () => { assert.strictEqual(amountOfCalls, 4); }); - it('throws error when folder not found by id', async () => { - sinon.stub(request, 'get').callsFake(async opts => { - if (opts.url === `${webUrl}/_api/web/GetFolderById('invalidFolderId')?$select=ServerRelativeUrl`) { - throw `File Not Found`; - } - - throw 'Invalid request'; - }); - - try { - await spo.getFolderServerRelativeUrl(webUrl, undefined, 'invalidFolderId', logger, true); - assert.fail('No error message thrown.'); - } - catch (ex) { - assert.deepStrictEqual(ex, `File Not Found`); - } - }); - - it('throws error when folder not found by url', async () => { - sinon.stub(request, 'get').callsFake(async opts => { - if (opts.url === `${webUrl}/_api/web/GetFolderByServerRelativePath(decodedUrl='%2Fsites%2Fsales%2FinvalidFolderUrl')?$select=ServerRelativeUrl`) { - throw `File Not Found`; - } - - throw 'Invalid request'; - }); - - try { - await spo.getFolderServerRelativeUrl(webUrl, 'invalidFolderUrl', undefined, logger, true); - assert.fail('No error message thrown.'); - } - catch (ex) { - assert.deepStrictEqual(ex, `File Not Found`); - } - }); - it('correctly outputs result when calling createCopyJob', async () => { sinon.stub(request, 'post').callsFake(async (opts) => { if (opts.url === 'https://contoso.sharepoint.com/sites/sales/_api/Site/CreateCopyJobs') {