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 scripts/package_dependencies.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

{
"tfjs-core": [],
"tfjs-converter": ["tfjs-core"]
"tfjs-converter": ["tfjs-core"],
"tfjs-layers": ["tfjs-core"]
}
10 changes: 9 additions & 1 deletion tfjs-layers/cloudbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ steps:
id: 'yarn-common'
args: ['install']

# Build core from master.
- name: 'node:10'
dir: 'tfjs-layers'
id: 'build-core'
entrypoint: 'yarn'
args: ['build-core-ci']
waitFor: ['yarn-common']

# Install layers dependencies
- name: 'node:10'
dir: 'tfjs-layers'
entrypoint: 'yarn'
id: 'yarn'
args: ['prep']
waitFor: ['yarn-common']
waitFor: ['build-core']

- name: 'node:10'
dir: 'tfjs-layers'
Expand Down
6 changes: 3 additions & 3 deletions tfjs-layers/integration_tests/tfjs2keras/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"private": false,
"license": "Apache-2.0 AND MIT",
"devDependencies": {
"@tensorflow/tfjs-core": "1.3.0",
"@tensorflow/tfjs-layers": "1.3.0",
"@tensorflow/tfjs-node": "1.3.0",
"@tensorflow/tfjs-core": "1.6.0",
"@tensorflow/tfjs-layers": "1.6.0",
"@tensorflow/tfjs-node": "1.6.0",
"clang-format": "~1.2.2"
},
"scripts": {
Expand Down
8 changes: 5 additions & 3 deletions tfjs-layers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"unpkg": "dist/tf-layers.min.js",
"miniprogram": "dist/miniprogram",
"devDependencies": {
"@tensorflow/tfjs-core": "1.6.0",
"@tensorflow/tfjs-core": "link:../tfjs-core",
"@types/jasmine": "~2.5.53",
"clang-format": "~1.2.2",
"http-server": "~0.10.0",
Expand All @@ -39,11 +39,13 @@
"scripts": {
"prep": "yarn install && yarn build",
"build": "tsc",
"build-core": "cd ../tfjs-core && yarn && yarn build",
"build-core-ci": "cd ../tfjs-core && yarn && yarn build-ci",
"build-npm": "./scripts/build-npm.sh",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A suggestion: to defend against publishing layers with a linked core package, we should have build-npm.sh check that "@tensorflow/tfjs-core": points to a version and not "link:../tfjs-core" . Likewise for the other build-npm.sh scripts in the other packages.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a reasonable suggestion for extra safety but in practice this won’t happen because of the release script :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release script makes sure it uses a pinned version. But yes, it can't prevent link leak to npm if package is released manually. I will add the safe guard in another PR.

"format": "./tools/clang_format_ts.sh",
"link-local": "yalc link",
"publish-local": "yarn build-npm && yalc push",
"test": "karma start",
"test": "yarn build-core && yarn && karma start",
"tfjs2keras": "yarn tfjs2keras-js && yarn tfjs2keras-py --stable && yarn tfjs2keras-py --stable --tfkeras && yarn tfjs2keras-py --dev --tfkeras",
"tfjs2keras-js": "./scripts/tfjs2keras-js.sh",
"tfjs2keras-py": "./scripts/tfjs2keras-py.sh",
Expand All @@ -53,6 +55,6 @@
"lint": "tslint -p . -t verbose"
},
"peerDependencies": {
"@tensorflow/tfjs-core": "1.6.0"
"@tensorflow/tfjs-core": "link:../tfjs-core"
}
}
14 changes: 3 additions & 11 deletions tfjs-layers/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,9 @@
# yarn lockfile v1


"@tensorflow/tfjs-core@1.6.0":
version "1.6.0"
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-core/-/tfjs-core-1.6.0.tgz#8a871de73995e0efc7ea5660df018402c788d285"
integrity sha512-b98jn1pjRuEDVNN6/ZQMFhyYV27ZIsG9CcHSMXq1ohX6ALQQB3mwgrMeC2TEVXFl6/L2vOD8W+txuBRGKHnvpg==
dependencies:
"@types/offscreencanvas" "~2019.3.0"
"@types/seedrandom" "2.4.27"
"@types/webgl-ext" "0.0.30"
"@types/webgl2" "0.0.4"
node-fetch "~2.1.2"
seedrandom "2.4.3"
"@tensorflow/tfjs-core@link:../tfjs-core":
version "0.0.0"
uid ""

"@types/estree@0.0.38":
version "0.0.38"
Expand Down