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

fix(common): locales are not being shipped #23136

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions packages/bazel/test/ng_package/common_package.spec.ts
Expand Up @@ -13,6 +13,21 @@ import * as shx from 'shelljs';
shx.cd(path.join(process.env['TEST_SRCDIR'], 'angular', 'packages', 'common', 'npm_package'));

describe('@angular/common ng_package', () => {
it('should have the locales files', () => {
it('/locales', () => {
const files = shx.ls('-R', 'locales').stdout.split('\n');
expect(files.some(n => n.endsWith('.d.ts'))).toBe(true, `.d.ts files don't exist`);
expect(files.some(n => n.endsWith('.js'))).toBe(true, `.js files don't exist`);
expect(files.some(n => n.endsWith('.js.map'))).toBe(true, `.js.map files don't exist`);
});
it('/locales/extra', () => {
const files = shx.ls('-R', 'locales/extra').stdout.split('\n');
expect(files.some(n => n.endsWith('.d.ts'))).toBe(true, `.d.ts files don't exist`);
expect(files.some(n => n.endsWith('.js'))).toBe(true, `.js files don't exist`);
expect(files.some(n => n.endsWith('.js.map'))).toBe(true, `.js.map files don't exist`);
});
});

it('should have right bundle files', () => {
expect(shx.ls('-R', 'bundles').stdout.split('\n').filter(n => !!n).sort()).toEqual([
'common-http-testing.umd.js',
Expand Down
3 changes: 3 additions & 0 deletions packages/common/BUILD.bazel
Expand Up @@ -25,6 +25,9 @@ ng_package(
"//packages/common/http/testing:package.json",
"//packages/common/testing:package.json",
],
data = [
"//packages/common/locales",
],
entry_point = "packages/common/index.js",
tags = ["release-with-framework"],
deps = [
Expand Down