Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[devops]: Remove references to internal/vendor packages #12010

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
69 changes: 0 additions & 69 deletions packages/services/gulp-tasks/config.js

This file was deleted.

51 changes: 0 additions & 51 deletions packages/services/gulp-tasks/vendor.js

This file was deleted.

17 changes: 0 additions & 17 deletions packages/services/gulpfile.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"access": "public"
},
"scripts": {
"build": "yarn clean && gulp vendor && node scripts/build.js",
"build": "yarn clean && node scripts/build.js",
"ci-check": "yarn build && yarn test",
"clean": "rimraf es lib umd",
"contributors:add": "all-contributors add",
Expand Down
4 changes: 2 additions & 2 deletions packages/services/src/services/DDO/DDO.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* Copyright IBM Corp. 2020, 2023
* Copyright IBM Corp. 2020, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import settings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';
import settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';
import root from 'window-or-global';

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/services/src/services/DDO/__tests__/DDO.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright IBM Corp. 2020, 2023
* Copyright IBM Corp. 2020, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand All @@ -10,7 +10,7 @@ import digitalDataResponse from './data/response.json';
import root from 'window-or-global';

jest.mock(
'../../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings',
'@carbon/ibmdotcom-utilities/lib/utilities/settings/settings.js',
() => ({
version: 'cds.v1.0.0',
})
Expand Down
2 changes: 1 addition & 1 deletion packages/services/src/services/Locale/Locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import axios from 'axios';
import { DDOAPI } from '../DDO';
import ipcinfoCookie from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/ipcinfoCookie/ipcinfoCookie';
import ipcinfoCookie from '@carbon/ibmdotcom-utilities/es/utilities/ipcinfoCookie/ipcinfoCookie.js';
import root from 'window-or-global';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import ipcinfoCookie from '../../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/ipcinfoCookie/ipcinfoCookie';
import ipcinfoCookie from '@carbon/ibmdotcom-utilities/es/utilities/ipcinfoCookie/ipcinfoCookie.js';
import LocaleAPI from '../Locale';
import { DDOAPI } from '../../DDO';
import mockAxios from 'axios';
Expand All @@ -16,7 +16,7 @@ import oldSession from './data/timestamp_response.json';
const mockDigitalDataResponse = digitalDataResponse;

jest.mock(
'../../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/ipcinfoCookie/ipcinfoCookie'
'@carbon/ibmdotcom-utilities/lib/utilities/ipcinfoCookie/ipcinfoCookie.js'
);
jest.mock('../../DDO');

Expand Down
4 changes: 2 additions & 2 deletions packages/services/src/services/VideoPlayer/VideoPlayer.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* Copyright IBM Corp. 2020, 2023
* Copyright IBM Corp. 2020, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import deprecate from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/deprecate/deprecate';
import deprecate from '@carbon/ibmdotcom-utilities/es/utilities/deprecate/deprecate.js';
import KalturaPlayerAPI from '../KalturaPlayer/KalturaPlayer';

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/services/src/services/global/global.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* Copyright IBM Corp. 2020, 2023
* Copyright IBM Corp. 2020, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import { AnalyticsAPI } from '../Analytics';
import { DDOAPI } from '../DDO';
import loadNonLatinPlex from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/loadNonLatinPlex/loadNonLatinPlex';
import loadNonLatinPlex from '@carbon/ibmdotcom-utilities/es/utilities/loadNonLatinPlex/loadNonLatinPlex.js';
import { LocaleAPI } from '../Locale';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright IBM Corp. 2016, 2023
* Copyright IBM Corp. 2016, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright IBM Corp. 2020, 2023
// Copyright IBM Corp. 2020, 2024
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/.storybook/react/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2023
* Copyright IBM Corp. 2020, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand Down
27 changes: 5 additions & 22 deletions packages/web-components/IMPLEMENTATION_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,6 @@ Connecting to `@carbon/ibmdotcom-services-store` is done with
[`ConnectMixin`](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/v1.13.0/packages/web-components/src/globals/mixins/connect.ts)
that has a similar feature set to [`react-redux`](https://react-redux.js.org).

> 💡 `import`s of `@carbon/ibmdotcom-services-store` are slightly different from
> other NPM packages. See [vendor directory](#vendor-directory) section for more
> details.

Similar to `react-redux`, `ConnectMixin` uses two callbacks:

| Callback | Description |
Expand Down Expand Up @@ -553,30 +549,17 @@ procedure can be found
## Vendor directory

The `@carbon/ibmdotcom-services-store` package is a private package that is not
published to NPM. Adding it to `package.json` will break application because it
won't be found.
published to NPM. Adding it to `package.json` will break your application
because it won't be found.

To solve this problem, the
[build process](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/v1.15.0/packages/web-components/gulp-tasks/vendor.js)
of `@carbon/ibmdotcom-web-components` copies build artifacts of
`@carbon/ibmdotcom-services-store` to
`packages/web-components/src/internal/vendor/@carbon/ibmdotcom-services-store`
as well as to
`packages/web-components/es/internal/vendor/@carbon/ibmdotcom-services-store`.
The former is used for our development, while the latter is for the application,
being part of the
[`@carbon/ibmdotcom-web-components` package](https://unpkg.com/browse/@carbon/[email protected]/es/internal/vendor/@carbon/ibmdotcom-services-store/).

The `import`s of `@carbon/ibmdotcom-services-store` in
`@carbon/ibmdotcom-web-components` refer to those copies, rather than the
`@carbon/ibmdotcom-services-store` package:

```javascript
import {
loadLanguage,
setLanguage,
} from '../../internal/vendor/@carbon/ibmdotcom-services-store/actions/localeAPI';
```
This is for your application, being part of the
[`@carbon/ibmdotcom-web-components` package](https://unpkg.com/browse/@carbon/[email protected]/es/internal/vendor/@carbon/ibmdotcom-services-store/),
they are available should you need them.

## Rollup bundle for Dotcom shell

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/gulp-tasks/build.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2022
* Copyright IBM Corp. 2020, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/gulp-tasks/build/components.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2022
* Copyright IBM Corp. 2020, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand Down
13 changes: 9 additions & 4 deletions packages/web-components/gulp-tasks/build/modules/icons.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2023
* Copyright IBM Corp. 2020, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand Down Expand Up @@ -32,7 +32,10 @@ const promisifyStream = promisify(asyncDone);
* @returns {Promise<void>} Gulp stream
*/
async function icons() {
const banner = await readFileAsync(path.resolve(__dirname, '../../../../../tasks/license.js'), 'utf8');
const banner = await readFileAsync(
path.resolve(__dirname, '../../../../../tasks/license.js'),
'utf8'
);
await promisifyStream(() =>
gulp
.src([`${config.iconsDir}/**/*.svg`])
Expand All @@ -42,14 +45,16 @@ async function icons() {
file.contents = Buffer.from(`
import { svg } from 'lit';
import spread from '@carbon/web-components/es/globals/directives/spread.js';
const svgResultIBMdotcomIcon = ${createSVGResultFromIconDescriptor(descriptor)};
const svgResultIBMdotcomIcon = ${createSVGResultFromIconDescriptor(
descriptor
)};
export default svgResultIBMdotcomIcon;
`);
done(null, file);
})
)
.pipe(
rename(filePath => {
rename((filePath) => {
filePath.extname = '.js';
})
)
Expand Down
3 changes: 1 addition & 2 deletions packages/web-components/gulp-tasks/clean.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2023
* Copyright IBM Corp. 2020, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand All @@ -25,7 +25,6 @@ function _clean() {
del(config.cjsDestDir),
del(config.jsDestDir),
del(config.sassDestDir),
del(config.vendorSrcDirBase),
del('custom-elements.json'),
del('storybook-static'),
]);
Expand Down
Loading
Loading