Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,5 @@ dist

esm
system
es2015
es2015
es2020
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node
node
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ karma.conf.cjs
.nvmrc
pnpm-lock.yaml
es2015
es2020
62 changes: 60 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ A repo that tests automatic detection of upstream publishes and the publishing o

Upstream repo at https://github.com/angular/angular.

### Latest Version
## Latest Version

### @angular/common

#### ES2015

https://cdn.jsdelivr.net/npm/@esm-bundle/angular__common/system/es2015/ivy/angular-common.js

Expand All @@ -20,7 +24,61 @@ https://unpkg.com/@esm-bundle/angular__common/system/es2015/ivy/angular-common.j

https://unpkg.com/@esm-bundle/angular__common/system/es2015/ivy/angular-common.min.js

### Specific Version
#### ES2020

https://cdn.jsdelivr.net/npm/@esm-bundle/angular__common/system/es2020/ivy/angular-common.js

https://cdn.jsdelivr.net/npm/@esm-bundle/angular__common/system/es2020/ivy/angular-common.min.js

https://unpkg.com/@esm-bundle/angular__common/system/es2020/ivy/angular-common.js

https://unpkg.com/@esm-bundle/angular__common/system/es2020/ivy/angular-common.min.js

### @angular/common/http

#### ES2015

https://cdn.jsdelivr.net/npm/@esm-bundle/angular__common/system/es2015/ivy/angular-http.js

https://cdn.jsdelivr.net/npm/@esm-bundle/angular__common/system/es2015/ivy/angular-http.min.js

https://unpkg.com/@esm-bundle/angular__common/system/es2015/ivy/angular-http.js

https://unpkg.com/@esm-bundle/angular__common/system/es2015/ivy/angular-http.min.js

#### ES2020

https://cdn.jsdelivr.net/npm/@esm-bundle/angular__common/system/es2020/ivy/angular-http.js

https://cdn.jsdelivr.net/npm/@esm-bundle/angular__common/system/es2020/ivy/angular-http.min.js

https://unpkg.com/@esm-bundle/angular__common/system/es2020/ivy/angular-http.js

https://unpkg.com/@esm-bundle/angular__common/system/es2020/ivy/angular-http.min.js

### @angular/common/upgrade

#### ES2015

https://cdn.jsdelivr.net/npm/@esm-bundle/angular__common/system/es2015/ivy/angular-upgrade.js

https://cdn.jsdelivr.net/npm/@esm-bundle/angular__common/system/es2015/ivy/angular-upgrade.min.js

https://unpkg.com/@esm-bundle/angular__common/system/es2015/ivy/angular-upgrade.js

https://unpkg.com/@esm-bundle/angular__common/system/es2015/ivy/angular-upgrade.min.js

#### ES2020

https://cdn.jsdelivr.net/npm/@esm-bundle/angular__common/system/es2020/ivy/angular-upgrade.js

https://cdn.jsdelivr.net/npm/@esm-bundle/angular__common/system/es2020/ivy/angular-upgrade.min.js

https://unpkg.com/@esm-bundle/angular__common/system/es2020/ivy/angular-upgrade.js

https://unpkg.com/@esm-bundle/angular__common/system/es2020/ivy/angular-upgrade.min.js

## Specific Version

https://cdn.jsdelivr.net/npm/@esm-bundle/angular__common@11.1.1/system/es2015/ivy/angular-common.js

Expand Down
3 changes: 2 additions & 1 deletion browser-test/systemjs-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ document.head.appendChild(
"imports": {
"rxjs": "https://cdn.jsdelivr.net/npm/@esm-bundle/rxjs/system/es2015/rxjs.min.js",
"rxjs/operators": "https://cdn.jsdelivr.net/npm/@esm-bundle/rxjs/system/es2015/rxjs-operators.min.js",
"@angular/core": "https://cdn.jsdelivr.net/npm/@esm-bundle/angular__core/system/es2015/ivy/angular-core.js"
"@angular/core": "https://cdn.jsdelivr.net/npm/@esm-bundle/angular__core/system/es2015/ivy/angular-core.js",
"@angular/common": "/base/system/es2015/ivy/angular-common.min.js"
}
}`,
})
Expand Down
51 changes: 47 additions & 4 deletions browser-test/test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,52 @@
describe("@esm-bundle/angular-common", () => {
it("can load the System.register es2015 bundle", () => {
return System.import("/base/system/es2015/ivy/angular-common.js");
describe("@angular/common", () => {
["es2015", "es2020"].forEach((ecma) => {
it(`can load the System.register ${ecma} bundle`, async () => {
const m = await System.import(
`/base/system/${ecma}/ivy/angular-common.js`
);
expect(m.Location).toBeDefined();
});

it(`can load the System.register ${ecma} prod bundle`, async () => {
const m = await System.import(
`/base/system/${ecma}/ivy/angular-common.min.js`
);
expect(m.Location).toBeDefined();
});
});
});

it("can load the System.register es2015 prod bundle", () => {
return System.import("/base/system/es2015/ivy/angular-common.min.js");
describe("@angular/common/http", () => {
["es2015", "es2020"].forEach((ecma) => {
it(`can load the System.register ${ecma} bundle`, async () => {
const m = await System.import(
`/base/system/${ecma}/ivy/angular-http.js`
);
expect(m.HttpClient).toBeDefined();
});

it(`can load the System.register ${ecma} prod bundle`, async () => {
const m = await System.import(
`/base/system/${ecma}/ivy/angular-http.min.js`
);
expect(m.HttpClient).toBeDefined();
});
});
});

// TODO(artur): this should be uncommented once we have `esm-bundle/angular__upgrade`.
// describe('@angular/common/upgrade', () => {
// ['es2015', 'es2020'].forEach((ecma) => {
// it(`can load the System.register ${ecma} bundle`, async () => {
// const m = await System.import(`/base/system/${ecma}/ivy/angular-upgrade.js`);
// expect(m.HttpClient).toBeDefined();
// });

// it(`can load the System.register ${ecma} prod bundle`, async () => {
// const m = await System.import(`/base/system/${ecma}/ivy/angular-upgrade.min.js`);
// expect(m.HttpClient).toBeDefined();
// });
// });
// });
});
30 changes: 23 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,38 @@
"version": "12.2.16",
"description": "Repo to test esm-bundle's automatic publishing",
"exports": {
".": "./es2015/ivy/angular-common.js"
".": {
"es2015": "./es2015/ivy/angular-common.js",
"es2020": "./es2020/ivy/angular-common.js",
"default": "./es2020/ivy/angular-common.js"
},
"./http": {
"es2015": "./es2015/ivy/angular-http.mjs",
"es2020": "./es2020/ivy/angular-http.mjs",
"default": "./es2020/ivy/angular-http.mjs"
},
"./upgrade": {
"es2015": "./es2015/ivy/angular-upgrade.mjs",
"es2020": "./es2020/ivy/angular-upgrade.mjs",
"default": "./es2020/ivy/angular-upgrade.mjs"
}
},
"type": "module",
"scripts": {
"test": "pnpm run build && concurrently -n w: 'pnpm:test:*'",
"test:browser": "karma start karma.conf.cjs --single-run",
"debug:test:browser": "karma start karma.conf.cjs",
"test:formatting": "prettier --check .",
"build": "rimraf system es2015 && rollup -c",
"build": "rimraf system es2015 es2020 && rollup -c",
"format": "prettier --write .",
"release": "release-it",
"prepublishOnly": "pnpm build && pinst --disable",
"postinstall": "ngcc --no-tsconfig --target @angular/common --properties es2015 --first-only",
"postinstall": "husky install",
"postpublish": "pinst --enable"
},
"files": [
"es2015",
"es2020",
"system"
],
"repository": {
Expand All @@ -33,10 +48,11 @@
},
"homepage": "https://github.com/esm-bundle/angular__common#readme",
"devDependencies": {
"@angular/common": "12.2.16",
"@angular/compiler": "12.2.16",
"@angular/compiler-cli": "12.2.16",
"@angular/core": "^11.1.1",
"@angular/common": "13.3.0",
"@angular/compiler": "13.3.0",
"@angular/compiler-cli": "13.3.0",
"@angular/core": "13.3.0",
"@rollup/plugin-babel": "5.3.1",
"concurrently": "7.0.0",
"esm-bundle-scripts": "1.2.0",
"husky": "7.0.4",
Expand Down
Loading